Soving a cubic equation amounts to finding the roots of a cubic function. Every cubic equation has at least one solution x among the real numbers. The following qualitatively different cases are possible:
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
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
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.
wikipedia.org dumped 2003-03-17 with terodump