Continued Fractions |
A finite continued fraction is a fraction of the form \[ a_0+\cfrac{1}{a_1 + \cfrac{1}{a_2 + \cfrac{1}{ \llap{\ddots} a_{n-2}+\cfrac{}{ a_{n-1} + \cfrac{1}{a_n}}}}} \] for some real numbers \(a_0,a_1,a_2,\ldots,a_n\) where \(a_i>0\) for \(i=1,2,\ldots,n\). It is denoted by \([a_0,a_1,a_2,\ldots,a_n]\). A continued fraction is called simple if \(a_0,a_1,a_2,\ldots,a_n\) are integers.
Example.
Observation. A real number is a rational number if and only if it can be written as a finite simple continued fraction.
An infinite continued fraction is a fraction of the form \[ a_0+\cfrac{1}{a_1 + \cfrac{1}{a_2 + \cfrac{1}{ \llap{\ddots} {\:\:}}}} \] for infinitely many real numbers \(a_0,a_1,a_2,\ldots\) where \(a_i>0\) for \(i=1,2,\ldots\). It is denoted by \([a_0,a_1,a_2,\ldots]\). An irrational number expressed by an infinite continued fraction \([a_0,a_1,a_2,\ldots]\) can be approximated by its truncated form \([a_0,a_1,a_2,\ldots,a_n]\) for some \(n\geq 0\) which is called the \(n\)th convergent of \([a_0,a_1,a_2,\ldots]\), denoted by \(C_n\). It can be proved that \(\displaystyle\lim_{n\to \infty} C_n\) exists and is equal to \([a_0,a_1,a_2,\ldots]\) using the following fact: \[ C_0< C_2< C_4<\cdots< C_{2n}<\cdots< C_{2n+1}<\cdots< C_5< C_3< C_1.\]
Example.
We get the continued fraction of an irrational number \(n\) by the continued fraction algorithm:
With \(x_0=n\), recursively define \(x_{k+1}=\frac{1}{x_k-\left\lfloor x_k \right\rfloor}, \;k\geq 0\). Now define
\(a_k=\left\lfloor x_k \right\rfloor\),
\(k=0,1,2,\ldots\). Then \(n=x_0=[a_0,a_1,a_2,\ldots]\). For a rough justification, note that for \(k=0,1,2,\ldots\),
\(x_{k+1}=\frac{1}{x_k-a_k} \implies x_k=a_k+\cfrac{1}{x_{k+1}}\). Thus
\[
x_0 =a_0+\cfrac{1}{x_1}
=a_0+\cfrac{1}{a_1+\cfrac{1}{x_2}}
=a_0+\cfrac{1}{a_1+\cfrac{1}{a_2+\cfrac{1}{x_3}}}=\cdots
\]
Example. Let us find the continued fraction of \(\sqrt{2}\). \[ \begin{array}{ll} x_0=\sqrt{2} &\implies a_0=\left\lfloor x_0\right\rfloor=1\\ x_1=\frac{1}{x_0-\left\lfloor x_0 \right\rfloor}=\frac{1}{\sqrt{2}-1}=\frac{\sqrt{2}+1}{(\sqrt{2}-1)(\sqrt{2}+1)}=\sqrt{2}+1 &\implies a_1=\left\lfloor x_1\right\rfloor=2\\ x_2=\frac{1}{x_1-\left\lfloor x_1\right\rfloor}=\frac{1}{(\sqrt{2}+1)-2}=\frac{\sqrt{2}+1}{(\sqrt{2}-1)(\sqrt{2}+1)}=\sqrt{2}+1 &\implies a_2=\left\lfloor x_2\right\rfloor=2\\ \hspace{4pt}\vdots & \hspace{32pt}\vdots \end{array}\] So \(\sqrt{2}=[1,2,2,2,\ldots]\).
Last edited