# Definite integral of a continued fraction function

I came up with this function written as the following continued fraction (please correct me if my notation is incorrect): for $n\in\mathbb{N}$, let $$f(x;n)=x+\operatorname*{\LARGE K}\limits_{i=1}^{2n}x$$ I'm not sure about the notation, so in an attempt to be clearer, it's the function given by this Mathematica syntax,

FromContinuedFraction[ConstantArray[x,k]]


where k is taken to be an odd integer (otherwise $f$ careens off to infinity at $x=0$).

In other words, $$f(x;n)=\overbrace{x+\cfrac{1}{x+\cfrac{1}{x+\ddots}}}^{2n-1 \,\, x\text{'s}}$$

I'm curious as to whether there exists a closed form for the definite integral of this function over $(0,1)$ as $n\to\infty$, ie. for the value of the integral

$$\mathcal{I}_n=\lim_{n\to\infty}\int_0^1f(x;n)\,\mathrm{d}x$$

For $x=1$, clearly $f$ takes on a value of the golden ratio $\varphi$, while at $x=0$ there's a removable discontinuity for which $f\to0$.

By manipulating the plot of the function over various values of k, I noticed that the function appears to be bounded above by a line through $(0,1)$ and $(1,\varphi+1)$, which suggests that the area is at most $$\mathcal{I}_n\le\int_0^1\bigg((\varphi-1)x+1\bigg)\,\mathrm{d}x=\frac{1+\varphi}{2}$$ Is the value of $\mathcal{I}_n$ identically its upper bound? I'm hesitant to think so because the plots in Mathematica are showing a slight gap between the blue and orange curves. Perhaps it's just an optical illusion, or just converging very slowly. Here's a list of plots for different k ($5$, $15$, and $99$), along with the conjectured upper bound curve, along with an extra plot zoomed in on the "gap" for k$=151$.

If the limit $y = \lim_{n \to \infty} f(x; n)$ exists, wouldn't it be given by
$$y = x + \frac1{y} \implies y^2-x y-1=0 \implies y = \frac{x}{2} + \frac12 \sqrt{x^2+4}$$
$$\lim_{n \to \infty} \int_0^1 dx \, f(x;n) = \frac12 \int_0^1 dx \, \left (x + \sqrt{x^2+4} \right ) = \frac{\phi}{2} + \log{\phi}$$
This is close to, but a little smaller, than your upper bound of $(1+\phi)/2$.
• Ah thank you. I think the result should be $\log\phi$ in place of $2\log\phi$, though. – user170231 Feb 8 '16 at 20:00