Quadratic equation solver
Roots of ax² + bx + c = 0, with the discriminant and every step.
x = 3 or x = 2
- D = b² − 4ac = (-5)² − 4 × 1 × 6 = 1
- √D = 1
- x = (−b ± √D) / 2a = (5 ± 1) / 2
- x₁ = 3, x₂ = 2
- D > 0, so there are two different real roots.
How it works
A quadratic equation has x² as its highest power. The formula x = (−b ± √D) / 2a gives its roots, where D = b² − 4ac is the discriminant.
D tells you the kind of roots before you work them out: positive means two different real roots, zero means two equal roots, negative means no real roots.
Worked example
With a = 1, b = -5, c = 6:
- D = b² − 4ac = (-5)² − 4 × 1 × 6 = 1
- √D = 1
- x = (−b ± √D) / 2a = (5 ± 1) / 2
- x₁ = 3, x₂ = 2
- D > 0, so there are two different real roots.
Answer: x = 3 or x = 2
Questions
- What if a is 0?
- Then the x² term disappears and the equation is linear, bx + c = 0, with one root x = −c/b.
- Can I use it for board exam answers?
- Use it to check your work. In the exam, write the same steps shown here: D first, then the formula.
Learn the method properly
The chapter behind this tool, with animations, an experiment and an AI tutor who checks each step you write.
Open the chapter