3

Is there a closed form for this continued fraction?

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

user21820
  • 57,693
  • 9
  • 98
  • 256
Ken
  • 135

2 Answers2

4

Here's a cute, handwavy way to do it:

$$ f(x) = x + \cfrac{1}{x+\cfrac{1}{x+\cfrac{1}{x+\dots}}}$$

Notice then that

$$ \frac{1}{f(x)} = \cfrac{1}{x+\cfrac{1}{x+\cfrac{1}{x+\dots}}} $$

Thus

\begin{align} x+\frac{1}{f(x)} &= x+\cfrac{1}{x+\cfrac{1}{x+\cfrac{1}{x+\dots}}} \\ &=f(x) \end{align}

So, we have a functional relationship

$$ x + \frac{1}{f(x)} = f(x) $$

or equivalently

$$ xf(x) + 1 = f(x)^{2} $$

This quadratic equation may be solved quite simply, we have candidate solutions:

$$ f_{\pm}(x) = \frac{x\pm\sqrt{x^{2}+4}}{2}$$

We should note that $f(1)$ as a continued fraction is precisely the golden ratio. Hence we deduce

$$ f(x) = \frac{x+\sqrt{x^{2}+4}}{2}. $$

Alex Nelson
  • 1,238
  • 7
  • 17
  • 2
    To me, it seems that the square root should take the sign of $x$ – ccorn Aug 05 '13 at 03:11
  • Simpler to consider $f(0)$ or the sign of the function for positive $x$. Also, what about for negative $x$? ccorn gives a possible solution (didn't check if it works though). – Pratyush Sarkar Aug 05 '13 at 03:28
  • Rigorously speaking, $f(x)$ doesn't converge when $x\leq0$. If I recall correctly, this is by Worpitzky's theorem...I would be rather excited if I am wrong, though, and certainly do not rule it out! – Alex Nelson Aug 06 '13 at 03:58
  • @AlexNelson: No, Worpitzky's theorem is for a totally different kind of continued fraction, so it's not relevant here. ccorn is correct for non-zero real $x$, and see my answer for the general solution for complex $x$. It's interestingly non-trivial! – user21820 Jan 01 '14 at 15:43
4

The continued fraction $[x;x,x,...]$ converges for any $x \in \mathbb{C} \backslash i(-2,2) = \{ z : z \in \mathbb{C} \wedge z \not\in \{ ir : r \in(-2,2) \} \}$, and here is my proof:

If $[x;x,x,...]$ converges to $c$,

  $c = x + 1/c$ and hence $c$ is a root of the quadratic $t \mapsto t^2 - x t - 1$

Let $r$,$s$ be the roots of the quadratic $t \mapsto t^2 - x t - 1$ and so $r + s = x$ and $r s = -1$

Let the sequence of approximants be $(a_n)$ where $a_1 = x$ (and the sequence stops if it becomes $0$)

Let $b_n = a_n b_{n-1}$ where $b_0 = 1$ and so $a_n = \frac{b_n}{b_{n-1}}$ (if $a_n$ is defined)

$b_{n+1} = a_{n+1} b_n = ( x + \frac{1}{a_n} ) b_n = ( x + \frac{b_{n-1}}{b_n} ) b_n = x b_n + b_{n-1}$ (if $a_n \ne 0$)

$b_{n+1} - r b_n = s ( b_n - r b_{n-1} ) = s^n ( b_1 - r b_0 ) = (x-r) s^n = s^{n+1}$

$b_n - r^n b_0 = \sum_{k=1}^n r^{n-k} s^k$ and hence $b_n = \sum_{k=0}^n r^{n-k} s^k$

If $r \ne s$,

  $b_n = {\large \frac{ r^{n+1} - s^{n+1} }{r-s} }$   [Or we can subtract $b_{n+1} - r b_n = s^{n+1}$ and $b_{n+1} - s b_n = r^{n+1}$]

  $a_n = {\large \frac{ r^{n+1} - s^{n+1} }{ r^n - s^n } }$ (if $a_n$ is defined)

If $r = s$,

  $b_n = (n+1) r^n$

  $a_n = \frac{n+1}{n} r$ (if $a_n$ is defined)

If $x \not\in i[-2,2]$,

  $|r| \ne 1$ otherwise $x = r - \frac{1}{r} = r - r^* = 2i~Im(r) \in i[-2,2]$

  Permute $r$,$s$ such that $|r| > 1 > |s|$ because $|r| \cdot |s| = |rs| = 1$

  $a_n \ne 0$ for any $n \in \mathbb{N}$ because $b_n = {\large \frac{ r^{n+1} - s^{n+1} }{r-s} } \ne 0$ for any $n \in \mathbb{Z}_{\ge 0}$ since $|r^{n+1}| > 1 > |s^{n+1}|$

  $a_n = {\large \frac{ r^{n+1} - s^{n+1} }{ r^n - s^n } } = r + {\large \frac{ (r-s) s^n } { r^n - s^n } } = r + {\large \frac{r-s}{ (\frac{r}{s})^n - 1 } } \to r$ as $n \to \infty$ because $(\frac{r}{s})^n \to \infty$

If $x \in \{2i,-2i\}$,

  $r = s \in \{i,-i\}$ because $(r-s)^2 = (r+s)^2 - 4rs = 0$

  $a_n \ne 0$ for any $n \in \mathbb{N}$ because $b_n = (n+1) r^n \ne 0$ for any $n \in \mathbb{Z}_{\ge 0}$

  $a_n = \frac{n+1}{n} r \to r$ as $n \to \infty$

If $x \in i(-2,2)$,

  $a_n \in i\mathbb{R}$ (if $a_n$ is defined) because $x,\frac{1}{a_{n-1}} \in i\mathbb{R}$

  If $a_n \to c$ as $n \to \infty$,

    $c \in i\mathbb{R}$ because $i\mathbb{R}$ is closed

    But $c \in \{r,s\} = {\large \frac{ x \pm \sqrt{x^2+4} }{2} }$ and hence $c \not\in i\mathbb{R}$ since $x^2+4 > 0$

    $\Rightarrow\Leftarrow$

  Therefore $( a_n )$ either terminates in a $0$ or does not converge

user21820
  • 57,693
  • 9
  • 98
  • 256
  • Note that for those values of $x \in i(-2,2)$ for which the continued fraction becomes undefined due to division by zero, we could continue on if we work in the extended complex plane $\hat{\mathbb{C}} = \mathbb{C} \cup {\infty}$ where $1/0 = \infty$ and $1/\infty = 0$ and $z + \infty = \infty$ for any $z$ and $z \cdot \infty = \infty$ for $z \ne 0$ and $z \cdot 0 = 0$ for $z \ne \infty$. It still doesn't converge, of course, since at the next iteration the continued fraction becomes $x$. But the continued fraction does converge for $x = \infty$. – user21820 Jan 01 '14 at 15:49
  • Note, though, for $x=i$, the convergents just fluctuates, cycling through $1$, $1+i$, $(1+i)/2$, without settling. So here's a puzzle: for which values of $x\in i(-2,2)$ does the partial fraction experience a divide-by-zero problem? (I mean, aside from the obvious $x=0$ solution!) – Alex Nelson Jan 01 '14 at 23:44
  • @AlexNelson: From my proof it's easy to find all $x \in \mathbb{C}$ such that it has a divide by zero; namely ${ 2~Im(r) : r^n = 1 \text{ for some } n \in \mathbb{N} }$. The simplest non-zero such $x$ is $\sqrt{2}i$. – user21820 Jan 02 '14 at 00:29