The solution to the general cubic equation
The general cubic equation
1. x^3 + ax^2 + bx + c = 0 can be reduced to the form
2. y^3 + mx + n = 0.
by an appropriate substitution of x = y + z for some z in terms of the
coefficient a. The value z is suggested by the binomial expansion of x = y + z in 1.
3. (y + z)^3 + a(y + z)^2 + b(y + z) + c = 0
y^3 + 3y^2z + 3yz^2 + z^3 + ay^2 + 2ayz+az^2 + by + bz + c = 0
Collecting the y^2 or quadratic terms we have 3y^2z + ay^2.
If this expression were to equate to 0 and thus eliminate the quadratic term from 1., then
z = -a/3. So x = y-a/3 is the appropriate substitution to transform the general cubic in 1. to the
reduced form in 2.
We now are ready expand x = y – a/3 in 1. and solve for m and n in the reduced form in 2.
Using the binomial theorem again we have
4. (y – a/3)^3 + a(y –a/3)^2 + b(y –a/3) + c = 0.
y^3 – 3ay^2/3 + 3ya^2/9 –a^3/27 + ay^2 - 2a^2y/3 + a^3/9 + by –ab/3 + c = 0.
y^3 + 1/3(3b-a^2)y + 1/27(2a^3 – 9ab + 27c) = 0 Then
m = 1/3(3b-a^2) and n = 1/27(2a^3 – 9ab + 27c)
At this point we have expressed m and n in 2. in terms of the known values a, b and c in 1.
We now must solve 2. for m and n to complete the solution. Notice that 2. can be easily solved
if we eliminate the linear term y. To reduce this equation to the more manageable form we
make another substitution y = w + v in 2
5. w^3 + v^3 = 0
for some w and v in terms of m. Similar to the argument we used to find z = -a/3, we expand
y = w + v in 2 to get,
6. (w + v)^3 + m(w + v) + n = 0. w^3 + 3w^2v + 3wv^2 + v^3 + m(w + v) + n = 0.
Now we collect the terms
3wv(w+v) + m(w+v)
Setting this to 0 gives us v = -m/3w as the appropriate value in y = w+v .
Expanding
y = w –m/3w in 2 we get 7. (w – m/3w)^3 + m(w - m/3w) + n = 0.
w^3 - 3w^2m/3w + 3wm^2/9w^2 - m^3/27w^3 + mw - m^2/3w + n = 0.
w^3 – wm + mw + m^2/3w – m^2/3w + m^3/27w^3 + n = 0
w^3 + m^3/27w^3 + n = 0 w^6 + n^w^3 = m^3/27
We complete the square by adding n^2/4 to both sides to get
(w^3 + 1/2n)^2 = m^3/27 + n^2/4
________________
w^3 = -n/2 + - \ / n^2/4 + m^3/27
___________________________________
w1 = \3 / ________________
\ / -n/2 + \ / n^2/4 + m^3/27
___________________________________
w2 = \3 / ________________
\ / -n/2 - \ / n^2/4 + m^3/27
The following was taken from CRC standard mathematical tables.
y = w1 + w2, -(w1+w2)/2+(w1-w2)/2 \/ -3 , -(w1+w2)/2 - (w1-w2)/2 \/ -3.
If n^2/4 + m^3/27 > 0 1 real root and 2 imaginary.
If n^2/4 + m^3/27 = 0 3 real roots at least 2 equal.
If n^2/4 + m^3/27 < 0 3 real unequal roots.
For the last case a trigonometric solution is useful.
_______
Compute cos(t) = -b/ \/ - m^3/27 Then
____ _____ ____
y = 2 \/ -m/3 cos(t) , 2 \/ -m/3 cos(t/3+120) , 2 \/ -m/3 cos(t/3+240). <o:p></o:p>
Here m is negative.
Example: Find the roots of the equation
(x-2)(x-2)(x+5) = x^3 + x^2 - 16x + 20 = 0
a=1, b = -16, c=20
m = 1/3(3b-a^2)
n = 1/27(2a^3 – 9ab + 27c)
m = 1/3(-48-1) = -49/3
n = 1/27(2 + 9*16 + 27*20) = 686/27
<o:p>so y^3 - 49/3y + 686/27 = 0
____________________________________
w1 = \3 / _________________________
\ / -343/27 + \ / (686/27)^2/4 + (-49/3)^3/27
___________________________________
w2 = \3 / ________________________
\ / -343/27 - \ / (686/27)^2/4 + (-49/3)^3/27
w1 = w2 = -7/3
y = w1+w2 = -14/3
x = y - 1/3 = -15/3 = -5
y = - (w1+w2)/2 = 7/3 + (w1-w2)/2*3i
x = y – 1/3 = 7/3 -1/3 = 6/3 = 2
y = - (w1+w2)/2 = 7/3 – (w1-w2)/2*3i
x = y – 1/3 = 7/3 -1/3 = 6/3 = 2
Since w1=w2 the complex conjugate was eliminated.
Comments:
When you solve for y be sure to recall that to get x you will have to do the transformation x = y-a/3.
</o:p>Computer solutions are going to require double precision to avoid round off when taking the roots.
Have Fun,
Cino hilliard