Quadratic Equation Solver
Solve ax² + bx + c = 0: discriminant, nature of roots, exact surd roots, graph
- Compare with ax² + bx + c = 0a = 2, b = −5, c = 3
- Find the discriminant D = b² − 4acD = (−5)² − 4 × 2 × 3 = 25 − 24 = 1
- Nature of the rootsD = 1 > 0 and a perfect square (1²), so there are two distinct real roots, and they are rational.
- Use the quadratic formulax = (−b ± √D) / 2a = (5 ± √1) / 4√D = √1 = 1x = (5 + 1) / 4 = 6/4 = 3/2or x = (5 − 1) / 4 = 4/4 = 1
- Check with the relations between roots and coefficientsSum of roots = −b/a = 5/2Product of roots = c/a = 3/2
Find two numbers whose product is a × c = 2 × 3 = 6 and whose sum is b = −5: they are −2 and −3.
Set each factor to 0 to get the same roots: x = 3/2 or x = 1.
- Vertex form (completing the square): y = 2(x − 5/4)² − 1/8
- Axis of symmetry: x = 5/4; minimum value of y = −1/8
- The roots are where the parabola crosses the x-axis (y = 0).
Runs entirely in your browser. Nothing you type or upload is sent to us or stored.
Results are for general guidance. Please check anything important before relying on it. Terms of use
How to Use
- Write your equation in the form ax² + bx + c = 0 (bring every term to one side first).
- Enter a, b and c. Whole numbers, decimals and fractions such as 1/3 all work. Tap ± to make a number negative.
- The roots appear as you type, in exact form (fractions or surds such as (−1 ± √33)/4) and as decimals, with the discriminant and the nature of the roots.
- Scroll down for the step-by-step solution, the splitting-the-middle-term method when the roots are rational, and the graph of the parabola with its roots and vertex.
Solve any quadratic equation, with the working
A quadratic equation is any equation that can be written as ax² + bx + c = 0 with a ≠ 0. This quadratic equation solver finds both roots exactly, as fractions or in simplest surd form, and as decimals. It tells you the nature of the roots from the discriminant, and shows each line of the quadratic formula method as you would write it in a Class 10 answer. When the roots are rational it also shows the splitting-the-middle-term method, and for every equation it draws the parabola y = ax² + bx + c.
The quadratic formula
Sum of roots = −b/a, Product of roots = c/a
In India this is often called the Sridharacharya formula, after the mathematician Sridharacharya, who gave a method for it.
Nature of roots from the discriminant
| Discriminant D = b² − 4ac | Roots | Graph |
|---|---|---|
| D > 0 and a perfect square | Two distinct real roots, rational | Crosses the x-axis twice |
| D > 0, not a perfect square | Two distinct real roots, irrational (surds) | Crosses the x-axis twice |
| D = 0 | Two equal real roots, x = −b/2a | Touches the x-axis once |
| D < 0 | No real roots (two complex roots) | Doesn’t meet the x-axis |
The rational/irrational split applies when a, b and c are rational numbers, which they always are here. Decimals and fractions are cleared first by multiplying through.
Worked example 1: 2x² − 5x + 3 = 0
Here a = 2, b = −5 and c = 3. D = (−5)² − 4 × 2 × 3 = 25 − 24 = 1, a perfect square, so the roots are real, distinct and rational. x = (5 ± 1)/4, giving x = 3/2 or x = 1. Check: sum = 5/2 = −b/a and product = 3/2 = c/a.
By splitting the middle term: we need two numbers with product a × c = 6 and sum b = −5, which are −2 and −3. So 2x² − 2x − 3x + 3 = 2x(x − 1) − 3(x − 1) = (2x − 3)(x − 1) = 0.
Worked example 2: 2x² + x − 4 = 0
D = 1² − 4 × 2 × (−4) = 1 + 32 = 33, which is positive but not a perfect square, so the roots are irrational: x = (−1 ± √33)/4, about 1.186141 and −1.686141. Surds are simplified where possible, so for x² + 2x − 7 = 0 you get √32 = 4√2 and x = −1 ± 2√2.
When D is negative
For x² + x + 1 = 0, D = 1 − 4 = −3. In Class 10 the answer is “no real roots”. In Class 11 you meet complex numbers, where √−3 = √3 i, so x = (−1 ± √3 i)/2. The solver shows both readings.
Vertex and graph
The graph of y = ax² + bx + c is a parabola that opens upwards when a > 0 and downwards when a < 0. Its turning point (vertex) is at x = −b/2a, and the y-value there is −D/4a, the minimum or maximum value of the expression. Writing the equation as y = a(x − h)² + k (completing the square) shows the vertex (h, k) directly: x² − 4x + 3 = (x − 2)² − 1, so its lowest point is (2, −1).
Tips
- Move everything to one side first: x² = 5x − 6 becomes x² − 5x + 6 = 0, so a = 1, b = −5, c = 6.
- If a = 0 the equation is linear (bx + c = 0); the solver says so and gives x = −c/b.
- Exact surd simplification is complete for discriminants up to 1015, which covers every textbook problem.