x² Quadratic Equation Solver

ax² + bx + c = 0

Roots (Solutions)

The Quadratic Formula

A quadratic equation has the form ax² + bx + c = 0, where a ≠ 0. The solutions (roots) are found using the quadratic formula.

x = (−b ± √(b² − 4ac)) / 2a
Discriminant D = b² − 4ac

Types of Roots (based on Discriminant)

D > 0
Two distinct real roots
D = 0
One repeated real root
D < 0
Two complex roots

The Quadratic Formula Derivation

The quadratic formula is derived by completing the square on the general form ax²+bx+c=0. Understanding the derivation makes the formula far more memorable.

Start: ax² + bx + c = 0
Divide by a: x² + (b/a)x + (c/a) = 0
Complete the square: x² + (b/a)x + (b/2a)² = (b/2a)² − c/a
(x + b/2a)² = (b² − 4ac) / 4a²
x + b/2a = ±√(b² − 4ac) / 2a
x = (−b ± √(b² − 4ac)) / 2a

The Discriminant — Nature of Roots

The discriminant D = b² − 4ac tells you everything about the nature of the solutions before solving:

Discriminant DNature of RootsGraphExample
D > 0Two distinct real rootsCrosses x-axis twicex²−5x+6=0 → x=2,3
D = 0One repeated real rootTouches x-axis oncex²−4x+4=0 → x=2
D < 0Two complex conjugate rootsNever crosses x-axisx²+x+1=0 → complex

Sum and Product of Roots

For ax²+bx+c=0 with roots x₁ and x₂ (Vieta's formulas):

Sum of roots: x₁ + x₂ = −b/a
Product of roots: x₁ × x₂ = c/a
Example: x²−5x+6=0 → Sum=5=5/1 ✓, Product=6=6/1 ✓

Worked Examples

Example 1: Two Real Roots

x² − 7x + 10 = 0 → a=1, b=−7, c=10
D = 49 − 40 = 9 > 0 (two real roots)
x = (7 ± √9)/2 = (7 ± 3)/2
x₁ = 5, x₂ = 2

Example 2: Complex Roots

x² + 2x + 5 = 0 → D = 4 − 20 = −16 < 0
x = (−2 ± √(−16))/2 = −1 ± 2i

Real-World Applications

  • Projectile motion: Time to hit the ground: 0 = h + vt − ½gt² is a quadratic in t
  • Area problems: "A rectangle is 3 m longer than it is wide, with area 40 m²" → x(x+3)=40 → x²+3x−40=0
  • Physics: Finding equilibrium points, circuit analysis (RLC circuits)
  • Economics: Break-even analysis, profit maximization (vertex of parabola)

Frequently Asked Questions

How do you solve x² - 5x + 6 = 0?
For a=1, b=−5, c=6: D = 25−24 = 1. x = (5±1)/2. So x₁ = 3, x₂ = 2. Check: (x−2)(x−3) = 0.
What is the discriminant?
The discriminant is D = b² − 4ac. It tells you the nature of the roots: D>0 gives two real roots, D=0 gives one repeated root, D<0 gives complex roots.
What if a=0 in a quadratic?
If a=0, the equation becomes linear (bx + c = 0), not quadratic. The quadratic formula requires a ≠ 0.