Math 421  •  Fall 2006

Birth of complex numbers in solving cubic equations

Revised 9/6/06

Copyright © 2006 by Murray Eisenberg.  All rights reserved.

The problem

To solve the cubic equation
	(x^3)  +  A (x^2)  +  B x  +  K   =  0.

Strategy:
	• change-of-variable -> new cubic with no quadratic term;
	• solve new cubic; 
	• use the solutions of that to solve the original.

Reduction of cubic to depressed cubic
(Anonymous, end of 14th century)

Temporarily replace x by u and rename the constant term K:

cubic  =  (u^3)  +  A (u^2)  +  B u  +  K

Make linear substitution 
	u  =  x  -  (1/3) A

depressed  =  
      cubic  /.   u  ->  x  -  (1/3) A

Collect coefficients of the powers of x:

Collect[depressed,  x]

That is the depressed cubic:  no (x^2) term, so of form
	(x^3)  +  b x  +  c
where
	b  =  -((A^3)/3)  +  B, 	c  =  ((2  (A^3))/27)  -  ((A B)/3)  +  
          K.

depressedCubic  =  (x^3)  +  b x  +  c

Exercise.  The linear substitution just used was u  =  x  -  (1/3) A.  Among all possible linear substitutions u  =  x  -  cst, why use cst  =  (1/3) A?

del Ferro & Tartaglia solution of depressed cubic
(Scipione del Ferro, 1515, and Niccolò Fontana aka "Tartaglia")

Scipione del Ferro and Niccolò Tartaglia discovered formula for a root of a depressed cubic (x^3)  +  b x  +  c.  In Mathematica:

delFerroTartagliaRoot[b_,  
        c_]  :=  ((-(c/2)  +  (Sqrt[((c^2)/4)  +  ((b^3)/27)]))^(1/3)) +   ((-(c/2)  -  (Sqrt[((c^2)/4)  +  ((b^3)/27)]))^(1/3))

delFerroTartagliaRoot[b,  c]

The del Ferro-Tartaglia solution will appear simpler if in the depressed cubic you take b  =  3  p and c  =  2  q to obtain the form:

(x^3)  +  3  p x  +  2  q

delFerroTartagliaRoot[b,  c]  /.  {b  ->  3  p,  
        c  ->  2  q}

Nicer formula from…

niceDepressedCubic  =  
      depressedCubic  /.  {b  ->  3  p,  
          c  ->  2  q}

…by new Mathematica function:

niceDelFerroTartagliaRoot[p_,  q_]  :=  
      delFerroTartagliaRoot[b,  c]  /.  {b  ->  3  p,  
          c  ->  2  q}

So del Ferro-Tartaglia formula for root of a depressed cubic of form (x^3)  +  3  p x  +  2  q is:

niceDelFerroTartagliaRoot[p,  q]

Cardan's general solution of the cubic
(Girolamo Cardano, Ars magna, 1545)

Cardan uses the linear substitution that reduces a general cubic to a depressed cubic along with the del Ferro-Tartaglia formula for one solution of the depressed cubic to obtain a general formula for solving any cubic.  Mathematica can do it, too:

Solve[(x^3)  +  A (x^2)  +  B x  +  K  ==  0,  x]  //  
      TraditionalForm

Bombeli: use square-roots of negative numbers to obtain real roots of cubics
(Rafael Bombeli, L'algebra, 1572)

Paradox

• A depressed cubic always has a real solution:  (x^3)  +  3  p x  +  2  q  =  0 is equivalent to
	(x^3)  =  - 3 p x  -  2  q,
and the cube function 
	y  =  (x^3) 
always intersects the line 
	y  =  - 3 p x  -  2  q 
in at least one point, no matter what p and q are!

Plot[(x^3),  {x,  -5,  5},  
        PlotStyle -> Red];

• Yet del Ferro-Tartaglia formula \(TraditionalForm\`\((\(-q\) - \@\(p\^3 + q\^2\))\)\^\(1/3\) + \((\(-q\) + \@\(p\^3 + q\^2\))\)\^\(1/3\)\)
involves square-roots of negative numbers when (q^2)  <  - (p^3).

Example

In the depressed cubic equation (x^3)  +  3  p x  +  2  q, take p  =  5 and q  =  -2:

(x^3)  -  15  x  -  4  =  0

eqn  =  (x^3)  -  15  x  -  4  ==  0

There must be a solution—the cubic y  =  (x^3) and the line y  =  15 x  +  4 must intersect:

Plot[{(x^3),  15  x  +  4},  {x,  -7,  7},  
        PlotStyle  ->  {Red,  Blue}];

In fact, x  =  4 is a solution:

eqn  /.  x  ->  4

Bombeli's "wild thought"

niceDelFerroTartagliaRoot[p,  q]

The depressed cubic has p  =  -5,  q  =  -2.  So…

(p^3)  +  (q^2)  /. { p  ->  -5,  
        q  ->  -2}

… then del Ferro-Tartaglia solution in this example is:
	((2 + (Sqrt[-121]))^(1/3)) + ((2 - (Sqrt[-121]))^(1/3)) = ((2 + 11 (Sqrt[-1]))^(1/3)) + ((2 - 11 (Sqrt[-1]))^(1/3))
The known solution x  =  4 could be recovered from the del Ferro-Tartaglia if the two terms on the right have the forms

((2 + 11 (Sqrt[-1]))^(1/3))= m  +  n (Sqrt[-1]),   ((2 - 11 (Sqrt[-1]))^(1/3)) = m  -  n (Sqrt[-1]).		(*)

for suitable m and n.  
How?  Well, the sum of these two solutions has the form…

(m  +  n (Sqrt[-1]))  +  (m  -  n (Sqrt[-1]))

…so here we must have:
	2  m  =  4	(the known solution).

Thus to obtain the solution x  =  4, Bombeli wants to find n for which (*) holds with m  =  2, in other words,
	((( 2  +  n (Sqrt[-1])))^3) = 2 + 11 (Sqrt[-1]),	((( 2  -  n (Sqrt[-1])))^3) = 2 - 11 (Sqrt[-1])

Pretend usual rules of algebra hold for expressions involving 
	i  =  (Sqrt[-1]),
and assume the special rule 
	\(TraditionalForm\`i\^2\  = \ \(\((\@\(-1\))\)\^2\  = \ \(-1\)\)\).
Then multiply out to calcluate ((( 2  +  n (Sqrt[-1])))^3):

theCube  =  Expand[(((2  +  n (Sqrt[-1])))^3)]

To compare result with 2 + 11 (Sqrt[-1]), separate the "real part" from the part involving i:

ComplexExpand[theCube]

That is supposed to equal 2 + 11 (Sqrt[-1]):

Solve[{8  -  6  (n^2),  12  n  - (n^3)}  ==  {2,  11},  
      n]

Exercise.  The "usual rules of algebra" include such identities as:
	(x + y)  +  (u  +  v)  =  (x  +  
              u)  +  (y  +  v),
	(x  +  y) (u  +  v)  =  
        x u  +  y v  +  x v  +  y u,
	k (x  +  y)  =  k x  +  k y,
	k (x y)  =  (k x) y  =  
          x (k y),
	(x  +  y)  +  z  =  
        x  +  (y  +  z).
These identities hold for real numbers x,  y,  u,  v,  k,  z.
Assume such identities hold for "complex numbers" as well—for numbers of the form a  +  b i where a and b are real.  And still assume that \(TraditionalForm\`i\^2\  = \ \(i\ i\  = \ \(-1\)\)\). Then put each of the following into the form y=u  +  i v with u and v real:
	(a  +  b i)  +  (c  +  
            d i),	 (a  +  b i)  (c  +  
            d i)

The moral

Square-roots of negative numbers are useful (essential?) in obtaining real roots of certain cubic equations.

(But what are such "complex" numbers?  That's what's next in this course!)

Appendices

Appendix 1: Obtaining real imaginary parts of complex numbers involving symbolic quantities

How in Mathematica can you solve for n the equation
	8   -  
          6 (n^2) +  i (12 n  -  (n^3))  =  
        2  +  11 (Sqrt[-1])
without copying and pasting, or reading off and retyping, the real and imaginary parts (as was done above)?

Use Re and Im.

?Re

?Im

theCube

Re[theCube]

Try some more:

Simplify[Re[theCube]]

Stymied!  Why?  Because Mathematica doesn't know n should be real.  Tell it so:

ComplexExpand[Re[theCube]]

{realPart,  imaginaryPart}  =  {ComplexExpand[Re[theCube]],  
        ComplexExpand[Im[theCube]]}

Now once again you could solve 8   -  
          6 (n^2) +  i (12 n  -  (n^3))  =  
        2  +  11 (Sqrt[-1]):

Solve[{realPart,  imaginaryPart}  ==  {2,  11},  n]