Cubic Equation Solver
Find all three roots of ax³+bx²+cx+d=0 using the depressed-cubic method, including complex roots.
Inputs
Must be non-zero
Root 1
3
Root 2
1
Root 3
2
Discriminant
4.000000
Step by step
Values used
a (x³ coefficient) = 1; b (x² coefficient) = -6; c (x coefficient) = 11; d (constant) = -6
Depressed cubic substitution
x = t − b/(3a)
Reduced coefficients
p = (3ac − b²)/(3a²), q = (2b³ − 9abc + 27a²d)/(27a³)
Root 1
= 3
Root 2
= 1
Root 3
= 2
Discriminant
= 4.000000
How it works
This solver uses the depressed-cubic (Cardano/trigonometric) method. The equation ax³+bx²+cx+d=0 is first reduced to t³+pt+q=0 by substituting x = t − b/(3a). Then the discriminant Δ = −4p³ − 27q² determines the root structure: Δ > 0 gives three distinct real roots (trigonometric solution), Δ = 0 gives a repeated root, and Δ < 0 gives one real and two complex conjugate roots (Cardano's formula).
Formulas
Depressed cubic substitution
x = t − b/(3a)
- t
- New variable
- b
- x² coefficient
- a
- x³ coefficient
Reduced coefficients
p = (3ac − b²)/(3a²), q = (2b³ − 9abc + 27a²d)/(27a³)
- p
- Linear coefficient of depressed cubic
- q
- Constant of depressed cubic
Frequently Asked Questions
What is the depressed cubic method?
It removes the x² term via a linear substitution x = t − b/(3a), reducing the equation to t³ + pt + q = 0, which can be solved by Cardano's formula or the trigonometric method.
When are the roots complex?
When the inner discriminant q²/4 + p³/27 > 0, there is one real root and a pair of complex conjugate roots.