Examples of Computing Infinite Continued Fractions

# Examples of Computing Infinite Continued Fractions

We have seen that every infinite simple continued fraction $\langle a_0; a_1, a_2, ... \rangle$ with $a_0 \in \mathbb{Z}$ and $a_n \in \mathbb{N}$ for $n \geq 1$ converges to an irrational number. We will now look at some examples of computing some infinite simple continued fractions in this form.

## Example 1

Compute $\langle 1; 1, 1, 1, 1, ... \rangle$.

Let $x = \langle 1; 1, 1, 1, 1, ... \rangle$. Then:

(1)
\begin{align} \quad x &= \langle 1; 1, 1, 1, 1, ... \rangle \\ &= 1 + \frac{1}{1 + \frac{1}{1 + \frac{1}{1+ ...}}} \\ &= 1 + \frac{1}{x} \end{align}

Therefore $x = 1 + \frac{1}{x}$. Hence $x^2 - x - 1 = 0$. Using the quadratic formula gives us that:

(2)
\begin{align} \quad x = \frac{1 \pm \sqrt{1 -4(1)(-1)}}{2} = \frac{1\pm \sqrt{5}}{2} \end{align}

Since $x > 0$ we have that $x = \frac{1 + \sqrt{5}}{2} = \phi$, the golden ratio.

## Example 2

Compute $\langle 2 ; 1, 2, 1, 2, ... \rangle$.

Let $x = \langle 2 ; 1, 2, 1, 2, ... \rangle$. Then:

(3)
\begin{align} \quad x &= \langle 2 ; 1, 2, 1, 2, ... \rangle \\ &= 2 + \frac{1}{1 + \frac{1}{2 + \frac{1}{1 + \frac{1}{2 + ...}}}} \\ &= 2 + \frac{1}{1 +\frac{1}{x}} \end{align}

Therefore:

(4)
\begin{align} x &= 2 + \frac{1}{\frac{x+1}{x}} \\ &= 2 + \frac{x}{x+1} \end{align}

Multiply both sides by $x + 1$ to get:

(5)
\begin{align} \quad x(x+1) &= 2(x + 1) + x \\ x^2 + x &= 2x + 2 + x \end{align}

Hence $x^2 -2x - 2 = 0$. Using the quadratic formula and we get that:

(6)
\begin{align} \quad x = \frac{2 \pm \sqrt{4 - 2(1)(-2)}}{2} = \frac{2\pm \sqrt{8}}{2} = 1 \pm \sqrt{2} \end{align}

Since $x > 0$ we must have that $x = 1 + \sqrt{2}$.