Polynomial Roots Calculator Formula

Understand the math behind the polynomial roots calculator. Each variable explained with a worked example.

Formulas Used

Sum Roots

sum_roots = a != 0 ? -b / a : 0

Sum Products Pairs

sum_products_pairs = a != 0 ? c / a : 0

Product Roots

product_roots = a != 0 ? -d / a : 0

Discriminant

discriminant = a != 0 ? 18*a*b*c*d - 4*pow(b,3)*d + pow(b,2)*pow(c,2) - 4*a*pow(c,3) - 27*pow(a,2)*pow(d,2) : 0

Variables

VariableDescriptionDefault
aCoefficient a (x³)1
bCoefficient b (x²)-6
cCoefficient c (x)11
dCoefficient d (constant)-6

How It Works

Polynomial Roots via Vieta's Formulas

For a Cubic ax³ + bx² + cx + d = 0

Vieta's formulas relate the roots (r₁, r₂, r₃) to the coefficients:

  • r₁ + r₂ + r₃ = -b/a (sum of roots)
  • r₁r₂ + r₁r₃ + r₂r₃ = c/a (sum of pairwise products)
  • r₁r₂r₃ = -d/a (product of roots)
  • Discriminant

    The discriminant tells you about the nature of the roots:

  • Δ > 0: three distinct real roots
  • Δ = 0: a repeated root
  • Δ < 0: one real root and two complex conjugate roots
  • Worked Example

    Analyze x³ - 6x² + 11x - 6 = 0 (roots are 1, 2, 3).

    a = 1b = -6c = 11d = -6
    1. 01Sum of roots = -(-6)/1 = 6 (= 1+2+3)
    2. 02Sum of pairwise products = 11/1 = 11 (= 1×2+1×3+2×3)
    3. 03Product of roots = -(-6)/1 = 6 (= 1×2×3)

    Ready to run the numbers?

    Open Polynomial Roots Calculator