Quadratic equation solver
Solves ax² + bx + c = 0 and shows the roots and the discriminant.
anındahesapla Editör Ekibi · Updated:
x₁ = 3 · x₂ = 2. These are the roots of x² − 5x + 6 = 0, where the coefficients are 1, −5 and 6. The discriminant comes out as 1, which is positive, so the equation has two distinct real roots.
Quadratics show up in projectile paths, area problems, profit curves and physics formulas. Solving them by factoring works for neat numbers. The formula works for every case, and the solver applies it while showing the discriminant so the type of answer is clear.
Result
x₁ = 3, x₂ = 2
x₁ = 3 · x₂ = 2
Result in all units
Step-by-step solution
x = (−b ± √(b²−4ac)) / 2a
Quadratic equations and their roots
A quadratic equation has the form ax² + bx + c = 0, with a not equal to zero. Its graph is a parabola. Its roots are the points where the parabola crosses the horizontal axis.
How many real roots exist depends on the discriminant, b² − 4ac. Positive means two distinct roots. Zero means one repeated root, where the parabola just touches the axis. Negative means no real roots, and the solutions are complex numbers.
Both roots come at once from the quadratic formula: x equals minus b, plus or minus the square root of the discriminant, all divided by 2a. Using plus gives one root, and minus gives the other.
Factoring is a shortcut when the roots are whole numbers. Here the expression splits into (x − 3)(x − 2), and each bracket set to zero gives a root. Many equations do not factor neatly, which is where the formula earns its use.
Roots also reveal the coefficients. Their sum equals minus b over a, and their product equals c over a. That gives a quick check: 3 plus 2 is 5, and 3 times 2 is 6.
If a is zero the equation is linear, not quadratic, and has a single solution found by simple rearrangement.
Physics gives a classic example. The height of a ball thrown upward follows a quadratic in time. Setting the height to zero and solving gives the moment it lands, and the larger root is the answer that makes physical sense.
Halfway between the roots lies the vertex of the parabola. Its horizontal position is minus b over 2a, which gives the maximum or minimum of the expression without solving anything further.
How to solve
First the solver computes the discriminant, then applies x = (−b ± √disc) / 2a.
- Enter coefficient a.
- Enter coefficient b, including its sign.
- Enter coefficient c.
- Read both roots and the discriminant.
| Input or result | Value |
|---|---|
| a | 1 |
| b | −5 |
| c | 6 |
| Discriminant | 1 |
| x₁ | 3 |
| x₂ | 2 |
Signs cause most errors. A term written as −5x means b is −5, and minus b in the formula then becomes plus 5.
Before typing anything, move every term to one side so that zero stands alone on the other. Skipping this step gives wrong values for a, b and c.