# Continued Fraction Expansion of Irrational Square Root/Examples/2

## Examples of Continued Fraction Expansion of Irrational Square Root

The continued fraction expansion of the square root of $2$ is given by:

$\sqrt 2 = \sqbrk {1, \sequence 2}$

### Convergents

The sequence of convergents to the continued fraction expansion of the square root of $2$ begins:

$\dfrac 1 1, \dfrac 3 2, \dfrac 7 5, \dfrac {17} {12}, \dfrac {41} {29}, \dfrac {99} {70}, \dfrac {239} {169}, \dfrac {577} {408}, \dfrac {1393} {985}, \dfrac {3363} {2378}, \ldots$

## Proof

 $\ds \sqrt 2$ $=$ $\ds 1 + \paren {\sqrt 2 − 1}$ $\ds$ $=$ $\ds 1 + \frac {\paren {\sqrt 2 − 1} \paren {\sqrt 2 + 1} } {\sqrt 2 + 1}$ multiplying top and bottom by $\sqrt 2 + 1$ $\ds$ $=$ $\ds 1 + \frac {\paren {\sqrt 2}^2 − 1^2} {\sqrt 2 + 1}$ Difference of Two Squares $\ds$ $=$ $\ds 1 + \frac 1 {1 + \sqrt 2}$ as $\paren {\sqrt 2}^2 − 1^2 = 2 - 1 = 1$

Thus it is possible to replace $\sqrt 2$ recursively:

 $\ds \sqrt 2$ $=$ $\ds 1 + \frac 1 {1 + \sqrt 2}$ $\ds$ $=$ $\ds 1 + \frac 1 {1 + \paren {1 + \cfrac 1 {1 + \sqrt 2} } }$ $\ds$ $=$ $\ds 1 + \frac 1 {2 + \cfrac 1 {1 + \sqrt 2} }$ $\ds$ $=$ $\ds 1 + \frac 1 {2 + \cfrac 1 {1 + \paren {1 + \cfrac 1 {1 + \sqrt 2} } } }$ $\ds$ $=$ $\ds 1 + \frac 1 {2 + \cfrac 1 {2 + \cfrac 1 {1 + \sqrt 2} } }$

The pattern repeats indefinitely, producing the continued fraction expansion:

$\sqrt 2 = \sqbrk {1, 2, 2, 2, \ldots} = \sqbrk {1, \sequence 2}$

$\blacksquare$