Cubic Equation Calculator

Cubic Equation

Cubic Equation Calculation Method

Equation

Cardano's formula

x1 = -3
x2 = 1
x3 = 2

About This Calculator

A cubic equation ax³ + bx² + cx + d = 0 always has at least one real root, because its degree is odd. Substituting x = t − b/3a removes the squared term and leaves the depressed form t³ + pt + q = 0, to which Cardano applies.

When all three roots are real, the trigonometric branch of the method is used. For example x³ − 7x + 6 = 0 has the roots 1, 2 and −3, while x³ − 8 = 0 has the real root 2 and the complex pair −1 ± 1.732i.

Every cubic has at least one real root, so unlike the quadratic there is no case without a real solution. x³ − 6x² + 11x − 6 factors as (x − 1)(x − 2)(x − 3), giving roots 1, 2 and 3 whose sum is 6 and product is 6. Cardano published the general method in 1545, building on results Tartaglia and del Ferro had kept secret.

Key Formula:t³ + pt + q = 0 · p = c/a − b²/3a² · q = 2b³/27a³ − bc/3a² + d/a

Frequently Asked Questions

Does a cubic always have a real root?

Yes. Every polynomial of odd degree with real coefficients has at least one real root, because its graph runs from −∞ to +∞ and must cross the x-axis. The other two roots may be real or a complex conjugate pair.

Why does Cardano run into complex numbers with three real roots?

That is the irreducible case: the intermediate square root is taken of a negative number even though all answers are real. The calculator avoids imaginary intermediate values by using the trigonometric form instead.

What is the discriminant of a cubic?

For ax³ + bx² + cx + d it is 18abcd − 4b³d + b²c² − 4ac³ − 27a²d². A positive value means three distinct real roots, zero means a repeated root, and negative means one real root with two complex conjugates.

Why does the formula change form depending on the discriminant?

The straightforward Cardano form needs square roots of negative numbers in the three-real-root case. The trigonometric branch replaces them with cosines, so both give the same answer while only the second avoids complex arithmetic.