# Value of $f'(0)$ if $f(x)=\frac{x}{1+\frac{x}{1+\frac{x}{1+\ddots}}}$

Consider the function $$f(x)=\cfrac{x}{1+\cfrac{x}{1+\cfrac{x}{1+\ddots}}}$$ Determine the value of $f'(0)$.

I tried to differentiate $f(x)$ but it is not subject to chain rule, and now I'm stuck. How would I solve this?

Also how to rapidly evaluate $f(x)$ for a given $x$?

• Hint: $\displaystyle f(x) = \frac{x}{1+f(x)}$ Dec 19, 2013 at 15:00
• @Sopaii: I cleared some comments. 'universalset' is the (current) username chosen by the user who supplied this hint, it is not part of the hint. Dec 19, 2013 at 16:35

From the definition, you get

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

Thus

$$x=(1+f(x))f(x)$$

Now differentiate

$$1=f'(x)+2f(x)f'(x)=f'(x)(1+2f(x))$$

Or

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

Now, $f(0)=0$, from definition of $f$.

One remark though: I did not prove the continued fraction is differentiable or even convergent. I just assume it's true, then you can compute easily the derivative at $0$.

• i don't know how you did the differentiation Dec 19, 2013 at 15:01
• The derivative of $f(x)^2$ is $2f(x)f'(x)$. You expand the expression to $f(x)+f(x)^2$, then differentiate. Dec 19, 2013 at 15:02
• I understood nothing from your derivation of the derivative $1=f′(x)+2f(x)f′(x)=f′(x)(1+2f(x))$ where did you came up with 1 ?? Dec 19, 2013 at 15:05
• @Sopaii The derivative of $x$ with respect to $x$ is $1$. That is where the $1$ comes from. Dec 19, 2013 at 22:49

I think $$f(x)=\cfrac{x}{1+\cfrac{x}{1+\cfrac{x}{1+\ddots}}}$$ isn't automatically well defined - it isn't clear what it is a limit of. To try and make this more precise, I've considered, for $x \in \mathbb{C}\setminus \left\{0\right\}$ and $z \in \widehat{\mathbb{C}}$

$$f(x,z)=\lim_{n\rightarrow \infty} g_{x}^{n}(z).$$ Where $$g_{x}(z)=\frac{x}{1+z}$$ is a Moebius transformation in $z$ and $g_{x}^{n}$ is the $n$th iterate of $g_{x}$. There are three cases to consider, depending on whether $g_{x}$ is an elliptic, parabolic or a loxodromic Moebius transformation.

In the loxodromic case, that is if $x \notin \left(-\infty, -\tfrac{1}{4}\right]$ then the limit converges to $\alpha(x)$ for all $z \in \widehat{\mathbb{C}} \setminus \left\{\beta(x) \right\}$, where $\alpha(x)$ and $\beta(x)$ are the attracting and repelling fixed points of $g_{x}$. It turns out $\alpha(x)$ is the value of $\frac{1}{2}\left(-1 \pm \sqrt{1+4 x} \right)$ with real part greater than $-\tfrac{1}{2}$ and $\beta(x)$ is the other value. So for $x \notin \left(-\infty, -\tfrac{1}{4}\right]$

$$f(x,z)= \begin{cases} \alpha(x) &\mbox{if } z \neq \beta(x) \\ \beta(x) & \mbox{if } z = \beta(x). \end{cases}$$

The parabolic case only happens when $x=-\tfrac{1}{4}$, and here the limit converges to the fixed point of $g_{x}$, $-\tfrac{1}{2}$ for all $z$. Hence $$f(-\tfrac{1}{4},z)=-\tfrac{1}{2}$$ for all $z \in \widehat{\mathbb{C}}$.

Finally the elliptic case when $x \in \left(-\infty, -\tfrac{1}{4}\right)$. Here the limit does not exist for any $z$, except at the two fixed points of $g_{x}$. So if $z \neq \frac{1}{2}\left(-1 \pm \sqrt{1+4 x} \right)$, $f(x,z)$ is not defined. Otherwise $f(x,z)=z$.\

Edit: To complete the answer to the question, in a punctured neighborhood $N$ (say) of $x=0$, we have the loxodromic case, and since Re$(\sqrt{1+4x})>0$ in this neighborhood, $f(x,z)= \frac{1}{2}\left(-1 + \sqrt{1+4 x} \right)$ for all $z \neq \beta(x)$ and $x \in N$.

This justifies why for most $z$, $f(x,z)$ is $\frac{1}{2}\left(-1 + \sqrt{1+4 x} \right)$ and not $\frac{1}{2}\left(-1 - \sqrt{1+4 x} \right)$

Now if we fix any $z \in \widehat{\mathbb{C}}$, differentiate $f(x,z)$ with respect to $x$, then let $x \rightarrow 0$, we get a value of $1$. Noting that $f(0,z)=0$ for $z \neq -1$ shows $f(x,z)$ is continuous with respect to $x$ at $x=0$, as long as $z \neq -1$. So the derivative exists, and equals $1$ for all $z \neq -1$.

• Quite right, thanks. I've corrected my original answer. Dec 20, 2013 at 14:25

From the equation $$f(x) = \frac{x}{1 + f(x)}$$ we get $$f(x) = \frac{1}{2}\left(\pm \sqrt{1+4 x} -1 \right)$$ Obviously the $+$ solution is the right one. Expanding the square root in a series we get: $$f(x) = C^{\frac{1}{2}}_1 2 x + C^{\frac{1}{2}}_2 8 x^2 + O(x^3)$$ Therefore $f^{'}(0) = 1$.

• Why should the $+$ solution be the right one? Dec 19, 2013 at 15:08
• Because for positive values of $x$ the infinite fraction is positive. Dec 19, 2013 at 15:09
• But you want the derivative at $0$, so you want also values where $x<0$. Dec 19, 2013 at 15:10
• How do you know that it is not that the $+$ values is taken some times and the $-$ values is taken some other times? Dec 19, 2013 at 15:13