A cubic equation is a polynomial equation in which the highest occurring power of the unknown x is the third power. An example is the equation
2x3 - 4x2 + 3x - 4 = 0
and the general form may be written as
a3x3 + a2x2 + a1x + a0 = 0
where we assume that the coefficients a0,...,a3 are real numbers with a3 being non-zero.

Solving a cubic equation amounts to finding the rootss of a cubic function. Every cubic equation has at least one solution x among the real numbers. The following qualitatively different cases are possible:

  • Three different real solutions
  • Two real solutions, one of them is a double solution
  • A single real solution which is a triple solution
  • A single real solution and a pair of complex conjugate solutions which are complex numbers.
The discriminant can be used to quickly decide whether the equation has multiple solutions.

The solutions can be found with the following method due to Tartaglia and published by Gerolamo Cardano in 1545.

We first divide the given equation by a3 to arrive at an equation of the form

x3 + ax2 + bx + c = 0
The substitution x = t - a/3 eliminates the quadratic term and we get at a cubic equation of the form
t3 + pt + q = 0.         (1)
To solve this equation, find two numbers u and v such that
u3 - v3 =  q
    uv    =  p/3
A solution to our equation is then given by
t = v - u
as can be checked by directly substituting this value for t in (1).

The above system for u and v can always be solved: solve the second equation for v, substitute into the first equation, solve the resulting quadratic equation for u3, then take the cube root to find u. In some cases the quadratic equation will give complex solutions, even though at least one solution t of (1) will be real. This was already noticed by Cardano and is a strong argument for the usefulness (if not the existence) of complex numbers.

Once the values for t are known, the substitution x = t - a/3 can be undone to find the values of x solving the original equation.

So, if we have an equation

we set
and
and have
So that u3 - v3 = q, and uv = p/3, we find
and
and since x + b/3 = v - u then

If the square root is of a negative number, then the cubic root will be of a complex number. A way of taking the cubic root of a complex number is to convert the complex number to polar coordinates with the angle 0 along the real axis, divide the angle by 3, and take the cubic root of the modulus. There might be an easier way.

Note that in finding u, there were 6 possibilities, since there are two solutions to the square root, and three complex solutions to the cubic root. However, which solution to the square root is chosen does not affect the final resulting x.

See also: linear equation, quadratic equation, quartic equation, quintic equation, Omar Khayyam

To do:

  • Example