TITLE: Evaluate $\int_{0}^{1}\left ( x+\frac{x}{x+\frac{x}{x+\frac{x}{x+\cdots }}} \right )dx$
QUESTION [5 upvotes]: How to evaluate the following integral
$$\int_0^1 \left ( x+\cfrac{x}{x+\cfrac{x}{x+\cfrac{x}{x+\cdots }}} \right )dx$$
I have no idea how to deal with the continued fraction.

REPLY [3 votes]: Let the expression given under integral be A. Hnece
$$x+\frac{x}{A}=A$$
So
$$A=\frac{x+\sqrt{\left ( x+2 \right )^{2}-2^{2}}}{2}$$
Now the integral become
$$\frac{1}{2}\int_0^1 x+\sqrt{\left ( x+2 \right )^{2}-2^{2}}\, \mathrm{d}x$$
 hope you can take it from here.

REPLY [3 votes]: If
$$y=x+\cfrac x{x+\cfrac x{x+\cfrac x\ddots}}$$
then it follows that
$$y=x+\frac xy$$
Which upon solving (with $y\ge0$),
$$y=\frac{x+\sqrt{x^2+4x}}2$$
And thus, we have
$$\int_0^1\frac{x+\sqrt{x^2+4x}}2\ dx=\frac{1+3\sqrt5}4-2\operatorname{csch}^{-1}(2)$$
where we used the inverse hyperbolic cosecant.