Skip to main content

Lessons by topic

Quadratic equation: solving with the discriminant and Vieta's theorem

4 min read

A quadratic equation is written in the form ax2+bx+c=0ax^2+bx+c=0, and a≠0a\ne0 must hold. On the set of real numbers, the discriminant determines the number of roots; when the coefficients are convenient, Vieta's theorem helps to find the roots quickly or to evaluate an expression involving them.

Below, the equation is first reduced to standard form, then a suitable method is chosen, and the answer is checked by substitution or by Vieta's identities.

The quadratic equation and its types

General form: ax2+bx+c=0ax^2 + bx + c = 0, where aa is the leading coefficient, bb is the second coefficient, and cc is the constant term. If a=0a = 0 and b≠0b\ne0, the equation becomes linear, so the condition a≠0a \neq 0 is required.

If b=0b = 0 or c=0c = 0, the equation is called an incomplete quadratic equation, and it can also be solved without a formula:

  • in the form ax2+c=0ax^2 + c = 0, we obtain the root directly: from 3x2−12=03x^2 - 12 = 0 we get x2=4x^2 = 4, so x=±2x = \pm 2;
  • in the form ax2+bx=0ax^2 + bx = 0, we factor: from x2+5x=0x^2 + 5x = 0 we get x(x+5)=0x(x + 5) = 0, so x=0x = 0 or x=−5x = -5.

For a complete equation, the universal tool is the discriminant.

Solving using the discriminant

The discriminant is found by the following formula:

D=b2−4acD = b^2 - 4ac

On the set of real numbers, its sign tells the number of roots in advance: if D>0D > 0, there are two distinct real roots; if D=0D = 0, there is one double root; if D<0D < 0, there is no real root.

The formula for the roots: x1,2=−b±D2ax_{1,2} = \dfrac{-b \pm \sqrt{D}}{2a}.

1-Example. Solve the equation 2x2+3x−5=02x^2 + 3x - 5 = 0.

Coefficients: a=2a = 2, b=3b = 3, c=−5c = -5. Discriminant: D=32−4⋅2⋅(−5)=9+40=49D = 3^2 - 4 \cdot 2 \cdot (-5) = 9 + 40 = 49. Since 49=7\sqrt{49} = 7:

x1=−3+74=1x_1 = \dfrac{-3 + 7}{4} = 1, x2=−3−74=−52\quad x_2 = \dfrac{-3 - 7}{4} = -\dfrac{5}{2}.

We check: 2⋅12+3⋅1−5=02 \cdot 1^2 + 3 \cdot 1 - 5 = 0. For the second root, Vieta's identities also hold: 1+(−2,5)=−1,5=−ba1+(-2{,}5)=-1{,}5=-\frac{b}{a} and 1⋅(−2,5)=−2,5=ca1\cdot(-2{,}5)=-2{,}5=\frac{c}{a}. Answer: x1=1x_1 = 1, x2=−2,5x_2 = -2{,}5.

2-Example. Solve the equation x2−6x+9=0x^2 - 6x + 9 = 0.

D=(−6)2−4⋅1⋅9=36−36=0D = (-6)^2 - 4 \cdot 1 \cdot 9 = 36 - 36 = 0. Thus, there is one root: x=62=3x = \dfrac{6}{2} = 3. This can also be seen in the form (x−3)2=0(x - 3)^2 = 0 — the left-hand side factors as a perfect square.

Vieta's theorem: the art of solving mentally

For a reduced quadratic equation, that is, of the form x2+px+q=0x^2 + px + q = 0 (a=1a = 1), Vieta's theorem states: if real roots exist,

x1+x2=−px_1 + x_2 = -p \quad and x1⋅x2=q\quad x_1 \cdot x_2 = q.

In other words, the sum of the roots equals the second coefficient with the opposite sign, and the product equals the constant term. When the coefficients are small integers, this method makes it possible to find the roots mentally.

3-Example. Solve the equation x2+7x+12=0x^2 + 7x + 12 = 0.

We look for two numbers whose product is 1212 and whose sum is −7-7. The product is positive, so the roots have the same sign; the sum is negative, so both are negative. (−3)⋅(−4)=12(-3) \cdot (-4) = 12 and (−3)+(−4)=−7(-3) + (-4) = -7. Answer: x1=−3x_1 = -3, x2=−4x_2 = -4.

To make sure, we check with the discriminant: D=49−48=1D = 49 - 48 = 1, x=−7±12x = \dfrac{-7 \pm 1}{2}, that is, −3-3 and −4-4 — they match.

4-Example. Solve the equation x2−5x+6=0x^2 - 5x + 6 = 0.

The numbers whose sum is 55 and whose product is 66 are 22 and 33. Answer: x1=2x_1 = 2, x2=3x_2 = 3. Checking by substitution also confirms this: 22−5⋅2+6=02^2 - 5 \cdot 2 + 6 = 0.

If a≠1a \neq 1, Vieta's identities work directly in the form x1+x2=−bax_1+x_2=-\dfrac{b}{a} and x1x2=cax_1x_2=\dfrac{c}{a}. If finding the roots mentally is inconvenient, the discriminant remains the universal choice.

Vieta's theorem also works in the reverse direction: it is very convenient for recovering an equation from given roots or for evaluating expressions such as x12+x22=(x1+x2)2−2x1x2x_1^2 + x_2^2 = (x_1 + x_2)^2 - 2x_1 x_2 without solving the equation.

Independent exercise

Solve the equation 3x2−12x+9=03x^2-12x+9=0 and check the roots with Vieta's identities. Short answer: If we divide the equation by 3, we obtain x2−4x+3=0x^2-4x+3=0; the roots are 11 and 33, their sum is 44, and their product is 33.

Typical mistakes and ways to avoid them

In practice, the most common mistakes are the following:

  • Losing the sign. In 1-Example, aa is positive and cc is negative, so the term −4ac-4ac becomes positive. In 1-Example, replacing 9+409 + 40 with 9−409 - 40 spoils the entire solution. Let it become a habit to calculate by placing negative coefficients in parentheses.
  • Forgetting 2a2a in the denominator. In the formula, the denominator is 2a2a, not simply 22: if a=2a = 2, the denominator is 44.
  • A sign mix-up in Vieta's theorem. The sum equals −p-p, not pp. In x2+7x+12=0x^2 + 7x + 12 = 0, the sum of the roots is −7-7, and the product is +12+12.
  • Taking D=0D = 0 to mean “no root”. Over the real numbers there is one double root; the absence of a real root belongs to the case D<0D < 0.
  • Not reducing the equation to standard form. The coefficients cannot be taken directly from x2=5x−6x^2 = 5x - 6; first it is reduced to the form x2−5x+6=0x^2 - 5x + 6 = 0.
  • Not checking. Substitute the roots found into the original equation, or compare their sum and product with Vieta's identities.

Conclusion and the next step

  • First reduce the equation to the form ax2+bx+c=0ax^2+bx+c=0 and check a≠0a\ne0.
  • The number of real roots is determined by the sign of D=b2−4acD=b^2-4ac.
  • For convenient integer coefficients, Vieta's theorem is a fast method, and the discriminant is the universal method.
  • Check the answer independently by substitution or by Vieta's identities.
  • Solve the tests on quadratic equations or take a new example in the daily problem.

Read reviews in the original language