Cubic and polynomial equation solver
Factor out what you can, find a rational root, divide it out, repeat.
Try:
What counts as a cubic or polynomial equation?
A polynomial equation of degree n has at most n real roots. For cubics and beyond there are formulas, but they are unwieldy, so in practice you factor.
The Rational Root Theorem narrows the search: any rational root p/q must have p dividing the constant term and q dividing the leading coefficient. Once one root r is found, divide by (x − r) and solve the smaller polynomial. When there are no rational roots, EquationCraft finds the real roots numerically.
How to solve a polynomial equation
- Move everything to one side so it equals 0.
- Factor out the greatest common factor, including any power of x.
- Look for special forms: only even powers (substitute u = x²), sum or difference of cubes.
- Use the Rational Root Theorem to test candidates ±p/q.
- Divide out each root you find and repeat on the quotient.
- Solve the final quadratic with factoring or the quadratic formula.
Frequently asked questions
How many solutions does a cubic have?
Every cubic has at least one real root and at most three. Counting complex roots and repeats, a degree-n polynomial always has exactly n roots.
What is the Rational Root Theorem?
If a polynomial with integer coefficients has a rational root p/q in lowest terms, then p divides the constant term and q divides the leading coefficient. It gives a finite list of candidates to test.
What if none of the candidates work?
Then the polynomial has no rational roots and its real roots are irrational. They can be found numerically (for example with Newton’s method) or read from the graph.