AI Quadratic Equation Solver

A quadratic equation has an x² term and can have two, one or no real solutions. This AI quadratic equation solver reads a, b and c from your equation, computes the discriminant and applies the quadratic formula so you can see exactly why you get the roots you do.

The quadratic formula and the discriminant

Any equation written as ax² + bx + c = 0 can be solved with the formula x = (−b ± √(b² − 4ac)) / 2a. The part under the root, D = b² − 4ac, is the discriminant, and it tells you what kind of answer to expect before you finish the calculation.

Discriminant Roots Parabola
D > 0 Two different real roots Crosses the x-axis twice
D = 0 One repeated real root Touches the x-axis once
D < 0 Two complex roots Does not reach the x-axis

Choosing a method

The formula always works, but it is not always the quickest. Factoring is fast when the numbers are small; completing the square is useful for finding the vertex. Compare all three methods in our guide on how to solve quadratic equations. If you need to break an expression into brackets, try the factoring calculator, and to see the parabola use the graphing solver.

Real-life quadratics

Quadratics model the arc of a thrown ball, the area of a rectangle with a fixed perimeter, the profit of a product at different prices and the shape of satellite dishes. In each case the roots tell you when the quantity hits zero and the vertex tells you its maximum or minimum.

Worked examples

Example 1: Solve x² − 5x + 6 = 0

  1. Identify a = 1, b = −5, c = 6.
  2. Discriminant: (−5)² − 4(1)(6) = 25 − 24 = 1, so there are two real roots.
  3. Formula: x = (5 ± 1) / 2.

Final answer: x = 3 or x = 2

Example 2: Solve 2x² + 3x − 2 = 0

  1. a = 2, b = 3, c = −2.
  2. D = 9 − 4(2)(−2) = 9 + 16 = 25, and √25 = 5.
  3. x = (−3 ± 5) / 4, giving 2/4 and −8/4.

Final answer: x = ½ or x = −2

Example 3: Solve x² + 2x + 5 = 0

  1. a = 1, b = 2, c = 5.
  2. D = 4 − 20 = −16, which is negative, so the roots are complex.
  3. x = (−2 ± √(−16)) / 2 = (−2 ± 4i) / 2.

Final answer: x = −1 ± 2i

Example 4: Solve x² − 6x + 9 = 0

  1. a = 1, b = −6, c = 9.
  2. D = 36 − 36 = 0, so there is one repeated root.
  3. x = 6 / 2 = 3. This is also (x − 3)² = 0.

Final answer: x = 3 (repeated)

Common mistakes to avoid

  • Writing the equation in a different order and then reading a, b, c from the wrong places; always rearrange to “= 0” first.
  • Forgetting that b = −5 means −b = +5 in the formula.
  • Dividing only the square root by 2a instead of the whole numerator.
  • Treating a negative discriminant as “no solution” when complex roots may be expected.
  • Losing the second root by ignoring the ± sign.

Frequently asked questions

What if there is no x term?

Then b = 0. For example x² − 9 = 0 gives x = ±3 directly, without needing the full formula.

What is a repeated root?

It is a single solution that counts twice, found when the discriminant is zero. The graph just touches the x-axis.

Does the solver show complex roots?

Yes. When the discriminant is negative it gives the answer in the form p ± qi.

Can I solve a quadratic by factoring instead?

Yes, when it factors neatly. Both methods give the same roots, and the formula works when factoring does not.

Related math tools and guides

Explore all math tools

AI-generated solutions are for learning purposes. Always verify important answers.