# 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)Therefore $x = 1 + \frac{1}{x}$. Hence $x^2 - x - 1 = 0$. Using the quadratic formula gives us that:

(2)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)Therefore:

(4)Multiply both sides by $x + 1$ to get:

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

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