Cubic Equations




General cubic equation.

The general cubic equation is
 
        A x3  + B x2  + C x + D = 0
The coefficients A, B, C, D are real or complex numbers with A not 0. Dividing through by A, the equation comes to the form
 
         x3  + b x2  + c x + d = 0

The quadratic term disappears

Now we want to reduce the last equation by the substitution
 
        x = y + r
The cubic equation becomes:
 
        (y + r)3  + b (y + r)2  + c (y + r) + d = 0
<=>
        y3  + (3 r + b) y2  + (3 r2  + 2 r b + c) y + r3  + r2  b + r c + d = 0
Now we choose y such that the quadratic term disappears
 
        choose  r = -b/3

So, with the substitution

                b
        x = y - -
                3
the equation

         x3  + b x2  + c x + d = 0

comes in the form

        y3  + e y + f = 0

Vieta's substitution

To reduce the last equation we use the Vieta substitution
 
                  1
        y = z + s -
                  z
The constant s is an undefined constant for the moment.
The equation
 
        y3  + e y + f = 0
becomes

             s
        (z + -)3  + e (z + (s/z)) + f = 0
             z

expanding and multiplying through by z3  , we have

        z6  + (3 s + e) z4  + f z3  + s (3 s + e) z2  + s3  = 0
Now we choose s = -e/3.
The equation becomes
 
        z6  + f z3  - e3/27 = 0

With    z3  = u

        u2  + f u -e3/27 = 0

This is an easy to solve quadratic equation.

Summing up

The general cubic equation is
 
        A x3  + B x2  + C x + D = 0
The coefficients A, B, C, D are real or complex numbers with A not 0. Dividing through by A, the equation comes to the form
 
         x3  + b x2  + c x + d = 0

With the substitution

                b
        x = y - -
                3
comes

        y3  + e y + f = 0

To reduce the last equation we use the Vieta substitution

                  e
        y = z -  ---
                 3 z

The equation becomes

        z6  + f z3 - e3/27 = 0

With    z3  = u

        u2 + f u - e3/27 = 0
This is an easy to solve quadratic equation.

Example

Solve
 
        45 x3  + 24 x2 - 7 x - 2 = 0

<=>
         3   8   2   7      2
        x  + -- x  - -- x - -- = 0
             15      45     45

With the substitution

                 8
        x = y - ---
                 45
comes

         3   169      506
        y  - --- y - ----- = 0
             675     91125

Now we leave the fractional notation


<=>     y3 - 0.25037037037 y - 5.55281207133e-3 = 0

To reduce the last equation we use the Vieta substitution
                 0.0834567901235
        y =  z + ---------------
                        z
Then we have

        z6  - 5.55281207133e-3 z3  + 5.81279532442e-4 = 0

With    z3  = u

        u2  - 5.55281207133e-3 u  + 5.81279532442e-4 = 0

The solutions for u are

u1 =   2.77640603567e-3 + 0.0239493444997 i  and

u2 =   2.77640603567e-3 - 0.0239493444997 i
Each solution yields three values of z. To calculate these values, we bring the u-values in polar form.
 
u1 = 0.024109739369 (cos(1.45538324457) + i sin(1.45538324457))

u2 = 0.024109739369 (cos(1.45538324457) - i sin(1.45538324457))

The six values of z are in polar form

z1 = 0.288888888889 (cos(0.48512774819) + i sin (0.48512774819) )
z2 = 0.288888888889 (cos(2.57952285058) + i sin (2.57952285058) )
z3 = 0.288888888889 (cos(-1.6092673542) + i sin (-1.6092673542) )
z4 = 0.288888888889 (cos(0.48512774819) - i sin (0.48512774819) )
z5 = 0.288888888889 (cos(2.57952285058) - i sin (2.57952285058) )
z6 = 0.288888888889 (cos(-1.6092673542) - i sin (-1.6092673542) )

With
                 0.0834567901235
        y =  z + ---------------
                        z

we find three real y-values

        y1 = 0.511111111112
        y2 = - 0.488888888888
        y3 = - 0.022222222221

Finally, with the substitution

                 8
        x = y - ---
                 45

we find the three roots of the given equation
        x1 = 0.333333333334

        x2 = -0.666666666666

        x3 = -0.199999999999

The exact roots are

        x1 = 1/3

        x2 = -2/3

        x3 = 1/5

Iteration method

If you have a first approximation of the roots, all real roots of cubic equations can be found with a simple iteration method.

Use this link for the theory, optimalisation procedure and examples of this iteration method.

Example 1

Relying on the optimized procedure of the iteration method, we solve now the equation
x3 + 2 x2 + 3 x - 4 = 0. We follow the procedure literally.

  1. By plotting x3 + 2 x2 + 3 x - 4 we see that 0.77 is an approximation of the only real root.
  2. We write x = x + r( x3 + 2 x2 + 3 x - 4 )
  3. We choose the r-value such that 1 + r( 3.(0.77)2 + 4.(0.77) +3) = 0. ro = -0.13 is a good approximation.
  4. We apply iteration on x = x - 0.13 ( x3 + 2 x2 + 3 x - 4 ) starting with x= 0.77
    We find a very good result using only 5 steps.
     
    0.77619671
    0.776041122953
    0.776045557563
    0.776045431542
    0.776045435125
    

Example 2

We solve the equation x3 - 2.7 x2 + 4.5 x - 6 = 0
  1. By plotting x3 - 2.7 x2 + 4.5 x - 6 we see that 2 is a rough approximation of the only real root.
  2. We write x = x + r( x3 - 2.7 x2 + 4.5 x - 6 )
    Relying on the optimized procedure of the iteration method, we choose the r-value such that
    1 + r(3*4 - 5.4*2 + 4.5) = 0. ro = -0.175 is a good approximation.
  3. We apply iteration on x = x - 0.175 ( x3 - 2.7 x2 + 4.5 x - 6 )
    We start with x = 2. We find a very good result using only 5 steps.
     
    1.96500000
    1.96421257
    1.96417892
    1.96417747
    1.96417741
    





Topics and Problems

MATH-abundance home page - tutorial

MATH-tutorial Index

The tutorial address is http://home.scarlet.be/math/

Copying Conditions

Send all suggestions, remarks and reports on errors to Johan.Claeys@ping.be     The subject of the mail must contain the flemish word 'wiskunde' because other mails are filtered to Trash