The Quadratic Formula and the Discriminant

The Quadratic Formula and the Discriminant

You can solve x² − 9 = 0 by taking the square root, and x² − 5x = 0 by taking out x. But what about x² − 2x − 15 = 0? It has all three terms, and neither trick works.

For a complete quadratic equation like this there is a formula that always works. Let's go through it step by step.


Contents


The discriminant

First rearrange the equation into the form ax² + bx + c = 0 and write down the coefficients with their signs. For x² − 2x − 15 = 0 you have a = 1, b = −2, c = −15.

Then work out the discriminant:

For our equation: D = (−2)² − 4 · 1 · (−15) = 4 + 60 = 64.

The word discriminant comes from "to discriminate", which means to tell things apart: it tells you how many solutions the equation has.


The quadratic formula

If D is not negative, you find the roots with the formula

The ± sign means you calculate twice: once with plus (x₁) and once with minus (x₂).

For x² − 2x − 15 = 0: √D = √64 = 8, so

  • x₁ = (2 + 8) / 2 = 10 / 2 = 5,
  • x₂ = (2 − 8) / 2 = −6 / 2 = −3.

Check: 5² − 2 · 5 − 15 = 25 − 10 − 15 = 0 ✓.


Three cases depending on the discriminant

DiscriminantNumber of solutionsWhy
D > 0two different solutions√D is a positive number, so + and − give two different values
D = 0one solution (a repeated root)√0 = 0, so both values are the same: x = −b / 2a
D < 0no real solutionsa negative number has no real square root

The picture shows the graphs of three functions y = x² − 2x + c. The roots of the equation are the points where the graph crosses the x-axis. The orange parabola crosses it twice, the black one only touches it, and the dashed one doesn't reach it at all.

Three parabolas: the orange one crosses the x-axis at −1 and 3, the solid black one touches the x-axis at 1, the dashed one lies completely above the x-axis

Worked examples

Worked example 1 — fractional roots

2x² − x − 3 = 0

  1. a = 2, b = −1, c = −3.
  2. D = (−1)² − 4 · 2 · (−3) = 1 + 24 = 25, √D = 5.
  3. x₁ = (1 + 5) / 4 = 6/4 = 3/2, x₂ = (1 − 5) / 4 = −4/4 = −1.

Check for x = −1: 2 · 1 + 1 − 3 = 0 ✓.

Worked example 2 — one root

x² − 6x + 9 = 0

  1. D = (−6)² − 4 · 1 · 9 = 36 − 36 = 0.
  2. x = 6 / 2 = 3.

The left-hand side is really (x − 3)², so the only solution is x = 3.

Worked example 3 — no solutions

x² + 2x + 5 = 0

  1. D = 2² − 4 · 1 · 5 = 4 − 20 = −16.
  2. D < 0, so the equation has no real solutions.

💡 If a is negative, for example −x² + 4x − 3 = 0, first multiply the whole equation by −1: x² − 4x + 3 = 0. The solutions stay the same (x = 1 and x = 3), and the working is easier.


Roots with surds

If D is not a square number, the square root doesn't come out exactly. You then write the roots with a square root and simplify the surd: take the largest square number out from under the square root.

Worked example 4

x² − 4x + 1 = 0

  1. D = (−4)² − 4 · 1 · 1 = 16 − 4 = 12.
  2. √12 = √(4 · 3) = 2√3.
  3. x = (4 ± 2√3) / 2.
  4. Divide both terms of the numerator by two: x = 2 ± √3.

The roots are x₁ = 2 + √3, x₂ = 2 − √3 (about 3.73 and 0.27).

Worked example 5

x² + 2x − 7 = 0

  1. D = 2² − 4 · 1 · (−7) = 4 + 28 = 32.
  2. √32 = √(16 · 2) = 4√2.
  3. x = (−2 ± 4√2) / 2 = −1 ± 2√2.

Common mistakes

  • The sign of −b. If b = −2, then −b = 2. You put the opposite of b into the formula.
  • Squaring a negative b. (−6)² = 36, not −36. Always put a negative b in brackets.
  • Dividing only part of the numerator. (4 ± 2√3) / 2 is 2 ± √3, not 2 ± 2√3 or 4 ± √3.
  • Not simplifying the surd. The answer (4 ± √12) / 2 is not finished: √12 = 2√3, so x = 2 ± √3.
  • The equation is not in the form = 0. With x² = 2x + 15, first move everything to the left: x² − 2x − 15 = 0.

In short

  • Rearrange the equation into the form ax² + bx + c = 0 and write down a, b, c with their signs.
  • Discriminant: D = b² − 4ac.
  • D > 0: two solutions, D = 0: one, D < 0: none.
  • Roots: x = (−b ± √D) / 2a.
  • Simplify the surd and cancel the fraction.

Try it yourself

  1. x² + x − 12 = 0
  2. 3x² − 5x − 2 = 0
  3. x² − 10x + 25 = 0
  4. x² − 2x − 2 = 0
  5. 2x² + 3x + 4 = 0
Solutions:
  1. D = 1 + 48 = 49, x = (−1 ± 7) / 2, so x = 3 or x = −4.
  2. D = 25 + 24 = 49, x = (5 ± 7) / 6, so x = 2 or x = −1/3.
  3. D = 100 − 100 = 0, x = 10 / 2 = 5.
  4. D = 4 + 8 = 12, x = (2 ± 2√3) / 2 = 1 ± √3.
  5. D = 9 − 32 = −23 < 0, the equation has no real solutions.

Practise

👉 Back: Incomplete quadratic equations · Next: Number of solutions and equations with a parameter