Cubic Equation Solver
Solve any cubic equation ax³ + bx² + cx + d = 0 for its real and complex roots using Cardano's method.
Solve ax³ + bx² + cx + d = 0
Roots
x1
2
x2
-1 + 1.7321i
x3
-1 − 1.7321i
What is a cubic equation?
A cubic equation has the form ax³ + bx² + cx + d = 0, where a ≠ 0. Depending on its coefficients it can have one real root and two complex conjugate roots, or three real roots. This solver uses Cardano's method with a trigonometric fallback for three-real-root cases.
Method
Discriminant Δ = (q/2)² + (p/3)³
Δ > 0: one real root; Δ < 0: three real roots; Δ = 0: repeated roots
Example
For x³ − 8 = 0 (a=1, b=0, c=0, d=−8), the real root is x = 2. Complex cases appear whenever Δ > 0, and you'll see the two conjugate roots in the result.
Common Use Cases
- Finding roots of polynomials in algebra and calculus.
- Modeling volume, growth, and physics problems.
- Checking factorisations by locating real roots.
FAQs
Why do I sometimes get complex roots?
A cubic always has three roots (counting multiplicity). When the discriminant is positive, only one is real and the other two are complex conjugates — the tool shows all of them.
What if a = 0?
The equation is no longer cubic. The solver degrades gracefully to a quadratic/linear solve so you still get the available real roots.
