Solving ax² + bx + c = 0
Quadratic equations describe the path of a thrown ball, the area of a rectangle with a fixed perimeter, break-even points in business and countless algebra problems. Every one of them can be solved with the same formula. This calculator gives the discriminant, the two roots, real or complex, the vertex of the parabola and the sum and product of the roots, so you can check the answer.
The quadratic formula
x = (−b ± √(b² − 4ac)) ÷ 2a
The expression under the square root, Δ = b² − 4ac, is the discriminant:
- Δ > 0: two distinct real roots; the parabola crosses the x-axis twice.
- Δ = 0: one double root; the parabola touches the axis at its vertex.
- Δ < 0: no real roots; the two complex roots are −b ÷ 2a ± i × √(−Δ) ÷ 2a.
Worked example: x² − 3x − 10 = 0
- Here a = 1, b = −3 and c = −10.
- Discriminant: (−3)² − 4 × 1 × (−10) = 9 + 40 = 49.
- √49 = 7, so x = (3 − 7) ÷ 2 = −2 and x = (3 + 7) ÷ 2 = 5.
- Vertex: x = 3 ÷ 2 = 1.5, y = −10 − 9 ÷ 4 = −12.25, the lowest point of the parabola.
- Check: −2 + 5 = 3 = −b ÷ a, and −2 × 5 = −10 = c ÷ a.
The equation factors as (x − 5)(x + 2) = 0, which confirms the roots.
How the constant c changes the roots
For x² − 3x + c = 0:
| c | Discriminant | Root x₁ | Root x₂ |
|---|---|---|---|
| −10 | 49 | −2 | 5 |
| −4 | 25 | −1 | 4 |
| 0 | 9 | 0 | 3 |
| 2 | 1 | 1 | 2 |
| 2.25 | 0 | 1.5 | 1.5 |
| 5 | −11 | 1.5 ± 1.6583i | complex |
Raising c moves the parabola up. At c = 2.25 it just touches the axis, and above that it no longer crosses it.
Other ways to solve
- Factoring works when the roots are simple numbers: look for two numbers that multiply to c ÷ a and add to −b ÷ a.
- Completing the square rewrites ax² + bx + c as a(x − h)² + k, the vertex form, where (h, k) is the vertex.
- Graphing shows the roots as the points where the curve crosses the x-axis.
The formula always works, even when factoring is impractical.
A real-world example
A ball thrown upward at 48 feet per second from a height of 4 feet follows h = −16t² + 48t + 4. It hits the ground when h = 0: a = −16, b = 48, c = 4. The discriminant is 2,304 + 256 = 2,560, and the positive root is t = (−48 − √2,560) ÷ (−32) = 3.08 seconds. The vertex, at t = 1.5 s, gives the maximum height: 40 feet.
Precision and special cases
If a = 0, the equation is linear, bx + c = 0, with the single solution x = −c ÷ b. When b² is much larger than 4ac, computing both roots with the formula can lose precision; using the product of the roots, x₂ = c ÷ (a × x₁), gives a more accurate second root.