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.
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:
D=b2−4ac
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
x1,2=2a−b±D
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
Discriminant
Number of solutions
Why
D > 0
two different solutions
√D is a positive number, so + and − give two different values
D = 0
one solution (a repeated root)
√0 = 0, so both values are the same: x = −b / 2a
D < 0
no real solutions
a 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.
The left-hand side is really (x − 3)², so the only solution is x = 3.
Worked example 3 — no solutions
x² + 2x + 5 = 0
D = 2² − 4 · 1 · 5 = 4 − 20 = −16.
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
D = (−4)² − 4 · 1 · 1 = 16 − 4 = 12.
√12 = √(4 · 3) = 2√3.
x = (4 ± 2√3) / 2.
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
D = 2² − 4 · 1 · (−7) = 4 + 28 = 32.
√32 = √(16 · 2) = 4√2.
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
x² + x − 12 = 0
3x² − 5x − 2 = 0
x² − 10x + 25 = 0
x² − 2x − 2 = 0
2x² + 3x + 4 = 0
Solutions:
D = 1 + 48 = 49, x = (−1 ± 7) / 2, so x = 3 or x = −4.
D = 25 + 24 = 49, x = (5 ± 7) / 6, so x = 2 or x = −1/3.
D = 100 − 100 = 0, x = 10 / 2 = 5.
D = 4 + 8 = 12, x = (2 ± 2√3) / 2 = 1 ± √3.
D = 9 − 32 = −23 < 0, the equation has no real solutions.