Gradient

Courses

∇\nabla∇The maths behind AI0/72
π\piπMaths0/84
⋆\star⋆AI for everyone0/10
Γ\GammaΓGame theory0/49
py\texttt{py}pyPython for AI0/15
y^\hat{y}y^​Build your own AI0/15
All courses

Tuition

My tuitionOlympiad trackCompetitions

Practice

ProjectsAsk a questionTrain on a GPUExplorationsMaths StoriesUnsolved problemsPlaygroundScience labsMock testsOlympiad

Reference

GlossaryBlogDiscoveries
Tools › Maths

Quadratic equation solver

Roots of ax² + bx + c = 0, with the discriminant and every step.

x = 3 or x = 2

  1. D = b² − 4ac = (-5)² − 4 × 1 × 6 = 1
  2. √D = 1
  3. x = (−b ± √D) / 2a = (5 ± 1) / 2
  4. x₁ = 3, x₂ = 2
  5. 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:

  1. D = b² − 4ac = (-5)² − 4 × 1 × 6 = 1
  2. √D = 1
  3. x = (−b ± √D) / 2a = (5 ± 1) / 2
  4. x₁ = 3, x₂ = 2
  5. 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

More maths tools

  • LCM and HCF calculator
  • Fraction simplifier
  • Percentage calculator
  • Simple interest calculator
  • Compound interest calculator
  • Mean, median and mode calculator