Pocket maths: good rational approximations


< change language

An obvious way of creating rational approximations for irrational numbers is by truncating its decimal expansion. For example, $3$, $3.1$ and $3.14$ are all rational approximations of $\pi $; as fractions, those approximations would be written $3$, $\frac{31}{10}$ and $\frac{314}{100} $.

Notice how $\frac{314}{100}$ has $100$ as the denominator and yet only produces an approximation correct up to two decimal places.

Claim: by using continued fractions one can obtain better rational approximations for irrational numbers.

Method: if $x $ is an irrational number, instead of truncating its decimal expansion, we can truncate its continued fraction.
Taking $\pi $ as an example, we have $$\pi = 3 + \frac1{7 + \frac1{15 + \cdots}} $$ and by taking $$\pi \approx 3 + \frac17 = \frac{22}{7} $$ we get the approximation $\pi \approx 3.14285\cdots$: it is correct up to two decimal places just as $\frac{314}{100} $, but $7$ is a much smaller denominator than $100$. (And all in all, $\frac{22}{7}$ is a much more elegant fraction that $\frac{314}{100} $)

This can be done for any irrational number and it can be shown that this method produces the best rational approximations for irrational numbers... maybe a post for another time!

What is your favourite continued fraction?

  - RGS

Popular posts from this blog

Pocket maths: how to compute averages in your head

Tutorial on programming a memory card game

Markov Decision Processes 02: how the discount factor works