Sunteți pe pagina 1din 23

The

Golden Ratio and Continued


Fractions

Srinivasan Nenmeli Ph D
Introduction
The aim of this article is to introduce Continued
Fractions to high school students. Fibonacci series and
the Golden ratio [phi = 1.618......] are convenient
starting points for this exploration of continued
fractions.
Unfortunately 'Continued Fraction' [CF for short ] is
not taught in schools and do not find a place in text
books of high school math or even undergraduate texts.
This subject is of fundamental importance in number
theory and finds many fascinating applications
,especially in computer algorithms for approximations
and electrical networks.
Many noted mathematicians like Euler, Gauss and
Lagrange have contributed to this topic ; the formal

representation is due to John Wallis. John Wallis


[1616-1703] coined the term "Continued Fractions".
Legend has it that the Indian mathematician and
astronomer Aryabhata [5th century AD] first used CF for
solving linear Diaphantine equation.
We shall examine many interesting approximations to
pi , 'e' [the base of the natural logarithm] and finding
square roots and some applications in this article.

Fibonacci Series and the Golden Ratio
You may be familiar with the Fibonacci series, due to
Fibonacci [Leonardo of Pisa] :
0,1,1,2,3,5,8,13, 21, 34, 55,89, 144 .......
The pattern is 'obvious'; we add the previous two
numbers ,starting with 0 and 1.
If F(n) is the nth Fibo number, then
F(n) = F (n- 1) + F(n-2) -----------(1)
[Fibonacci developed the series by counting the number
of rabbits that would be born in an idealized breeding
pattern!]

Let us take the ratio of any two adjacent numbers:


F(n+1)/F(n) -->
8/5 = 1.6
34/21= 1.619
144/89 = 1.6179775
We can round off this ratio to 1.618 for all practical
computations with a calculator.
You will see that this ratio tends towards the Golden
ratio phi = 1.618 or the limit of F(n)/F(n-1) goes to
phi.
The Golden ratio was the favorite ratio used by Greek
architects for aesthetic appeal; for instance , the
Parthenon in Athens had a height /width ratio close to
1.62. Several flower petals follow a spiral governed by
the Golden Ratio. Seurat painted a picture with golden
ratio in various blocks inside the picture.
Note that phi is an irrational number, like pi,'e' and
2 and other square roots. Irrational numbers cannot be
expressed as ratio p/q where p and q are two integers.
Of course, some approximations can be found; for

instance we often replace pi = 22/7 =3.14285 as being


close to pi = 3.14159-- an approximation you use in
middle school. Some ancient astronomers employed
square root of 10 ,10 = 3.1623 as an approximation for
pi--- an error of 0.02 .
We shall handle several irrational numbers using
'continued fractions' or CF in this article.

Quadratic Equations and Continued Fraction
The Golden ratio of phi is actually the positive root
of this deceptively simple quadratic equation:
x2 - x - 1 =0 ---------(2)
Using the quadratic formula,
we get x= 1+ (5)/ 2 = 1.618......
Note that sqrt(5) is an irrational number and so you can
write that number to several decimal places.
Let us rewrite equation (2) as follows:
x2 = 1 + x
Divide this equation by x on both sides:
x = 1 + 1/ x -------------(3)

Equation (3) is the clue to Continued Fraction method!


Replace the 'x' in the denominator on the right side by
the same expression!
x = 1 + 1
--------
1+ 1/x
Well, you can continue doing this ,forming a "Continued
Fraction" for phi, which appears like a stair case:
x = 1 + 1
------
1 + 1
-------
1+ 1
------
1+ 1/x --------(4)
-----and so on.
This infinite expansion is called 'Continued Fraction
Expansion' or CFE.
This simple continued fraction for phi can be written as
follows:

phi = {1; 1,1,1,1,1,....} or simply


phi = { 1; ] --------(5)
As you can appreciate, this CF is the simplest of
continued fractions out there: with just '1' s only.
The numbers 1 repeating here are called 'partial
quotients.

Approximations to 'phi':
Now let us 'fold' or contract the CF by working
backwards from the last step in the stair case:
From equation (4) we get:
phi = 1 + 1
--------
1+ 1
------
1 + 1
------
1

phi = 1 +1

-------
1 +1
-----
2/1
phi= 1+1
-----
3/2
phi= 1+ 2/3 = 5/3 = 1.666
This, of course, is a poor approximation to phi [1.618]
but then I took only four steps down the stair case to
get this number.
Exercise: Repeat the process to find the approximation
to phi by taking 8 steps in the Continued fraction.
Answer: The answer is simple: you will get:
phi ~ 34/21 = 1.619, the two numbers from the Fibonacci
sequence down the series!
The numbers in Fibonacci series give the approximate
ratio of p/q for phi as found from the continued
fraction expansion or CFE. There is no surprise here.
You can see how the golden ratio is tied to a

Quadratic equation which is related to Fibonacci series


and how the Golden ratio can be expanded as a continued
fraction.
This CF with '1's as partial quotients is helpful and is
the simplest there is.
Can we find similar continued fractions for pi, e
,sqrt(2) and so on.
Well, if you find a new Continued fraction for a number
,your name would be etched into the hall of fame of
mathematics.!
The general pattern for CF
In general, a CF is written as follows:
x = a(0) + b(1)
-------------
a(1) + b(2)
---------
a(3) + b(3)
----------
a(4) + b(4)
---------

and so on.
The numbers b(1),b(2) ... can be 1, in which case we get
a "simple Continued Fraction" , as is the CF for phi.
The numbers a(1) a(2),a(3) ... are called partial
quotients.
We can express a CF as follows:
x = {a(0); a(1),a(2),....,b(1),b(2)......}
If the 'a' s repeat , write simply a with a bar over
that: .
Exercise
1 Solve the equation x2 -5x-1 =0 and find the
Continued Fraction expansion for the positive root.
[Ans: x = {5; 5,5,5,5,5...} = 5.0495097....
2 Find the approximation using three partial quotients.

A few mixed ratios and their continued fractions
To get our feet wet for CF, let us examine a few
simple mixed ratios and expanding them into CF's.
Example 1 : x= 29/19
29/19 = 1 + 10/19 = 1+ 2 (5/19)

= 1 + 2
-------
3+ 1
------
1 + 4/4

We are done! x={1;2,3,1}
These are called "finite CF" because the steps terminate
after k number of steps.
Example 2 : x = 415/93
Find the continued fraction expansion.
415/93 = 4 + 43/93
1/93/43 = 1/ 2+7/43
7/43 = 1/ (43/7) = 1/ 6+ (1/7)
We are done: x = {4;2,6,7]
These are CF s with finite terms or quotients and
rather easy to develop.
Example 3: Expand pi = 3.1416 into CF
pi = 31416/10000 = 3927/1250
= 3 + 177/1250

1250/ 177 = 7 + 11/177


177/11 = 16 + 1/11
Therefore pi ~ 3.1416 = { 3; 7,16,11}
Taking the first-order approximation, pi = 3 + 7/16=
55/16=
3.4375----not accurate enough !

Pi and its continued fractions
pi is the ratio of the circumference of a circle to its
diameter.
= circumference of a circle/ diameter.
pi is a irrational number and finding its fairly
accurate value to a few decimal places have intrigued
many minds.
One method is to inscribe a regular polygon of n-sides
in a circle and find its perimeter. The perimeter is a
close approximation to the circumference.
You can inscribe a square or octagon and keep going for
higher number of sides. Archimedes, the intrepid
mathematician, went up to 96 sided polygon or 96-gon and

found pi is approximately 22/7 . You may still use this


ratio in the middle school problems.
Remember that Archimedes had to find square roots in
every step and did not have the decimal system and had
no pocket calculator either!
Ptolemy did the same with 360 sided polygon and got pi=
3.1416.
A Chinese mathematician [430-501] used the ratio 355/113
= 3.14159292.
The Indian mathematician Bhaskara I [1114-1185] found
the ratio 3927/1250 = 3.1416.
[See the previous section in this article; most probably
both the Chinese and the Indian mathematicians used
Continued fraction expansion ,as we would show shortly.]
The modern version of CF for pi is as follows:
= [3; 7,15,1,292,1]
This requires some computation to get the value of pi.
Let us 'fold' this expansion up to the third step in
this staircase:
pi= 3+ 1/ 7 + 1

-------
15 + 1/1
= 3 + 1/7 + 1/16/15
= 3 + 1
---------
7 + 15/16
= 3 + 1/ (127/16) = 3 + 16/127 = 3.12598
= 397/127.
This is not a good approximation. [The error =
3.1416-3.1259 = 0.02 or 0.02 x100/ 314= 0.006% .
That means that the CF expansion does not converge fast;
we have to include more quotients in our folding
process.
There are other better CF's for pi. One elegant CF was
given by
L J Lange in 1999 .
His expansion is as follows:
4/ pi = 1 + 1
------
3 + 4

-------
5 + 9

------
7 + 16
--------
9 + 25
-----
and so on.
We had given earlier pi ~ 355/113 = 3.14159292 as a
useful one. The error is 0.000000266
The next approximation is : pi~ 103993/33102 ;
Check this ratio with your pocket calculator:
pi~ 3.141592653
My CASIO pocket calculator gives '4' in the last decimal
place! { most probably a pocket calculator uses such a
ratio in its software!]
Srinivasa Ramanujan [1887-1920] , a self-taught
mathematician from India, gave many results without
formal proofs or derivations. He simply wrote them down!

Among his result, the following relation was found:


4 = 2143/22
This relationship can be expanded into CF:
2143/22 = [97; 2,2,3,1,16539,1.....]
He was a master of continued fractions and perhaps used
this method. This CF yields : pi = 3.141592653.

Euler and Continued Fraction for 'e'
Leonhard Euler [1707-1783] ,the prolific mathematician ,
developed many theorems and formulas for e- the base of
natural logarithm .
Again 'e' is an irrational number.
He developed the CF for e as follows:
e = {2; 1,2,1,1,4,1,1,6,1,1,8,1,1....}
Here the partial quotients are repeating with '1's and
also multiples of 2.
This CF converges rapidly and taking the first few steps
could give a good approximation:
e ~ {2;1,2,1,1,4] = 2.7272727
The Casio calculator gives: e = 2.718281828

Euler also gave the CF for sqrt(e):


sqrt(e) = {2;1,1,1,5,1,1,9,1,1...]
Exercise:
1 Find the approximate value of e taking the first
six partial quotients in Euler's expansion. and check
the result with your calculator and find the error %.
---------------------------------------
Square roots and continued fractions
square roots which are irrational can be expanded into
continued fractions.
[Pythagoras was intrigued by the irrational nature of
square root of 2---which did not fit his view of the
Universe with whole numbers or fractions!
Heron of Alexandria found a simple method to find
square roots. His iterative formula is as follows:
x(i+1) = [1/2]( x(i) + N /x(i) ] for square root of N
where x(i) is an initial guess for the square root.
This formula can be derived from the well-known
Newton-Raphson method which involves Calculus.]
The CF's for some square roots are given here. we will

find some interesting patterns.


2 = {1; 2,2,2,2,2 ...} = { 1; }
3 = {1;1,2,1,2,1,2,1,2 } = {1; }
5 = {2;4,4,4,4......} = {2; }
and so on.
Note that these CF's have repeated quotients, with one
or more numbers repeating in the sequence.
The CF for phi was also repeating with 1's.
To 'derive' these CF's we need an iterative formula;
Let us shall derive for sqrt(2):
Write 2 = 1+ 1/x or
x = 1/ (2-1) = (2 +1)/2-1
x = 2 +1 = 1 + 1/x +1 = 2 + 1/x
So ,repeating this expression in the denominator 'x' in
the right side, we get the CF:
2 = 1 + 1/x = 1 + 1
-------
2 + 1
-------
2 + 1/x

and so on.
Therefore 2 = { 1; 2,2,2,2....}
Let us see how we can approximate 2 by using CF:
Truncating the CF to 5 quotients:
2 {1;2,2,2,2,2} we get 99/70
99/70 = 1.414285714
The value given by a Casio calculator is:
2 = 1.414213562
The error in this approximation is: err= 0.00007 only.
Therefore, if you come across 2 in your problems ,
replace that by 99/70.
Exercise:
1 Find the CF expansion for 13 and 18.
[When you find the convergent folding the CF expansion,
with each step ,you will be getting positive and
negative errors alternating; that is the approximation
is either below or above the actual value. This is
characteristic of CF's.]
Log function and CF's
For log 2 , we have the CF :

= {0; 3,3, 9}

Taking the two quotients 3,3 , we get log 2 =3/10 = 0.3


---a good approximation for 0.3010.
Another example: log2 (5) = {2;3,9,--]= 65/28

Trig functions and CF's
It is easy to relate trig functions with the square
roots we obtained:
sin 45 = cos 45 = 1/2
sin 60 = cos 30 = 3/2
There are many other relationships for hyperbolic
functions that can be expanded into CF's.

Applications
1 In the early days of computing using digital
computers, the available memory {RAM} was limited and
the speed of operation was also slow. Therefore computer
scientists looked for simplified approximations for
pi,e,square root and trig and other functions. The
approximations such as given earlier were very useful in
computer algorithms for faster execution with limited

memory.
2 Polynomials and rational functions were approximated
by CF or by using Pade' approximation or similar schemes
which could be derived from CF.
3 Many complex functions which are usually stored in
tabular form could be written using approximations
derived from CF; These are called "look-up tables".
Examples are log tables and tables for error function
integral or Gaussian distribution .
4 Continued fractions are regularly used in the analysis
of electrical networks.
5 We may employ infinite series expansions or Taylor
series for approximating functions [such as sin or
tangent functions.] But continued fractions often give
better or more accurate approximations with fewer
computations.
Linking phi,'e' and pi:
We are familiar with Euler relation:
ei +1 = 0
This relates e,pi, i , 1 and 0.

Srinivasa Ramanujan [1887-1920] gave a remarkable


Continued Fraction relating phi,pi as follows:
y = [(2 + ) - ] e2/5
y = 1 + x / (1+ x2) / (1 + x3 ) ------
where x = e-2 and is the Golden ratio.
Recent Applications
In recent decades, besides communication theory, CF's
have been used in deterministic chaos,fractals and
Mendelbrot sets and so on.
It appears that irrational numbers, mixed with rational
numbers, can create chaos as well as beautiful patterns
in the real world .



References
1 M R Schroeder --Number theory in Science and
Communication [Springer 1999]
2 Donald Knuth-- "Art of computer programming " vol 2
{seminumerical algorithms}[ Pearson educational,]

3 William Dunham -Journey through genius ,[John Wiley


/Penguin 1990]
4 M Abramowitz and I Stegun --Handbook of Mathematical
Functions [Dover,1970]
5 G H Hardy and E M Wright --An introduction to the
theory of numbers --{Oxford U P ,1984]
6 John D Barrow ---Chaos in numberland ---[+plus
magazine online]
7 L J Lange --Amer Mathematical Monthly vol 106 [1999]
[Note: The author received his doctoral degree in
engineering from Columbia University, New York .]
---------------- XXXXXXXXXXXX-----------------

S-ar putea să vă placă și