Solution to $x=1+\frac{1}{1+\frac{1}{1+\frac{1}{1+\ldots}}}$ [duplicate]

Compute $x=1+\cfrac{1}{1+\cfrac{1}{1+\cfrac{1}{1+\ldots}}}$

Thank you

marked as duplicate by J. M. is a poor mathematician, Jyrki Lahtonen, The Chaz 2.0, Qiaochu YuanJun 9 '12 at 18:39

Denote by $x=1+\frac{1}{1+\frac{1}{1+\frac{1}{1+\ldots}}}$. Because the fraction goes on forever, the denominator of the second term in the RHS is identical to $x$. Thus, we have $x=1+1/x$ or the same as $x^2=1+x$. Thus, $x=\frac{\sqrt 5-1}{2}$.

• Strictly speaking, you need to show that the continued fraction converges. (Fortunately this is not hard. The Banach fixed point theorem, for example, will take care of it.) – Qiaochu Yuan Jun 9 '12 at 16:57
• Your stated value of $x = (\sqrt{5}-1)/2$ is smaller than 1. – Erick Wong Jun 9 '12 at 17:45
• The value of $x$ you give does not solve the equation, rather it satifies $x^2=1-x$. Did you mean $x=(1-\sqrt5)/2$, which does solve the equation? Indeed, even though the latter value is negative, the supposition that $1+\frac{1}{1+\frac{1}{1+\frac{1}{1+\ldots}}}$ denotes this value is consistent. Conventionally however such continued fractions are taken to denote the positive solution of the quadratic equation, can you see why? – Marc van Leeuwen Jun 10 '12 at 19:50
• This is definitely not a good explanation/solution of the problem. (-1). "goes on forever" is not a satisfactory term here. – Pedro Tamaroff Jun 11 '12 at 2:46

Look at the equation $$x^2-x-1=0$$

It is clear is solution is not zero. Thus, write

$$x^2=x+1$$

This is equivalent to

$$x=1+\frac 1 x$$

Using this recursively

$$x=1+\frac 1 {1+\frac 1 x}$$

Thus, define $\{ x_n\}$ recursively as $x_0=1$ and $x_n=1+\dfrac{1}{x_{n-1}}$

Show the sequence is positive, increasing for $n>3$ and bounded, thus it converges to $\ell$. You can then show that $\lim x_n=\ell = x$, where $x$ is the positive solution of the first equation discussed, namely

$$\phi = \frac{\sqrt 5 +1}{2}$$

Here is another, more pedestrian, and sketchy, way of doing this:

Let the sequence $\frac{p_n}{q_n}$ be defined as follows:

$$p_1=q_1=1$$

$$\frac{p_n}{q_n}=1+\frac 1{\frac{p_{n-1}}{q_{n-1}}} = \frac{p_{n-1}+q_{n-1}}{p_{n-1}}$$

It is clear that this computes terminated versions of the continued fraction and we have $$q_n=p_{n-1} \text{ and } p_n=p_{n-1}+q_{n-1}=p_{n-1}+p_{n-2}$$

It follows that numerator and denominator are successive Fibonacci numbers, and the limit ratio is the golden ratio.

There is an efficient discussion of continued fractions in Hardy & Wright "An Introduction to the Theory of Numbers" which shows that successive estimates from terminated fractions lie either side of the limit and converge to it.

• "terminated versions of the continued fraction" - convergents is the usual term of art. Basically, one is saying here that the $n$-th convergent of the continued fraction is $\dfrac{F_{n+1}}{F_n}$. For proving that the limit of that as $n\to\infty$ is $\phi$, see this. – J. M. is a poor mathematician Jun 9 '12 at 18:15