What this quadratic solver does
This tool solves any quadratic equation of the form ax² + bx + c = 0 where a ≠ 0. It computes the discriminant, classifies the roots (two distinct real, one repeated real, or two complex conjugates), applies the quadratic formula, and shows each step of the working. The roots are reported in exact form where possible — fractions and simplified radicals — alongside their decimal approximations. The solution is completed with a verification check via Vieta's formulas and by substitution back into the original equation.
Formulas
Variable definitions
- a — coefficient of x². Must be non-zero for the equation to be quadratic.
- b — coefficient of x.
- c — constant term.
- D — discriminant. Determines the nature of the roots.
- x₁, x₂ — the two roots of the equation.
The three cases of the discriminant
- D > 0 — two distinct real roots. The parabola crosses the x-axis at two different points.
- D = 0 — one repeated real root (called a double root). The parabola touches the x-axis at a single point (its vertex).
- D < 0 — two complex conjugate roots, of the form p ± qi. The parabola does not cross the x-axis.
Worked examples
Example 1: x² − 5x + 6 = 0 (two real roots)
- Identify a = 1, b = −5, c = 6.
- Discriminant: D = (−5)² − 4 × 1 × 6 = 25 − 24 = 1. D > 0 → two distinct real roots.
- Apply the formula: x = (5 ± √1) / 2 = (5 ± 1) / 2.
- Roots: x₁ = 6 / 2 = 3, x₂ = 4 / 2 = 2.
- Check by Vieta: x₁ + x₂ = 5 = −b/a ✓, x₁ × x₂ = 6 = c/a ✓.
Example 2: x² − 6x + 9 = 0 (one repeated root)
- a = 1, b = −6, c = 9.
- Discriminant: D = (−6)² − 4 × 1 × 9 = 36 − 36 = 0. D = 0 → one repeated real root.
- x = (6 ± 0) / 2 = 3.
- The quadratic factors as (x − 3)² = 0, so x = 3 is a double root.
Example 3: x² + 4x + 13 = 0 (complex roots)
- a = 1, b = 4, c = 13.
- Discriminant: D = 4² − 4 × 1 × 13 = 16 − 52 = −36. D < 0 → complex conjugate roots.
- x = (−4 ± √−36) / 2 = (−4 ± 6i) / 2.
- Roots: x₁ = −2 + 3i, x₂ = −2 − 3i.
Example 4: 2x² + 7x − 4 = 0 (irrational roots)
- a = 2, b = 7, c = −4.
- Discriminant: D = 49 − 4 × 2 × (−4) = 49 + 32 = 81. D > 0 → two distinct real roots, and 81 is a perfect square.
- x = (−7 ± √81) / 4 = (−7 ± 9) / 4.
- Roots: x₁ = 2 / 4 = 1/2, x₂ = −16 / 4 = −4.
Example 5: x² − 2x − 1 = 0 (surds)
- a = 1, b = −2, c = −1.
- Discriminant: D = 4 + 4 = 8. D > 0 but not a perfect square → irrational roots.
- x = (2 ± √8) / 2 = (2 ± 2√2) / 2 = 1 ± √2.
- Exact roots: 1 + √2 and 1 − √2. Decimals ≈ 2.41421356 and −0.41421356.
Where quadratics appear in Class 9 & 10
Quadratic equations are one of the biggest topics in the Punjab board mathematics syllabus:
- Factorisation — the main technique for solving quadratics when the roots are integers.
- Completing the square — an alternative method that leads to the quadratic formula itself.
- Word problems — projectile motion, area problems, and rate problems all produce quadratics.
- Graphing parabolas — the roots are where the parabola crosses the x-axis.
- Physics — equations of motion like s = ut + ½at² are quadratic in t.
Common mistakes to avoid
- Forgetting the minus sign in front of b. The formula has −b, not b. If b is −5, then −b = +5. Sign errors are the biggest cause of wrong answers.
- Dividing only part of the numerator by 2a. The whole numerator (−b ± √D) is divided by 2a, not just the radical.
- Dropping the ± sign. Both signs must be evaluated. This gives the two roots. If you only take +, you get one root and lose half the marks.
- Assuming D < 0 means "no solution". It means no real solution. Complex roots exist and are the correct answer in Class 10 algebra (and in physics).
- Misreading the sign of c. If the equation is x² + 3x − 5 = 0, then c = −5, not 5. Plug −5 into −4ac, and the product becomes +20.
- Applying the formula when a = 0. If a = 0, the equation is linear, not quadratic. Use bx + c = 0 → x = −c/b.
- Not simplifying the roots. Answers like (4 + √12) / 2 should be simplified to 2 + √3. Leaving them unsimplified costs marks.
FAQ
What is the quadratic formula?
For a quadratic equation ax² + bx + c = 0 with a ≠ 0, the solutions are x = (−b ± √(b² − 4ac)) / (2a). This formula gives every real or complex root of the equation.
What does the discriminant tell you?
The discriminant is D = b² − 4ac. If D > 0, the equation has two distinct real roots. If D = 0, it has one repeated real root. If D < 0, it has two complex conjugate roots.
What if a is zero?
If a = 0, the equation is not quadratic; it degenerates to a linear equation bx + c = 0. This calculator rejects a = 0 and asks you to use the linear equation solver instead.
What are Vieta's formulas?
Vieta's formulas relate the roots x₁, x₂ of ax² + bx + c = 0 to the coefficients: x₁ + x₂ = −b/a and x₁ × x₂ = c/a. These give a quick way to check the roots.
Can a quadratic have only one solution?
Yes — when the discriminant is zero. The quadratic then factors as a perfect square, for example x² − 6x + 9 = (x − 3)² = 0, which has the single repeated root x = 3 (counted twice).
How do I factor a quadratic mentally?
Look for two numbers whose product is a × c and whose sum is b. If you find them, the quadratic factors as a(x + p)(x + q) where p and q are those two numbers divided by a. Not all quadratics factor over the integers, so the quadratic formula is the universal method.
Related tools
Related Hira Academy resources
Quadratic equations are a major topic in Class 10 mathematics. Revise factorisation, completing the square, and the quadratic formula with our free Class 9 notes and Class 10 notes.