0% found this document useful (0 votes)
200 views

Polynomial Equations - Cardano v9

This document describes methods for solving polynomial equations of varying degrees. It begins by explaining how to solve linear and quadratic equations, then describes Cardano's method for solving cubic equations from the 16th century. Cardano's method provides one or no real solutions, but not the full solution set. The document then presents Cardano's extended solution, which incorporates complex numbers to find all three solutions to a cubic equation. It also discusses how later mathematicians like Bombelli and Gauss further advanced the understanding of complex solutions to polynomial equations.

Uploaded by

Nikitas Manolis
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
200 views

Polynomial Equations - Cardano v9

This document describes methods for solving polynomial equations of varying degrees. It begins by explaining how to solve linear and quadratic equations, then describes Cardano's method for solving cubic equations from the 16th century. Cardano's method provides one or no real solutions, but not the full solution set. The document then presents Cardano's extended solution, which incorporates complex numbers to find all three solutions to a cubic equation. It also discusses how later mathematicians like Bombelli and Gauss further advanced the understanding of complex solutions to polynomial equations.

Uploaded by

Nikitas Manolis
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 23

Mathematics Standard Level

Internal Assessment

SOLVING POLYNOMIAL EQUATIONS OF 1st , 2nd and


3rd DEGREE

Name: Nikitas Manolis


Candidate Number: ******
School: Ionios School Greece
School Number: ******

Table of Contents
1

INTRODUCTION....................................................................................................1

Cardano's Method....................................................................................................3

Cardanos Extended solution for complete solution of the Cubic equation.......6


3.1

Discriminants.............................................................................................................7

Iterations.................................................................................................................13

CONCLUSION.......................................................................................................15

6
Appendix A : Excel VBA code written to solve the cubic equation
x3+ax2+bx+c=0................................................................................................................16
6.1
6.2
6.3

Function Cardan1(aa As Double, bb As Double, cc As Double) As Variant.........16


Function Cardan2(aaa As Double, bbb As Double, ccc As Double) As Variant...16
Function Cardan3(aaaa As Double, bbbb As Double, cccc As Double) As Variant
17

Bibliography...........................................................................................................19

Candidate Number: ********

INTRODUCTION

At the early days of high school I was impressed to see that solutions to problems could
be found by solving linear equations of the form ax+b=0 where a and b ..
One such easy problem was the calculation of the time it takes to travel a distance
S=100km when travelling at a speed of V=120 km/h
We have S=Vt This can be rearranged so Vt-S=0.
Therefore:
S 100
t= =
h=0.83 h
V 120
This indeed looks simple now but at the time it was a revelation.
I then started my IB course and suddenly I learned how to solve quadratic equations. I
also learned that both of these equations are polynomial equations of 1st and 2nd degree.
The question that stacked in my mind was how polynomial equations of higher degree
are solved.
In this work I aim to find out how the cubic equation of the form Zx3+Ax2+Bx+C=0 is
solved.
But let us start with the definition of the polynomial and the polynomial equation.
Any expression of the form
n

P( x)= ai x
i=0

Where a0, a1, an and i

is called a polynomial of variable x and degree n.


If the polynomial is set to zero i.e. P(x) = 0 then we have the so called polynomial
equation.
The number n defines the degree of the polynomial or the degree of the polynomial
equation respectively.
Since the 1st degree polynomial equation was described above let us now look at the
2nd degree equation which takes the form:
ax2 + bx + c = 0 where a, b and c and a 0.
(1)
We know from the IB mathematics syllabus topic 2.7 that this equation can be solved
generically using the Discriminant.
Discriminant is defined as:

Candidate Number: 00******

= b2 4ac
(2)
If the roots of the equation is x1 and x2 then,
b b b 24 ac
x 1 , x 2=
=
2a
2a

(3)

From the above it is derived that if


1. >0 the equation has two real distinct solutions
2. =0 the equation has one double real distinct solution.
3. <0 the equation has two complex solutions and no real solution.
From the above I can see that this way of solving 2nd degree polynomial equations is so
powerful, that not only it solves any 2nd degree polynomial equations, but the existence
of the discriminant gives information of how many solutions or roots the equation has
and whether these are real or complex numbers.
But when was the first time that the quadratic questions or indeed higher degree
polynomial equations were solved? From the research I did I found out that there is is a
very lengthy history in the solutions of polynomial equations.
The Babylonians were the first that appeared to be in a position to solve some of the
forms of quadratic equations1 around 1800 BC. The solution formula for solving the
quadratic equations was also mentioned in the Bakshali Manuscript2 written in India
between 200 BC and 300 AD.
The quadratic equations were also solved by the ancient Greeks using geometric
constructions3. They also had methods applicable to cubic equations involving points of
intersection of conics.
In 1545 a doctor and mathematician called Cardano in his book Ars Magna4 published
the solution formula for solving the cubic equations (3rd degree). Although it appears
that the solution was in fact the work of Scipione del Ferro and Nicolo Tartaglia, the
solution took the name of the Cardano who was the first to publish it.
In his book Ars Magna, Cardano also published the work of his student Lodovico
Ferrari, with a solution formula for the quartic equations (4th degree).
In the next part of this report, I will present the Cardanos method,
analyze its strengths and limitations and present ways of overcoming
1

21

Babylonian Mathematics :
http://en.wikipedia.org/wiki/Babylonian_mathematics
manuscript : http://www-history.mcs.stand.ac.uk/Projects/Pearce/Chapters/Ch6.html

The Bakhshali

3 Solutions of Polynomial equations by Donald Rideout, Memorial University of


Newfaundland : http://math2.uncc.edu/~hbreiter/m6105/polynms.pdf
4 The Story of Mathematics. 16TH CENTURY MATHEMATICS - TARTAGLIA,
CARDANO & FERRARI :
http://www.storyofmathematics.com/16th_tartaglia.html

Candidate Number: 00******

these limitations. An alternative solution method of the 3rd degree


equation, based on iterations, will also be presented.

Cardano's Method

If we divide the equation Zx3+Ax2+Bx+C=0 with Z where Z0, we end up with the
general form of the cubic equation as follows:
x3 + ax2 + bx + c = 0 where a, b, c and d
x= y

After substituting

a
3

(4)

equation (4) becomes.

a 3
a 2
a
+ a y +b y +c
3
3
3

) (

) (

2 ya a
+
+c
3
3
3
a
3
2a
y 3 y +
+a
3 3

()
()

y +

a2 2 a2
a3 a3 ab
y +
+b y +
+ +c
3
3
27 9 3
3

y 3+

) (

a
2 a ab
+b y+
+c =0
3
27
3

By substituting

) (

p=

a 2
2 a3 ab
+b q=
+c
3
27
3

) (

(5)

, (5) becomes:

y3 + py + q = 0

(6)

By substituting y=u+v, equation (6) becomes:

( u+ v )3 + p ( u+ v )+ q
3

u +3 u v +3 uv + v + pu+ pv +q

(7)

After carrying out the calculations (7) becomes:

u3 + v3 + q +(u+v)(3uv + p) = 0

(8)

In order for equation (7) to be valid the following must be also valid.
3uv + p = 0 and u3 + v3 = -q.
Candidate Number: 00******

In this way, we obtain the system with equations (9) and (10) below.

u3 + v3 = -q
u3 v 3=

(9)

p 3
27

(10)

Since this system specifies both the sum and product of u3 and v3, we can define a
quadratic equation with roots u3 and v3. This equation will be:
p3
(11)
t 2 + qt =0 Where t .
27
As Cardano did not know complex numbers, he supposed that the roots of this equation
were real. This meant that his method was looking only for real solutions. In order for
this to be true the following had to be true.
0 Hence:
q 24

p 3 2
p3
=q + 4 0
27
27

(12)

This meant that equation (11) has the following distinct solutions t1 and t2:

q q2 +
t 1,2 =

4 p3
27

where t1 and t2

q
q2 p3

+
2
4 27

(13)

Therefore since t1 = u3 and t2 = v3 we have:

u3=

q
q2 p3
+
+
2
4 27

v 3=

q
q 2 p3

+
2
4 27

u=

q
q p
+
+
2
4 27

3 q

v=

q2 p3
+
4 27

where u and v .
Since we have set y=v+u we have:
y=

and since

x=

q
q 2 p3 3 q
q2 p3
+
+ +

+
2
4 27
2
4 27
x= y
2

a
3

where y .

we have:

q
q p 3 q
q p a
+
+ +

+
2
4 27
2
4 27 3

Candidate Number: 00******

where

x .
4

The above formula is known as the Cardano formula.


As we can see providing 0 the Cardano method gives us one solution and no
solution if < 0 . Cardano realised5 that he had not solved the cubic polynomial fully
when he was examining the equation x3-15x-4=0 and he realised that one of the roots
was 4.
His method could not find this solution as t 1,2 =2 121

which he could not solve.

Indeed another Italian Mathematician called Bombelli6 in 1560 solved this equation.
By applying the Cardano formula Bombelli came up with :
x=

3 2+ 121+ 3 2121

Then by assuming that


that b=1.

3 2+ 121=2+b 1

In the same way he proved that

and cubing both sides he calculated

3 2+ 121=2 1

In this way he came up with the solution x=2+ 1+2 1=4 .

It was indeed the solution of the above equation that led 7 to the definition of
complex numbers.
In 1799 Gauss proved the fundamental theorem of Algebra8 which states that any
polynomial of degree grater or equal to 1 has at least 1 root which can be either real or
complex. The consequence of this theorem was the proof that every polynomial of n
degree has n roots if we allowed multiple roots to be counted distinctly.
Having now the knowledge of complex numbers and the understanding of the above
fundamental theorem of Algebra, we know that the cubic equation has in fact three
solutions with some of them real and some of them complex. In the following part of
this report, I will aim to locate the additional solutions not found by the Cardano
method.

5 Geometric Solutions of Quadratic and Cubic Equations by David W. Henderson


Department of Mathematics, Cornell University Ithaca, NY, 4853-7901, USA
http://www.math.cornell.edu/~dwh/papers/geomsolu/geomsolu.html.
6 Geometric Solutions of Quadratic and Cubic Equations by David W. Henderson
7 Geometric Solutions of Quadratic and Cubic Equations by David W. Henderson
8 Solutions of Polynomial Equations Donald Rideout, Memorial University of Newfoundland
http://math2.uncc.edu/~hbreiter/m6105/polynms.pdf

Candidate Number: 00******

Cardanos Extended solution for complete solution of the Cubic


equation

Since u

= t1

we get the following equation.

u3t 1=( u t 1) ( u2 +u t 1 +( t 1) )=0

(14)

Therefore:

(u3 t1 )=0

(15)

and

(u 2+u 3 t 1+(3 t1 )2 )=0

(16)

Cardanos solution was based on the solution of equation 15 where he found u1 and v1.

(u 2+u 3 t 1+(3 t1 )2 )=0

But if

u2,3=

3 t 1

we have two additional solutions of u as follows.

( t ) 4 ( t ) = t i t 3 = t
2

(1 i 3 )

Which are complex numbers.


In the same way:
V 2,3=

3 t 2

( t ) 4 ( t ) = t i t 3 = t
2

(1 i 3 )

Hence:
u2=

3 t1 (1+i 3 )
2

3
t

u = 1 (1i 3 )
3

3
t

v = 2 (1+i 3 )
2

3
t

v = 2 (1i 3 )
3

Candidate Number: 00******

Since y=u+v and we have three u and three v we end up with 9 possible pairs u and
v the sum of which could be y. These pairs are summarised on table 1.
3.1

Discriminants

If >0 then we have the following possible solutions:


Table 1 : Possible combinations of Un and Vn if >0
A
A

u v
n

un+vn

un . vn

1 u1

v1

2 u1

v2

Real since both u1 and


v1 are real(this is the
Cardano Solution)
Complex since u1 is
Real and v1 is Complex

Real since both u1 and v1 are


real
Complex since u1 is Real and
v1 is Complex

v3

Complex since u1 is
Real and v3 is Complex

Complex since u1 is Real and


v3 is Complex

4 u2

v1

Complex since v1 is
Real and u2 is Complex

5 u2

v2

6 u2

v3

Complex since v1 is Real and


u2 is Complex
Real or Complex.
Calculations need to be
made
Real or Complex.
Calculations need to be
made

Complex since v1 is
Real and u3 is Complex

Complex since v1 is Real and


u3 is Complex
Real or Complex.
Calculations need to be
made
Real or Complex.
Calculations need to be
made

3 u1

7 u3

v1

8 u3

v2

9 u3

v3

In order for equation (10) above to be valid since p is real, un . vn must also be real.
Therefore from the above pairs we discard the pairs 2, 3, 4 and 7 since they are
complex.
We now have to do the calculations for pair 5, 6, 8 and 10 to find the ones that satisfy

un . vn

We start with pair Nr 5.


Let us assume that

3 t 1 =m and 3 t 2 =n
2

Candidate Number: 00******

u2 . v 2=(m+i . m 3 ) (n+i. n 3 )=( mn3 mn ) +i 3 (mnmn )=2 mni. 2 mn 3


Which is complex as m0 and n0 .

For pair Nr 6.
s assume that onal solu
u2 . v 3=(m+ 3 ) (ni . n 3 ) =( mn+ 3 mn ) +i 3 ( mnmn ) =2mn n
This is real, as both m and n are real.
In the same way the product of pair 9 is also complex and the product of pair 8 is real
Therefore since y=v+u and
additional solutions of

x= y

a
3

we have the following

x.

a
a
x 2=u2 +v 3 =mn+i 3 ( mn )
3
3
3
3
t 1 3 t 2 a
t 1 3 t 2

+i 3

(15)

3
3
a t 1 t 2 a
3 t 1 3 t2
x 3=u3 + v2 =

i 3
3
2
2 3
2
2

(16)

We therefore conclude that if >0 we have one real solution that is given by the Cardano
formula and two additional complex solutions.

If now =0, then from the Cardano formula we get:


x 1=

q 3 q a
a
3 q
+
=2

2
2 3
2 3

(17)

and from equations 15 and 16 above


x 2=x 3=

q a 3 q a
=
2 3
2 3

Candidate Number: 00******

(18)

Hence from the above, if =0, we have 3 real solutions and two of them are equal.

Candidate Number: 00******

If <0 then p has to be negative

Let us now investigate the condition <0.


In this case the solution in (13) above becomes

q
q p
p
t 1,2 =
i +
=
(cos isin)
3
2
4 27
3

(19)

q
2

( )

Where =arccos

p
27

(18)

Using now De Moivre's9 formula we can calculate the 3 roots of t1 and t2 which are
equal with y1, y2 and y3.
Hence for k=0, 1 and 2 we have:
1
3

y 1,2,3= ( t 1 ) =

3
p
( cos ( +2 k ) +isin(+ 2 ) ) =
3
3

p 3
( cos ( +2 ) +isin ( +2 ) ) 3 =
3
3

( (
(
(
(

p
+2
+2
cos
+isin
3
3
3

) (

))

(20)

( ) ( ))
p
+ 2
+ 2
y=
cos (
+isin (
=
)
3
3
3 ))
y 1=

cos
+isin
3
3
3

y 3=

p
+4
+4
cos
+isin
3
3
3

) (

))

(21)

(22)

By using the (-) sign of equation (19) we get 3 more values of y which are:

9 http://en.wikipedia.org/wiki/De_Moivre's_formula
Candidate Number: 00******

10

(
(
(

y4 =

cos
isin
3
3
3

y 5=

p
+2
+ 2
cos
i sin
3
3
3

y 6=

( ))

()

(23)

))

p
+4
1
+ 4
cos
i sin
3
3
2
3

and

(24)

))

(25)

Since x is the sum of the roots that come from t1 and t2 of equation (15) we get 9 pairs of
y and hence 9 values of x. Out of these we keep the 3 real values, which are the
following.
x 1= y 1+ y 4=2

x 2= y 2+ y 5=2

x 3= y 3 + y 6=2

p
a
co s

3
3 3

(26)

p
+ 2 a
cos

3
3
3

(27)

p
+4
a
cos

3
3
3

(28)

()

Hence we have concluded that if


1. >0 we have 1 real and 2 complex solutions
2. =0 we have 3 real solutions and at least 2 of them are equal
3. <0 we have 3 real solutions which are different to each other.
It is clear from the above work that although any 3rd degree polynomial equation can be
solved using the initial Cardano method but extended with the todays knowledge of
complex numbers, the solution is pretty cumbersome and complicated to do by hand.
This gives high risk to mistakes in solving general 3rd degree equations by hand.
The solution however, as described above, suites perfectly for developing computer
programs to solve the general 3rd degree polynomial equation.
After searching the internet for such a solution for Microsoft Excel I did not find any
available. I was then tempted to make one myself. Indeed I developed such a programme
on excel VBA10. I defined three functions which I called Cardano1(a,b,c),
Cardano2(a,b,c) and Cardano3(a,b,c). These functions can be used on excel like any
other inbuilt excel functions and give the 1st, 2nd and 3rd solutions respectively by
selecting the different a,b,c in the equation x3 + ax2 + bx + c = 0.
If the solutions are real, the functions return the real number. If the solution is a complex
number then an alphanumeric string is returned in the form of r+iz, where r is the real
part and iz the imaginary part. In next page a list of the function results of a number of
10 The code is presented in Appendix A at the end of this report.
Candidate Number: 00******

11

such equations is presented together with validation of the results (ensure that the result
becomes zero if the derived solutions are entered into the actual equation. .
Table 2 : Examples of solutions of the equation x3+ax2+bx+c=0 using the Extended
Cardano based developed Excel Functions
CARDAN1(a;b;c) , CARDAN2(a;b;c) , CARDAN3(a;b;c)

a
0.75

c
0.1875 0.015625

Imaginar
y part of
X2

Imagina
part of

11

-15

-4

-2

0.44225
0

-1.7211247852 +
i 1.2490247665

-1.72

1.25

-1.7211247852 - i
1.2490247665

-1.72

-1

10

-20

1.36880
8

-1.6844040539 +
i 3.4313313502

-1.68

3.43

-1.6844040539 - i
3.4313313502

-1.68

-3

-2

-1.0000000000 +
i 1.0000000000

-1.00

1.00

-1.0000000000 - i
1.0000000000

-1.00

-1

2.00

3.0000000000 - i
2.0000000000

3.00

-2

2.0000000000 - i
1.0000000000

2.00

-1

-4

26

-7

17

-15

3.00000
0

0.75

0.1875 0.015625

11

-15

-4

-2

10

-20

-2

-4

26

-7

17

-15

x3

Real
part of
X2

x1
0.25000
0
1.00000
0
4.00000
0
1.00000
0

1.00000
0
2.00000
0

x2

Real
part of
X2

0.250000

0.25

0.00

0.250000

0.25

-1.000000

-1.00

0.00

-2.000000

-2.00

4.000000

4.00

0.00

-0.267949

-0.27

-1.000000

-1.00

0.00

-1.000000

-1.00

3.0000000000 + i
2.0000000000

3.00

2.0000000000 + i
2.00
1.00
1.0000000000
Validation of the solutions

0.00000
0
0.00000
0
0.00000
0
0.00000
0
0.00000
0
0.00000
0
0.00000
0
0.00000
0
0.00000
0

Candidate Number: 00******

0.000000

0.000000

0.000000

0.000000

0.000000

0.000000

0.000000

0.000000

0.000000

0.000000

0.000000

0.000000

0.000000

0.000000

0.000000

0.000000

0.000000

0.000000

0.00000
0
0.00000
0
0.00000
0
0.00000
0
0.00000
0
0.00000
0
0.00000
0
0.00000
0
0.00000
0

12

0.000

0.000

0.000

0.000

0.000

0.000

0.000

0.000

0.000

Iterations

If the Cardano based solution was not available then the only available alternative
would be to solve the 3rd degree polynomial using one of the iteration methods. One
such method is the Newton Raphson method. Defined as follows:
x n+1=x n

f ( x n)
f ' (x n )

Where

f ' ( x ) is the derivative of

f (x) . (28)

It is beyond the scope of this report to investigate the Newton Rapson method or any
other iteration method. The general philosophy of the iteration methods is is to
assume an initial value x1. Using then the iteration formula, in the case of Newton
Rapson method the formula (28) above, the values of x2, x3 and so on can be
calculated. Providing that the iteration sequence converges to a number, this number
gives the required solution.
What is important with the different iteration methods is their convergence behavior
(i.e do they converge every time despite the initial guess or not, are there convergence
criteria that can be identified?), their convergence speed and the error in calculating
the required solution.
In the case of the Newton Rapson method, since the iteration formula depends on the
derivative of the function and the function in this case is a 3rd degree polynomial, it is
easy to calculate the derivative and hence come up with the iteration formula.
x n+1=x n

x 3+ a x2 +bx +c
3 x 2 +2 ax+ b

(29)

Full analysis of the Newton Rapson method or any other iteration method is beyond
the scoop of this internal assessment report. However, having the curiosity to see how
the Newton Rapson method works few examples were calculated and are presented in
the following table 3.
In the 1st example it converges after 35 iterations while on the 2nd and 3rd after 9 and 7
respectively.
The limitations that seem apparent with this method are:
The solution appears to be connected with the initial guess.
It is not understood how the initial guess should be made. A computer program
can be written which can loop using initial guesses from x to +x with steps of
p. both x and p need to be specified following further analysis.
The calculations are cumbersome. Computer programs can be written however
that solves this issue.

Candidate Number: 00*****

13

Table 3 : Examples of cubic equations of the form x3+ax2+bx+c using the


Newton Raphson Method

Candidate Number: 00*****

14

FX
A

DFX

FX

DFX

-0.75
0.187
5
0.015
6
3
2.083
33
1.472
22

1.064
81

0.5409744
45

1.99176
95

0.793
21

0.1602887
24

0.88523
09

0.612
14

0.0474929
55

0.39343
6

0.0140719
87

0.17486
04

6
3
1.378
38
0.320
01
0.351
2
0.747
2
0.939
6
0.995
2

0.0041694
78

0.07771
57

-1

0.0012354
01

0.03454
03

-1

0.009
67
6.8E05
3.5E09

0.0003660
45

0.01535
13

-1

0.0001084
58

0.00682
28

3.21356E05

0.00303
23

9.52166E06

0.00134
77

2.82123E06

0.00059
9

8.35921E07

0.00026
62

2.4768E07

0.00011
83

7.33867E08

5.259E05

2.17442E08

2.337E05

6.44273E09

1.039E05

1.90896E09

4.617E06

5.65617E10

2.052E06

1.6759E10

9.119E07

4.96564E11
1.4713E11

4.053E07
1.801E07

B
C
xi
1

6
7
8
9
1
0
1
1
1
2
1
3
1
4
1
5
1
6
1
7
1
8
1
9
2
0
2
1
2
2
2

0.491
43
0.410
95
0.357
3
0.321
53
0.297
69
0.281
79
0.271
2
0.264
13
0.259
42
0.256
28
0.254
19
0.252
79
0.251
86
0.251
24
0.250
83
0.250
55
0.250
37
0.250

20.796875

22.6875

6.1620370
37

10.0833
33

1.8257887
52

4.48148
15

Candidate Number: 00*****

FX

DFX

11

61
17.3
28
4.45
72

48
22.345
05
11.450
86

120
35.18
05
10.16
73

74
33.24
03
15.14
73

-2
3
1.729
17
0.953
7

2.833
4

7.155
44

0.564
46

0.82
91

7.3425
8

0.713
49

3.708
55

0.451
55

0.05
84

6.3209
68

0.131
99

2.373
42

0.442
31

0.00
04

6.2407
66

2.028
86
2.000
2

0.442
25
0.442
25

2E08

6.2402
51
6.2402
51

15

3
2
4
2
5
2
6
2
7
2
8
2
9
3
0
3
1
3
2
3
3
3
4
3
5

25
0.250
16
0.250
11
0.250
07
0.250
05
0.250
03
0.250
02
0.250
01
0.250
01
0.250
01

4.35942E12

8.006E08

1.29168E12

3.558E08

3.82722E13

1.581E08

1.13382E13

7.028E09

3.3612E14

3.124E09

9.94343E15

1.388E09

2.94903E15

6.176E10

8.8124E16

2.749E10

2.56739E16

1.216E10

0.25

7.63278E17

5.435E11

0.25

2.77556E17

2.44E11

0.25

8.818E12

CONCLUSION

I started with an historical review of solving equations of 1st, 2nd and 3rd degree. I was
impressed to find out that the Babylonians could solve quadratic equations in 1800
BC. As I was also impressed by the fact that the ancient Greeks had geometrical
methods to solve certain cubic equations.
When it came to 2nd degree polynomial equations I realized that the general solution is
so powerful, that not only it solves any 2nd degree polynomial equations, but the
existence of the discriminant gives information of how many solutions or roots the
equation has and whether these are real or complex numbers.
It was fascinating for me to discover that Cardano back in 1545 found a general
solution for the 3rd degree equation involving discriminant in a similar way to the
discriminant of the 2nd degree equation .
However as Cardano did not have a knowledge of complex numbers his formula gave
only one real solution when the discriminant was positive. At a later time with the
knowledge of complex numbers was solved completely according to the value of the
discriminant . I have named this general solution the Cardano extended solution.
In this report I validated the that if:
1. >0 we have 1 real and 2 complex solutions (the real solution was also
found by Cardano)
2. =0 we have 3 real solutions and at least 2 of them are equal
Candidate Number: 00*****

16

3. <0 we have 3 real solutions which are different to each other.


Although we now have a complete solution for the 3rd order degree this is
cumbersome to do by hand. It fits perfectly however in developing computer
programs to give all three solutions. I proved this by developing such a program on
Microsoft Excel Visual Basic.
An alternative to the Cardano extended solution of the 3rd degree equation is to do so
with iterations. Such a method is the Newton Raphson method which was used to
solve few equations. Without doing an in-depth analysis of the Newton Raphson
method some obvious limitations were observed and are summarized as follows.

The solution appears to be connected with the initial guess.


It is not understood how the initial guess should be made. A computer program
can be written which can loop using initial guesses from x to +x with steps of
p. both x and p need to be specified following further analysis.
The calculations are cumbersome. Computer programs can be written however
that solves this issue.

Finally comparing the two methods, the Cardano extended method and the iterations
method for solving the cubic equations using computers, the preferred alternative is
the Cardano extended method since it gives all solutions, real and complex without
the need of any initial guesses.

Candidate Number: 00*****

17

Appendix A : Excel VBA code written to solve the cubic equation


x3+ax2+bx+c=0

6.1

Function Cardan1(aa As Double, bb As Double, cc As


Double) As Variant

Dim pp As Double
Dim qq As Double
Dim DD As Double
Dim t10 As Double
Dim t100 As Double
Dim t20 As Double
Dim t200 As Double
Dim TH0 As Double
Dim 10 As Variant
Dim CS As Double
Const pi As Double = 3.1415926535897
pp = (bb - (aa ^ 2) / 3)
qq = 2 * (aa ^ 3) / 27 - aa * bb / 3 + cc
DD = (pp ^ 3) / 27 + (qq ^ 2) / 4
If DD < 0 Then
CS = ((-qq / 2) / ((-pp ^ 3 / 27) ^ (1 / 2)))
TH0 = Application.Acos(CS)
x10 = ((-pp / 3) ^ (1 / 2)) * 2 * Cos(TH0 / 3) - aa / 3
ElseIf DD = 0 Then
x10 = 2 * (-qq / 2) ^ (1 / 3) - aa / 3
Else
t10 = -qq / 2 + (DD) ^ (1 / 2)
If t10 > 0 Then t100 = (t10 ^ (1 / 3)) Else t100 = -((-t10) ^ (1 / 3)) 'VBA can not
calculate cubic root of (-ve)
t20 = -qq / 2 - (DD) ^ (1 / 2)
If t20 > 0 Then t200 = (t20 ^ (1 / 3)) Else t200 = -((-t20) ^ (1 / 3))
x10 = t100 + t200 - (aa / 3) ' this is the cardano formula solution
End If
Cardan1 = x10
End Function
6.2

Function Cardan2(aaa As Double, bbb As Double,


ccc As Double) As Variant

Dim ppp As Double


Dim qqq As Double
Dim DDD As Double
Dim t102 As Double
Dim t202 As Double
Dim t1020 As Double
Dim t2020 As Double
Candidate Number: 00*****

18

Dim TH02 As Double


Dim x202 As Variant
Dim x202r As Variant
Dim x202i As Variant
Dim x202in As Variant
Dim x202c As String
Dim CS2 As Double
Const pi As Double = 3.1415926535897
ppp = (bbb - (aaa ^ 2) / 3)
qqq = (2 * aaa ^ 3 - 9 * aaa * bbb + 27 * ccc) / 27
DDD = ppp ^ 3 / 27 + qqq ^ 2 / 4
If DDD < 0 Then
If ppp >= 0 Then CS2 = ((-qqq / 2) / ((ppp ^ 3 / 27) ^ (1 / 2))) Else CS2 = -((-qqq
/ 2) / ((-ppp ^ 3 / 27) ^ (1 / 2)))
TH02 = Application.Acos(CS2)
If ppp > 0 Then x202 = 2 * (-ppp / 3) ^ (1 / 2) * Cos((TH02 + 2 * pi) / 3) - aaa / 3
Else x202 = -2 * (-ppp / 3) ^ (1 / 2) * Cos((TH02 + 2 * pi) / 3) - aaa / 3
Cardan2 = x202
ElseIf DDD = 0 Then
x202 = (qqq / 2) ^ (1 / 3) - aaa / 3
Cardan2 = x202
Else
t102 = -qqq / 2 + (DDD) ^ (1 / 2)
If t102 > 0 Then t1020 = (t102 ^ (1 / 3)) Else t1020 = -((-t102) ^ (1 / 3)) 'VBA
can not calculate cubic root of (-ve)
t202 = -qqq / 2 - (DDD) ^ (1 / 2)
If t202 > 0 Then t2020 = (t202 ^ (1 / 3)) Else t2020 = -((-t202) ^ (1 / 3))
x202r = Format(((-(t1020 + t2020) / 2) - aaa / 3), "##,##0.0000000000")
x202i = Format(((t1020 - t2020) / 2) * (3 ^ (1 / 2)), "##,##0.0000000000")
x202in = Format(-((t1020 - t2020) / 2) * (3 ^ (1 / 2)), "##,##0.0000000000") '
this is the negative x202i
If x202i > 0 Then x202c = x202r & " + i " & x202i Else x202c = x202r & " - i "
& x202in
Cardan2 = x202c
End If
End Function
6.3

Function Cardan3(aaaa As Double, bbbb As Double,


cccc As Double) As Variant

Dim pppp As Double


Dim qqqq As Double
Candidate Number: 00*****

19

Dim DDDD As Double


Dim t103 As Double
Dim t203 As Double
Dim t1030 As Double
Dim t2030 As Double
Dim TH03 As Double
Dim x303 As Variant
Dim x303r As Variant
Dim x303i As Variant
Dim x303in As Variant
Dim x303c As String
Dim CS3 As Double
Const pi As Double = 3.1415926535897
pppp = (bbbb - (aaaa ^ 2) / 3)
qqqq = (2 * aaaa ^ 3 - 9 * aaaa * bbbb + 27 * cccc) / 27
DDDD = pppp ^ 3 / 27 + qqqq ^ 2 / 4
If DDDD < 0 Then
If pppp >= 0 Then CS3 = ((-qqqq / 2) / ((pppp ^ 3 / 27) ^ (1 / 2))) Else CS3 =
-((-qqqq / 2) / ((-pppp ^ 3 / 27) ^ (1 / 2)))
TH03 = Application.Acos(CS3)
If ppp > 0 Then x303 = 2 * (pppp / 3) ^ (1 / 2) * Cos((TH03 + 4 * pi) / 3) - aaaa /
3 Else x303 = -2 * (-pppp / 3) ^ (1 / 2) * Cos((TH03 + 4 * pi) / 3) - aaaa / 3
Cardan3 = x303
ElseIf DDDD = 0 Then
x303 = (qqqq / 2) ^ (1 / 3) - aaaa / 3
Cardan3 = x303
Else
t103 = -qqqq / 2 + (DDDD) ^ (1 / 2)
If t103 > 0 Then t1030 = (t103 ^ (1 / 3)) Else t1030 = -((-t103) ^ (1 / 3)) 'VBA
can not calculate cubic root of (-ve)
t203 = -qqqq / 2 - (DDDD) ^ (1 / 2)
If t203 > 0 Then t2030 = (t203 ^ (1 / 3)) Else t2030 = -((-t203) ^ (1 / 3))
x203r = Format(((-(t1030 + t2030) / 2) - aaaa / 3), "##,##0.0000000000")
x203i = Format((-(t1030 - t2030) / 2) * (3 ^ (1 / 2)), "##,##0.0000000000")
x203in = Format(((t1030 - t2030) / 2) * (3 ^ (1 / 2)), "##,##0.0000000000") ' this
is the negative x203i
If x203i > 0 Then x203c = x203r & " + i " & x203i Else x203c = x203r & " - i "
& x203in
Cardan3 = x203c
End If
End Function

Candidate Number: 00*****

20

Bibliography

1. Analytical solution of a cubic equation: http://wwwold.me.gatech.edu/energy/andy_phd/appA.htm


2. Internet Resources for Roots of Cubic Equations
http://mathfaculty.fullerton.edu/mathews/c2003/cubicequation/CubicEquation
Bib/Links/CubicEquationBib_lnk_1.html
3. Solutions of Polynomial Equations - Donald Rideout, Memorial University of
Newfoundland http://math2.uncc.edu/~hbreiter/m6105/polynms.pdf
4. Seminar on Advanced Topics in Mathematics-Solving Polynomial Equations Dr. Tuen Wai Ng, HKU - http://hkumath.hku.hk/~ntw/EMB.pdf/
5. Theory of Equations by J.V. Uspensky 1995 Editorial Limusa, S.A. DE C.V.
ISBN 968-18-2335-4 Cubic Function
http://en.wikipedia.org/wiki/Cubic_function

Candidate Number: 00*****

21

You might also like