### Good Approximations

Solve quadratic equations and use continued fractions to find rational approximations to irrational numbers.

### There's a Limit

Explore the continued fraction: 2+3/(2+3/(2+3/2+...)) What do you notice when successive terms are taken? What happens to the terms if the fraction goes on indefinitely?

### Not Continued Fractions

Which rational numbers cannot be written in the form x + 1/(y + 1/z) where x, y and z are integers?

# Continued Fractions I

##### Stage: 4 and 5

Continued fractions are written as fractions within fractions which are added up in a special way, and which may go on for ever. Every number can be written as a continued fraction and the finite continued fractions are sometimes used to give approximations to numbers like $\sqrt 2$ and $\pi$.
To see how to work out a continued fraction let $$X = {1\over\displaystyle 2\;+\; {\strut 3\over \displaystyle 4 }}.$$ Adding the fractions in the denominator of $X$ we see the denominator is $11/4$. So $X= 1/(11/4)=4/11$.
Let us work out the slightly longer continued fraction $$Y = {1\over\displaystyle 2\;+\; {\strut 3\over \displaystyle 4\;+\; {\strut 5\over \displaystyle 6 }}}.$$ We can calculate $Y$ as follows: $$Y = {1\over\displaystyle 2\;+\; {\strut 3\over \displaystyle 4\;+\; {\strut 5\over \displaystyle 6 }}} = {1\over\displaystyle 2\;+\; {\strut 3\over \displaystyle 29/6}} = {1\over\displaystyle 2\;+\; {\strut 18\over \displaystyle 29}} = {1\over\displaystyle 76/29}={29\over 76}.$$ Can you show that $${1\over\displaystyle 2\;+\; {\strut 2\over \displaystyle 2\;+\; {\strut 2\over \displaystyle 2\;+\; {\strut 2\over \displaystyle 3 }}}}\quad = \quad {11\over 30}\quad ?$$ Now we have got the idea we are in for some surprises! Watch out for some patterns in the numbers that come up. Work out the values of the five continued fractions: $$1,\quad {1\over 1+1},\quad {1\over\displaystyle 1\;+\; {\strut 1\over \displaystyle 1\;+\; {\strut 1 }}},\quad {1\over\displaystyle 1\;+\; {\strut 1\over \displaystyle 1\;+\; {\strut 1\over \displaystyle 1\;+\; {\strut 1 }}}},\quad {1\over\displaystyle 1\;+\; {\strut 1\over \displaystyle 1\;+\; {\strut 1\over \displaystyle 1\;+\; {\strut 1\over \displaystyle 1\;+\; {\strut 1 }}}}}.$$ Check your answers

Did you find the easiest way to calculate these? For example, you should be able to see that the last one is $${1\over\displaystyle 1\;+\; {\strut 3\over \displaystyle 5 }}\quad = \quad {5\over 8}.$$ In this sequence of continued fractions you can always calculate one quickly by using the previous answer. The next fraction in this sequence is $${1\over\displaystyle 1\;+\; {\strut 5\over \displaystyle 8 }}\quad = \quad {8\over 13}.$$ The numbers we get in order are $1, 2, 3, 5, 8, 13$. What do you think the next number is? Yes, these are the Fibonacci numbers. What do you think the next continued fraction in the sequence is?

Now let us find out what happens if the continued fraction goes on for ever. We write this as $$f = {1\over\displaystyle 1+ {\strut 1\over \displaystyle 1\;+\; {\strut 1\over \displaystyle 1\;+\; \cdots }}}.$$ Can you see why we have $$f = {1\over 1+f}\quad ?$$ This gives the quadratic equation $f^2 + f -1 = 0$. Because $f$ is positive we get the one solution $$f = {\sqrt{5}-1\over 2},$$ the ratio of the shorter to the longer side of the Golden Rectangle!

Now investigate the continued fraction $${6\over\displaystyle 1\;+\; {\strut 6\over \displaystyle 1\;+\; {\strut 6\over \displaystyle 1\;+\; {\strut 6\over \displaystyle 1\;+\; \cdots }}}}.$$ The answer is a small whole number (which is obviously less than 6).

You may like to try a problem on continued fractions and its solution or the problem Fibonacci numbers and its solution.

You can find out more about the many contexts in which Fibonacci numbers appear by exploring a website which is devoted entirely to them. This site has practical activities for work on Fibonacci numbers and references to books giving many more.

The next part of the series is here. See also the article Approximations, Euclid's Algorithm and Continued Fractions to find out how continued fractions are used to give very quickly better and better rational approximations to numbers like pi.