# Derivatives of nested/iterated functions.

I'm learning about derivatives and I have the following function: $$f(x)=\sqrt{x+\sqrt{x+\sqrt{x}}}.$$ Of which its derivative is $$\frac{d}{dx} \sqrt{x+\sqrt{x+\sqrt{x}}} = \frac{ \frac{ \frac{ 1 }{2\sqrt{x}} +1}{2\sqrt{x+\sqrt{x}}} +1}{2\sqrt{x+\sqrt{x+\sqrt{x}}}}.$$

I am able to find its derivative using the chain rule with no problem, but the pattern spiked my curiosity. My question is if the derivative looks like this just by coincidence, or if there is something else going on, and if there is, I would particularly be grateful if I could get some references on where to find out more about this kind of functions.

• The derivative looks like this because of the chain rule. Mar 28 '16 at 19:50
• It's not really coincidence: the chain rule converts a composition to a multiplication. Is that the pattern you see? Mar 28 '16 at 19:51
• Yes, you are right, I failed to notice that the function could be looked as $f(x+f(x+f(x)))$ if $f(x) = \sqrt{x}$. That way the derivative makes much more sense to me. Mar 28 '16 at 19:57
• "spiked"? Maybe you meant to type "piqued". Mar 28 '16 at 19:58
• @DanPiponi I don't know why I thought it was 'spiked', English is not my first language. Thanks. Mar 28 '16 at 20:02

Suppose $g(x)=f(f(f(\ldots f(x))))$ where you have nested $n$ $f$'s.
Intuitively the derivative is the amount a function stretches its argument, something you can see directly from $f(x+h)\approx f(x)+f'(x)h$ if you think of $x$ as some fixed quantity and $h$ as something you're varying around zero.
So if you apply $g$, i.e. iterate $f$ times, then you expect to see the result of $n$ stretches applied one after the other. The first $f$ is applied at $x$. The second one is applied at $f(x)$. The third is applied at $f(f(x))$ and so on. So the total amount of stretching is a product of terms $f'(x)$, $f'(f(x))$, $f'(f(f(x)))$, up to $f'(f(\ldots f(x)))$ where the last term has $n-1$ $f$'s and one $f'$. This is just the chain rule but I've tried to give an intuitive idea of what's going on.