


This is possible by taking the discriminant value, which is part of the formula to solve the quadratic equation. The nature of roots of a quadratic equation can be found without actually finding the roots (α, β) of the equation. And also check out the formulas to find the sum and the product of the roots of the equation.
#C program to find quadratic equation how to
Here we shall learn more about how to find the nature of roots of a quadratic equation without actually finding the roots of the equation. The roots of a quadratic equation are usually represented to by the symbols alpha (α), and beta (β). Thus, by completing the squares, we were able to isolate x and obtain the two roots of the equation. This is good for us, because now we can take square roots to obtain: The left hand side is now a perfect square: Now, we express the left-hand side as a perfect square, by introducing a new term (b/2a) 2 on both sides: To determine the roots of this equation, we proceed as follows: Quadratic Formula ProofĬonsider an arbitrary quadratic equation: ax 2 + bx + c = 0, a ≠ 0 Quadratic Formula: The roots of a quadratic equation ax 2 + bx + c = 0 are given by x = /2a.Įxample: Let us find the roots of the same equation that was mentioned in the earlier section x 2 - 3x - 4 = 0 using the quadratic formula. The positive sign and the negative sign can be alternatively used to obtain the two distinct roots of the equation. The two roots in the quadratic formula are presented as a single expression. The roots of the quadratic equation further help to find the sum of the roots and the product of the roots of the quadratic equation. There are certain quadratic equations that cannot be easily factorized, and here we can conveniently use this quadratic formula to find the roots in the quickest possible way. Quadratic Formula is the simplest way to find the roots of a quadratic equation. Maximum and Minimum Value of Quadratic Expression Nature of Roots of the Quadratic Equation We shall learn more about the roots of a quadratic equation in the below content. These two answers for x are also called the roots of the quadratic equations and are designated as (α, β). The quadratic equations are second-degree equations in x that have a maximum of two answers for x. Did you know that when a rocket is launched, its path is described by a quadratic equation? Further, a quadratic equation has numerous applications in physics, engineering, astronomy, etc. In other words, a quadratic equation is an “equation of degree 2.” There are many scenarios where a quadratic equation is used. The word "Quadratic" is derived from the word "Quad" which means square. Print("Two Distinct Complex Roots Exists: root1 = %.2f+%.2f and root2 = %.2f-%.Quadratic equations are second-degree algebraic expressions and are of the form ax 2 + bx + c = 0. Imaginary = math.sqrt(-discriminant) / (2 * a) Print("Two Equal and Real Roots Exists: root1 = %.2f and root2 = %.2f" %(root1, root2)) Print("Two Distinct Real Roots Exists: root1 = %.2f and root2 = %.2f" %(root1, root2)) Root2 = (-b - math.sqrt(discriminant) / (2 * a)) Root1 = (-b + math.sqrt(discriminant) / (2 * a)) If discriminant = 0, Two Equal and Real Roots exist.

If discriminant > 0, then Two Distinct Real Roots exist for this equation A Quadratic Equation can have two roots, and they depend entirely upon the discriminant.

The mathematical representation of a Quadratic Equation is ax²+bx+c = 0. Write a Python program to find the Roots of a Quadratic Equation with an example.
