# Limit of a sequence of integrals involving continued fractions

The following question was asked in a calculus exam in UNI, a Peruvian university. It is meant to be for freshman calculus students.

Find $$\lim_{n \to \infty} A_n$$ if

$$A_1 = \int\limits_0^1 \frac{dx}{1 + \sqrt{x} }, \; \; \; A_2 = \int\limits_0^1 \frac{dx}{1 + \frac{1}{1+\sqrt{x}} }, \; \; \; A_3 = \int\limits_0^1 \frac{dx}{1 + \frac{1}{1+\frac{1}{1+\sqrt{x}}} }, ...$$

First of all, I think this is a hard question for a midterm exam, but anyway, notice that we can calculate $$A_1$$ by making $$t=\sqrt{x}$$

$$A_1 = \int\limits_0^1 \frac{2 t dt }{1+t} = 2 \int\limits_0^1 dt - 2 \int\limits_0^1 \frac{dt}{1+t}=2-2(\ln2)=2-\ln2^2$$

Now, as for $$A_2$$ I would do $$t = \frac{1}{1+\sqrt{x}}$$ which gives $$d t = \frac{ dx}{2 \sqrt{x} (1+\sqrt{x})^2} = \frac{t^2 dx}{2 (t-1)}$$ thus upon sustituticion we get

$$A_2 = - \int\limits_1^{1/2} \frac{2 (t-1) }{t^2(1+t) } dt$$

which can easily solved by partial fractions or so. But, apparently this is not the way this problem is meant to be solved as this exam contained 4 questions to be solved in an hour. What is the trick, if any, that can be used to solve this problem without doing the unellegant partial fractions?

• Can you prove it is valid to change the position of $\lim$ and $\int$? Nov 19, 2018 at 5:59
• @Szeto: Could you post your comment as an answer (with details)? (￣▽￣) Nov 19, 2018 at 6:17
• I think this is meant to be solved without that dominated convergence theorem as it is meant for first-year students. Nov 19, 2018 at 6:17
• @JimmySabater Although first-year students have never heard of the dominated convergence theorem, they often act as though it were obvious. Nov 19, 2018 at 16:35

If I were taking that exam, I'd speculate covergence and write the integrand for $$A_\infty$$ as $$S_\infty(x) = \frac{1}{ 1 + \frac{1}{1+\frac{1}{1+\frac{1}{\ddots} }}} = \frac{1}{1+S_\infty(x)}$$ Solve the resulting quadratic for $$S_\infty^2(x) + S_\infty(x) -1 = 0$$ for $$S_\infty(x)=\frac{-1+\sqrt{5}}{2}$$. Then we immediately have $$A_\infty = S_\infty$$.

Then, I'd sit there and wonder what they intended for me to actually show on a freshman calculus exam.

• @zahbaz Is there a particular reason you choose the positive root to the quadratic equation? Nov 19, 2018 at 21:12
• @JonathanChiang Every term in the continued fraction $S_\infty(x)$ is positive and all operations involve addition, so it must be positive. Nov 19, 2018 at 21:27
• @zahbaz tell that to $\zeta(-1)$ Nov 20, 2018 at 12:57

As requested by the OP in a comment deleted by a moderator, switching of limit and integral sign is avoided as it requires a higher-than-expected level of knowledge for justification. Thus, a ‘simpler’ approach is presented.

By the substitution $$t=\sqrt x$$, $$A_n=\int^1_0f_n(t^2)(2tdt)$$

$$f_n(t^2)$$ is of the form $$f_n(t^2)=\frac{a_n+b_nt}{c_n+d_nt}$$

We have the recurrence relation $$a_{n+1}=c_n$$ $$b_{n+1}=d_n$$ $$c_{n+1}=a_n+c_n$$ $$d_{n+1}=b_n+d_n$$

Or $$c_{n+1}=c_n+c_{n-1}$$ $$d_{n+1}=d_n+d_{n-1}$$

which are the Fibonacci recurrence with initial conditions $$c_0=1, c_1=1$$ $$d_0=0, d_1=1$$

I think you can now proceed.

Also, the general term of Fibonacci sequence $$0,1,1,\cdots$$ is $$\frac{\phi^n-\overline\phi^n}{\sqrt5}$$ where $$\phi=\frac{1+\sqrt 5}2$$.

• It is very nice, but I believe this is a hard question to ask in a midterm for beginners. I dont think there is a more elementary solution, correct? Nov 19, 2018 at 6:44

Let $$A_n = \int\limits_0^1 f_n(x) dx$$. First show that each $$f_n$$ is a monotonically increasing or decreasing function in the range $$[0,1]$$, and hence $$A_n$$ lies between $$f_n(0)$$ and $$f_n(1)$$. Then note that

$$f_n(0) = 1, \frac{1}{2}, \frac{2}{3}, \frac{3}{5}, \dots$$

are the convergents of the continued fraction expansion of $$\phi$$, and $$f_n(1) = f_{n+1}(0)$$. So we have

$$\frac{1}{2} \le A_1 \le 1$$

$$\frac{1}{2} \le A_2 \le \frac{2}{3}$$

$$\frac{3}{5} \le A_3 \le \frac{2}{3}$$

and so on.

So the sequence $$A_n$$ is squeezed between consecutive convergents of the continued fraction expansion of $$\phi$$. And so $$\lim_{n \to \infty} A_n = \phi$$.

$$\sqrt{x}$$ is a McGuffin.

More generally, let $$f_1 = \frac{1}{1 + g(x) }$$ where $$g'(x) > 0, g(0) = 0$$, $$f_n(x) =\frac{1}{1+f_{n-1}(x)}$$, and $$A_n = \int_0^1 f_n(x) dx$$.

Then $$f_n(x) \to \dfrac{\sqrt{5}-1}{2}$$.

Note: I doubt that any of this is original, but this was all done just now by me.

Proof.

$$\begin{array}\\ f_n(x) &=\frac{1}{1+\frac{1}{1+f_{n-2}(x)}}\\ &=\frac{1+f_{n-2}(x)}{1+f_{n-2}(x)+1}\\ &=\frac{1+f_{n-2}(x)}{2+f_{n-2}(x)}\\ \end{array}$$

Therefore, if $$f_{n-2}(x) > 0$$ then $$\frac12 < f_n(x) \lt 1$$.

Similarly, if $$f_{n-1}(x) > 0$$ then $$0 < f_n(x) \lt 1$$.

$$\begin{array}\\ f_n(x)-f_{n-2}(x) &=\dfrac{1+f_{n-2}(x)}{2+f_{n-2}(x)}-f_{n-2}(x)\\ &=\dfrac{1+f_{n-2}(x)-f_{n-2}(x)(2+f_{n-2}(x))}{2+f_{n-2}(x)}\\ &=\dfrac{1-f_{n-2}(x)-f_{n-2}^2(x)}{2+f_{n-2}(x)}\\ \end{array}$$

$$\begin{array}\\ f_n(x)+f_n^2(x) &=\dfrac{1+f_{n-2}(x)}{2+f_{n-2}(x)}+(\dfrac{1+f_{n-2}(x)}{2+f_{n-2}(x)})^2\\ &=\dfrac{(1+f_{n-2}(x))(2+f_{n-2}(x))}{(2+f_{n-2}(x))^2}+\dfrac{1+2f_{n-2}(x)+f_{n-2}^2(x)}{(2+f_{n-2}(x))^2}\\ &=\dfrac{2+3f_{n-2}(x)+f_{n-2}^2(x)+1+2f_{n-2}(x)+f_{n-2}^2(x)}{(2+f_{n-2}(x))^2}\\ &=\dfrac{3+5f_{n-2}(x)+2f_{n-2}^2(x)}{(2+f_{n-2}(x))^2}\\ \text{so}\\ 1-f_n(x)-f_n^2(x) &=\dfrac{4+4f_{n-2}(x)+f_{n-2}^2(x)-(3+5f_{n-2}(x)+2f_{n-2}^2(x))}{(2+f_{n-2}(x))^2}\\ &=\dfrac{1-f_{n-2}(x)-f_{n-2}^2(x)}{(2+f_{n-2}(x))^2}\\ \end{array}$$

Therefore $$1-f_n(x)-f_n^2(x)$$ has the same sign as $$1-f_{n-2}(x)-f_{n-2}^2(x)$$. Also, $$|1-f_n(x)-f_n^2(x)| \lt \frac14|1-f_{n-2}(x)-f_{n-2}^2(x)|$$ so $$|1-f_n(x)-f_n^2(x)| \to 0$$.

Let $$p(x) = 1-x-x^2$$ and $$x_0 = \frac{\sqrt{5}-1}{2}$$ so $$p(x_0) = 0$$, $$p'(x) < 0$$ for $$x \ge 0$$.

Since $$f_n(x) > 0$$, $$f_n(x) \to x_0$$.

• what do you mean by Mcguffin? Dec 28, 2018 at 8:52
• Any g(x) > 0 will do. MacGuffin g.co/kgs/wDd8KQ Dec 28, 2018 at 14:26