Polynomial Roots Calculator
Degree 1–6 · Real & Complex Roots · Cardano · Ferrari · Durand-Kerner
Find all real and complex roots of polynomials up to degree 6. Exact formulas for degrees 1–4, numerical Durand-Kerner for 5–6. See factored form, Vieta's formulas, discriminant, and graph.
Quick Examples
Roots
| # | Real Part | Imaginary Part | Value | Type |
|---|
Factored Form
Vieta's Formulas Verification
Graph of p(x)
No real roots — the polynomial does not cross the x-axis.
Calculate roots first, then switch to Graph tab to view.
Step-by-Step Solution
Calculate roots first, then return here for step-by-step details.
What Is a Polynomial and Its Roots?
A polynomial is an algebraic expression of the form p(x) = aₙxⁿ + aₙ₋₁xⁿ⁻¹ + … + a₁x + a₀, where the coefficients aₙ, …, a₀ are real (or complex) numbers and aₙ ≠ 0. The degree of the polynomial is the highest power n with a non-zero coefficient. A root (or zero) of the polynomial is a value r such that p(r) = 0. Geometrically, real roots correspond to x-intercepts of the graph y = p(x).
The Fundamental Theorem of Algebra
The Fundamental Theorem of Algebra, proved rigorously by Carl Friedrich Gauss in 1799, guarantees that every non-constant polynomial with complex coefficients has at least one complex root. As a consequence, a degree-n polynomial has exactly n roots counted with multiplicity in the complex numbers. This means:
- A linear polynomial (degree 1) has exactly 1 root.
- A quadratic (degree 2) has exactly 2 roots.
- A cubic (degree 3) has exactly 3 roots.
- And so on up to degree 6 with exactly 6 roots.
For polynomials with real coefficients, the Complex Conjugate Root Theorem guarantees that complex roots appear in conjugate pairs a ± bi. This means real polynomials of odd degree always have at least one real root.
Solving by Degree: Formulas and Methods
Degree 1 — Linear
For ax + b = 0, the unique root is simply x = −b/a. Linear equations are always solvable with basic arithmetic.
Degree 2 — Quadratic Formula
The quadratic formula for ax² + bx + c = 0, derived by completing the square, gives:
x = (−b ± √(b²−4ac)) / (2a)
The expression Δ = b²−4ac is the discriminant. When Δ > 0 there are two distinct real roots; when Δ = 0 there is one repeated root; when Δ < 0 there are two complex conjugate roots.
Degree 3 — Cardano's Formula
Cardano's formula, published by Gerolamo Cardano in Ars Magna (1545) based on work by Niccolò Tartaglia and Scipione del Ferro, solves the general cubic ax³ + bx² + cx + d = 0. The method first depresses the cubic by substituting x = t − b/(3a), yielding t³ + pt + q = 0 where:
- p = (3ac − b²) / (3a²)
- q = (2b³ − 9abc + 27a²d) / (27a³)
The discriminant of the cubic is Δ = −4p³ − 27q². When Δ > 0 there are three distinct real roots and the trigonometric method avoids complex cube roots. When Δ = 0 there is a repeated root. When Δ < 0 there is one real and two complex conjugate roots, solved directly by Cardano's cube root formula.
Degree 4 — Ferrari's Method
Ferrari's method, discovered by Lodovico Ferrari (a student of Cardano), reduces the quartic to a resolvent cubic. The quartic x⁴ + bx³ + cx² + dx + e = 0 is solved by introducing an auxiliary variable y, completing a square, and finding y from a cubic equation, then factoring the quartic into two quadratics. This calculator uses Ferrari's resolvent combined with Cardano's cubic to find all four roots exactly.
Degrees 5–6 — Abel-Ruffini Theorem & Numerical Methods
The Abel-Ruffini theorem (proven by Ruffini in 1799 and Abel in 1824) establishes that there is no general closed-form algebraic formula for degree 5 or higher. For these degrees, this calculator uses the Durand-Kerner method (also known as Weierstrass' method), which simultaneously iterates all n initial approximations toward the n roots. Starting from roots of unity scaled by a heuristic radius, each iteration refines all roots together. The method converges quadratically and typically reaches machine precision within 50 iterations.
Vieta's Formulas
Named after the French mathematician François Viète, Vieta's formulas relate the coefficients of a polynomial directly to symmetric functions of its roots. For p(x) = aₙ(x−r₁)(x−r₂)…(x−rⁿ):
- Sum of roots: r₁ + r₂ + … + rⁿ = −aₙ₋₁ / aₙ
- Sum of products of pairs: ∑r₁r₂ = aₙ₋₂ / aₙ
- Product of all roots: r₁·r₂·…·rⁿ = (−1)ⁿ · a₀ / aₙ
These allow quick verification: after computing roots, check that their sum and product match the coefficient ratios.
Applications of Polynomial Root-Finding
- Physics & Engineering: Natural frequencies of vibrating systems, poles of transfer functions in control theory, and eigenvalue problems in structural analysis all reduce to polynomial root problems.
- Computer Graphics: Ray-tracing intersections with surfaces (spheres, toroids) require solving quartic equations.
- Economics: Internal rate of return (IRR) calculations reduce to polynomial equations in (1+r).
- Signal Processing: Filter design requires finding roots of characteristic polynomials to place poles and zeros.
- Numerical Analysis: Polynomial root-finding underlies eigenvalue algorithms, Gaussian quadrature node computation, and iterative methods.
- Curve Fitting: Polynomial interpolation and regression produce polynomials whose roots identify zero-crossings of fitted models.
Reference: Discriminant Interpretation
| Degree | Discriminant Δ | Root Types |
|---|---|---|
| 2 | Δ = b²−4ac > 0 | Two distinct real roots |
| 2 | Δ = 0 | One repeated real root |
| 2 | Δ < 0 | Two complex conjugate roots |
| 3 | Δ > 0 | Three distinct real roots |
| 3 | Δ = 0 | Repeated root (at least one) |
| 3 | Δ < 0 | One real, two complex conjugate roots |