Quadratic Equation Solver: Roots & Discriminant
A quadratic equation has the standard form ax² + bx + c = 0, where a ≠ 0. This calculator finds the two roots (x₁ and x₂) and the discriminant (Δ = b² − 4ac) instantly. The discriminant tells you the nature of the roots before you solve: if Δ > 0 there are two distinct real roots, if Δ = 0 there is exactly one repeated real root, and if Δ < 0 the roots are complex conjugates. Use it whenever you need to factor a parabola, find where a projectile hits the ground, or solve any real-world optimization problem that reduces to a second-degree polynomial.
When to use this calculator
- Determine the two moments in time when a ball thrown upward at 20 m/s from a 5 m platform hits the ground: −5t² + 20t + 5 = 0.
- Find the break-even quantities for a business with revenue R(x) = −2x² + 80x − 600 by solving −2x² + 80x − 600 = 0.
- Calculate the dimensions of a rectangular garden with area 36 ft² and perimeter 26 ft, reducing to x² − 13x + 36 = 0.
- Verify whether a conic section is a real ellipse or complex (no real intersection) by checking the discriminant sign before plotting.
- Solve for the resistor value in an RLC circuit resonance equation that simplifies to a quadratic in terms of frequency.
Example Calculation
- a=1, b=-5, c=6
- x1=3, x2=2
How it works
2 min readHow It's Calculated
The quadratic formula derives from completing the square on the general form ax² + bx + c = 0:
Step 1 — Compute the discriminant:
Δ = b² − 4ac
Step 2 — Apply the quadratic formula:
x₁ = (−b + √Δ) / (2a)
x₂ = (−b − √Δ) / (2a)
Step 3 — Interpret Δ:
Δ > 0 → two distinct real roots
Δ = 0 → one repeated real root: x = −b / (2a)
Δ < 0 → two complex conjugate roots: x = −b/(2a) ± i·√|Δ|/(2a)Vieta's formulas provide a useful double-check:
x₁ + x₂ = −b / a
x₁ · x₂ = c / a---
Reference Table
| Δ value | Root type | Example equation | Roots |
|---|---|---|---|
| Δ > 0 (perfect square) | 2 rational reals | x² − 5x + 6 = 0 (Δ=1) | x=3, x=2 |
| Δ > 0 (non-perfect square) | 2 irrational reals | x² − 4x + 1 = 0 (Δ=12) | x=2±√3 |
| Δ = 0 | 1 repeated real | x² − 6x + 9 = 0 (Δ=0) | x=3 (double) |
| Δ < 0 | 2 complex conjugates | x² + x + 1 = 0 (Δ=−3) | x=−½ ± i√3/2 |
---
Typical Examples
Example 1 — Two distinct rational roots
Equation: x² − 5x + 6 = 0 (a=1, b=−5, c=6)
Example 2 — One repeated root
Equation: x² − 6x + 9 = 0 (a=1, b=−6, c=9)
Example 3 — Complex roots
Equation: x² + 2x + 5 = 0 (a=1, b=2, c=5)
---
Common Mistakes
1. Forgetting that a ≠ 0. If a=0 the equation is linear (bx + c = 0), not quadratic. The formula produces division by zero.
2. Sign errors on b. The formula uses −b in the numerator. If b=−5, then −b=+5. Mixing this up shifts both roots by 2b/a.
3. Not distributing 4ac correctly. With a=2, b=3, c=−2: 4ac = 4·2·(−2) = −16, so Δ=9−(−16)=25, NOT 9−16=−7.
4. Dividing only the square root by 2a instead of the whole numerator. The correct form is (−b ± √Δ) / (2a), not −b ± √Δ / (2a).
5. Assuming Δ<0 means no solution. There are always two complex conjugate solutions in ℂ; the equation has no real solutions, but it is fully solvable in the complex number system.
6. Using the formula when the equation isn't in standard form. Always rearrange to ax²+bx+c=0 before identifying a, b, c. E.g., 3x²=5x−2 becomes 3x²−5x+2=0 (c=+2, not −2).
---
Related Calculators
Since no related slugs were provided for this calculator, explore other math tools on Hacé Cuentas for polynomial operations, complex number arithmetic, and systems of equations.
Frequently asked questions
What does the discriminant tell me about the graph of the parabola?
The discriminant Δ = b²−4ac reveals exactly how the parabola y = ax²+bx+c intersects the x-axis. Δ > 0 means two x-intercepts (the parabola crosses the axis twice). Δ = 0 means the vertex touches the x-axis at exactly one point. Δ < 0 means the parabola floats entirely above (a>0) or below (a<0) the x-axis — no real crossings.
Can I use this calculator if a is negative?
Yes. A negative leading coefficient (a < 0) produces a downward-opening parabola but the quadratic formula works identically. Example: −x²+4x−3=0 gives Δ=16−12=4, x₁=1, x₂=3. Just make sure you enter a=−1, not a=1.
Why does completing the square give the same result as the quadratic formula?
The quadratic formula IS the result of completing the square on the general form. Starting from ax²+bx+c=0, divide by a, move c/a, add (b/2a)² to both sides, and simplify the right side — you get (x + b/2a)² = Δ/(4a²), which yields x = (−b ± √Δ)/(2a). The formula is simply a pre-solved version of completing the square.
What are Vieta's formulas and when should I use them?
Vieta's formulas state that for ax²+bx+c=0, x₁+x₂ = −b/a and x₁·x₂ = c/a. They let you verify roots without re-plugging into the equation. For example, if x₁=3 and x₂=2 with a=1,b=−5,c=6: sum = 5 = −(−5)/1 ✔ and product = 6 = 6/1 ✔. They're also used to factor polynomials and build new equations with desired roots.
How do I handle complex roots in practice?
When Δ < 0, write √Δ = i·√|Δ|, so x = −b/(2a) ± i·√|Δ|/(2a). The real part −b/(2a) is the x-coordinate of the parabola's vertex; the imaginary part ±√|Δ|/(2a) measures how far the parabola's vertex is from the axis. In electrical engineering, complex roots of characteristic equations correspond to oscillatory (sinusoidal) responses in RLC circuits.
Is there a cubic or quartic equivalent of the quadratic formula?
Yes. Cardano's formula (1545) solves cubic equations ax³+bx²+cx+d=0, and Ferrari's method solves quartic equations. However, by the Abel–Ruffini theorem (proven 1824), there is no general algebraic formula using radicals for polynomials of degree 5 or higher. For degree ≥ 5, numerical methods (Newton–Raphson, Durand–Kerner) are used instead.
How does the quadratic formula appear in real physics problems?
Projectile motion under constant gravity gives h(t) = h₀ + v₀t − ½gt². Setting h=0 yields a quadratic in t where a=−½g (≈−4.9 m/s² on Earth), b=v₀, c=h₀. Only the positive root is physically meaningful. Similarly, stopping distance in kinematics, lens focal-length equations, and electric potential problems routinely reduce to quadratic equations solved by this formula.
What happens if b = 0 and c = 0?
If b=0 and c=0, the equation is ax²=0, giving the double root x=0 (Δ=0). If only c=0 (b≠0), then ax²+bx=0 factors as x(ax+b)=0, giving roots x=0 and x=−b/a — both rational. These edge cases are handled correctly by the formula: Δ=b², so x=(−b±|b|)/(2a).