Quadratic Equations
The calculator solves ax² + bx + c = 0 using the discriminant: exact roots with simplified radicals, complex roots and a check with Vieta's formulas.
The quadratic equation solver solves ax² + bx + c = 0 using the discriminant with a detailed solution: it finds exact roots (with simplified radicals such as −1 ± √3), complex roots when D < 0, checks the answer with Vieta's formulas and factors the quadratic.
The quadratic formula
D = b2 − 4ac, x1,2 = −b ± √D/2a
| Discriminant | Roots |
|---|---|
| D > 0 | two distinct real roots |
| D = 0 | one root x = −b / (2a) |
| D < 0 | no real roots (two complex roots) |
Example. x2 − 5x + 6 = 0
D = (−5)2 − 4 · 1 · 6 = 25 − 24 = 1
x1 = 5 − 1/2 = 2, x2 = 5 + 1/2 = 3
Vieta's formulas
For the roots of x2 + px + q = 0:
x1 + x2 = −p, x1 · x2 = q
They are handy for checking an answer and for guessing whole-number roots: for x2 − 5x + 6 = 0 you need two numbers with sum 5 and product 6 — that is 2 and 3.
Incomplete quadratic equations
- c = 0: ax2 + bx = 0 ⇒ x(ax + b) = 0 ⇒ x = 0 or x = −b/a.
- b = 0: ax2 + c = 0 ⇒ x2 = −c/a; there are roots only if −c/a ≥ 0.
Fractional coefficients
If the coefficients are fractions or decimals, the calculator first multiplies the equation by a common denominator to work with whole numbers — the roots do not change: 0.5x2 − 1.5x + 1 = 0 ⇔ x2 − 3x + 2 = 0.