# Continued fraction of the golden ratio

It is known, that the continued fraction of $\phi = \frac{1+\sqrt{5}}{2}$ is $[\bar{1}]$. This can be shown via the equation $x^2-x-1=0$:

$$x^2-x-1=0 \Rightarrow x = 1+\frac{1}{x} = 1+ \frac{1}{1+\frac{1}{x}} = \cdots$$

As far as I can see, the only thing that has been used here is that $\phi$ is a root of the polynomial $x^2-x-1$. My question:

This polynomial has 2 roots. Why do we get the continued fraction of $\phi$ and not those of the other root? What has to be done to get the continued fraction of the other root with this method?

• The answer is simply that what you wrote does not work because the "..." is hiding a lot of things. The only way to make it precise is by a sequence of continued fraction approximations that you need to prove has a limit. Only after that is done, then you can check that the limit must satisfy the quadratic equation, and you know which root it must be, since you can also prove that the limit is positive. If you are interested see math.stackexchange.com/a/624037/21820 for the general case of the continued fraction [x;x,x,...]. – user21820 Oct 24 '14 at 9:04
• – MJD Oct 24 '14 at 16:28

The golden ratio $$x : 1 = 1 + x : x$$ leads to the equation $$x^2 - x - 1 = 0 \quad (\#)$$ It can be transformed to two different equations of the form $$x = F(x)$$ which then can be used to substitute the $x$ on the right hand side by $F(x)$ $$x = F(F(x)) = F(F(F(x))) = \cdots$$

Your transformed version of $(\#)$ was this equation: $$x = 1 + \frac{1}{x} \quad (*)$$

The repeated substitution of the RHS $x$ in $(*)$ with the RHS term $$x \mapsto 1 + \frac{1}{x}$$ results in the expansion \begin{align} x &= 1 + \frac{1}{x} \quad (\mbox{EX}1.1) \\ &= 1 + \frac{1}{1 + \frac{1}{x}} \quad (\mbox{EX}1.2) \\ &= 1 + \frac{1}{1 + \frac{1}{1 + \frac{1}{x}}} \quad (\mbox{EX}1.3) \\ &= \cdots \end{align} and leads to the continued fraction $$x = 1 + \frac{1\rvert}{\lvert 1} + \frac{1\rvert}{\lvert1} + \cdots \quad (\mbox{CF}1)$$

This continued fraction is positive (consisting only of additions and divisions of positive numbers) and will converge to the positive solution of $(\#)$.

Note that each of the steps $(\mbox{EX}1.n)$ is an equation equivalent to equation $(\#)$, having two solutions for $x$, while $(\mbox{CF}1)$ converges only to the positive root. This is because the continued fraction is the limit of these finite fractions: \begin{align} c_0 &= 1 \\ c_1 &= 1 + \frac{1}{1} = 2 \\ c_2 &= 1 + \frac{1}{1 + \frac{1}{1}} = 1.5 \\ c_3 &= 1 + \frac{1}{1 + \frac{1}{1 + \frac{1}{1}}} = 1.\overline{6} \\ c_4 &= 1 + \frac{1}{1 + \frac{1}{1 + \frac{1}{1 + \frac{1}{1}}}} = 1.6 \\ \end{align}

Note that compared to the expansions $(\mbox{EX}1.n)$ the right hand side $1/x$ is dropped, which makes the difference.

To get the other root, the golden ratio equation $(\#)$ needs to be transformed into $$x = \frac{1}{-1 + x} \quad (**)$$ Repeated substitution of the RHS $x$ in $(**)$ with the RHS term $$x \mapsto \frac{1}{-1 + x}$$ results in the expansion \begin{align} x &= 0 + \frac{1}{-1 + x} \quad (\mbox{EX}2.1) \\ &= 0 + \frac{1}{-1 + \frac{1}{-1 + x}} \quad (\mbox{EX}2.2) \\ &= 0 + \frac{1}{-1 + \frac{1}{-1 + \frac{1}{-1 + x}}} \quad (\mbox{EX}2.3) \\ &= \cdots \end{align} leads to the continued fraction $$x = 0 + \frac{1\rvert}{\lvert-1} + \frac{1\rvert}{\lvert-1} + \cdots \quad (\mbox{CF}2)$$ for the negative root of $(\#)$.

Note that all equations $(\mbox{EX}2.m)$ are equivalent to equation $(\#)$ and the equations $(\mbox{EX}1.n)$, thus have two solutions for $x$.

However the derived continued fraction $(\mbox{CF}2)$ is the limit of these finite fractions: \begin{align} d_0 &= 0 \\ d_1 &= 0 + \frac{1}{-1} = -1 \\ d_2 &= 0 + \frac{1}{-1 + \frac{1}{-1}} = -0.5 \\ d_3 &= 0 + \frac{1}{-1 + \frac{1}{-1 + \frac{1}{-1}}} = -0.\overline{6} \\ d_4 &= 0 + \frac{1}{-1 + \frac{1}{-1 + \frac{1}{-1 + \frac{1}{-1}}}} = -0.6\\ \end{align} They result from dropping the right hand side $1/(-1+x)$ sub term.

Note that the negative root is nicely approached from above by the even numbered terms and from below by the odd numbered terms.

• Thanks. But this means that somewhere in the argument I do use more than the equation $x^2-x-1=0$, i.e. the fact that $\phi$ is positive. But I dont see where I use this. – Martin Oct 23 '14 at 10:11
• @Martin All of $\{[1],[1;1],[1;1,1],[1;1,1,1]\dotsb\}$ are nonnegative. Thus $[\overline1]$, which is defined as the limit of the sequence, must also be nonnegative. – Akiva Weinberger Oct 23 '14 at 19:23
• "somewhere in the argument I do use ... the fact that $\phi$ is positive": All of the finite equations $x=1+\frac1x$, $x=1+\frac1{1+\frac1x}$, $\dotsc$, are true for both roots. Passing to the limit is the step where the argument requires further assumptions. – user21467 Oct 23 '14 at 19:30