About the Polynomial Solver
What is the Polynomial Solver?
A polynomial equation sets a sum of powers of x equal to zero. This solver handles cubic equations ax³ + bx² + cx + d = 0 — and, by setting the leading coefficients to 0, quadratic and linear equations too. A cubic always has three roots when complex and repeated roots are counted, and at least one of them is real.
Instead of guessing, the solver uses the closed-form Cardano / trigonometric method: it reduces the cubic to the depressed form t³ + pt + q = 0, uses the discriminant to decide between one real root and three, and then computes every root directly.
How to use the Polynomial Solver
- a (coefficient of x³) — set to 0 to solve a quadratic (and a = b = 0 for a linear equation). (sample: 1)
- b (coefficient of x²) (sample: -6)
- c (coefficient of x) (sample: 11)
- d (constant) — the constant term. (sample: -6)
- Press Find Roots (results also refresh as you type). The result card shows the Roots, along with Degree, Real roots found, Real root 1 and Real root 2.
Formula used
x = t − b ÷ 3a, where t³ + pt + q = 0
- p = c/a − b²/(3a²)
- q = 2b³/(27a³) − bc/(3a²) + d/a
- Δ = (q/2)² + (p/3)³, the discriminant
If Δ > 0 there is one real root and two complex roots; if Δ = 0 all roots are real and at least two are equal; if Δ < 0 there are three different real roots, found using cosines.
Worked example
These are the sample values already filled in the calculator above, and the result it returns for them:
| Input | Sample value |
|---|---|
| a (coefficient of x³) | 1 |
| b (coefficient of x²) | -6 |
| c (coefficient of x) | 11 |
| d (constant) | -6 |
| Result | Value |
|---|---|
| Roots | 1, 2, 3 |
| Degree | 3 |
| Real roots found | 3 |
| Real root 1 | 1 |
| Real root 2 | 2 |
| Real root 3 | 3 |
Tips for using the Polynomial Solver
- Rational root test: any rational root of a polynomial with whole-number coefficients equals a factor of d divided by a factor of a.
- Once you know one root r, divide the cubic by (x − r) to get a quadratic for the other two.
- Complex roots of real polynomials always come in conjugate pairs, such as −0.5 ± 0.866i.
