x^{3}+px+q = 0. |
Let x = u+v : u^{3}+v^{3}+3uv(u+v)+p(u+v)+q = 0
We can assume 3uv+p = 0, hence u^{3}+v^{3} = -q and u^{3}v^{3} = -p^{3}/27
u^{3} and v^{3} are then solutions of :
Z^{2}+qZ-p^{3}/27 = 0
This second degree equation can easily be solved.
Its discriminant is Δ = q^{2}+4p^{3}/27 = 4(q^{2}/4+p^{3}/27)
Let u_{0}^{3}, v_{0}^{3} the solution.
Let ε = (-1+i√3)/2 a primitive cubic root of 1.
All solutions of X^{3} = 1 are then
1, ε and ε ^{2}
Even more
ε^{ 2} = (-1-i√3)/2 is the conjugate of ε
and εε^{ 2} = ε^{ 3} = 1
We can then write the formulaes for the 3rd degrée equation (Cardan's) :
If Δ is positive, u_{0}^{3} and v_{0}^{3} are real numbers,
x_{0} = u_{0}+v_{0} also, x_{1} and x_{2} are conjugate imaginary numbers
If Δ<0, u_{0} and v_{0} are conjugate imaginary numbers and the three roots are real numbers.
Unfortunatly, this theoretical solving method is not usefull in practice.
Take as example (x-1)(x-2)(x+3) = x^{3}-7x+6 = 0 with simple roots 1,2 and -3
Δ = -400/27 being negative, the three roots are real.
But find a cubic root of -3 ± i√(100/27) is a hard job.
Even with Δ > 0,
for instance (x-1)(x^{2}+x+2) = x^{3}+x-2 = 0,
which hast the simple real root 1 and two conjugate complex solutions.
Δ = 4x28/27. although could you see that :
In practice, solving a 3^{rd} degree equation is done by successive approximations,
unless we find a "trivial" solution (like 0, 1, -1 ...)
A script using the Newton method.