1

I'm trying to calculate multiple derivatives of iterated functions, but I'm already having trouble at the the thrid one, which is worrying, because I started with the ambition of calculating arbitrary numbers of derivatives of arbitrarily often iterated functions.

I defined iterated functions like this: $$f_0(x)=x$$ $$f_1(x)=f(x)$$ $$f_n(x)=f(f_{n-1}(x))$$

I know it is usually written as $f^n(x)$, but since I have to write lots of derivatives like this $\frac{d^k}{dx^k}f(x)=f^{(k)}(x)$ I went for a subscript.

Then I started calculating and trying to spot the pattern. The first derivative was obvious pretty soon: $$\frac{d}{dx}f_n(x)=\prod_{k=0}^{n-1}f^{(1)}(f_k(x))$$ Which is just the chain-rule used $n$ times.

But already at the second derivative, things got complicated pretty quickly. I ended up writing it like this: $$\frac{d^2}{dx^2}f_n(x)=\sum_{i=0}^{n-1}\left[f^{(2)}\left(f_i(x)\right) \prod_{j=0}^{i-1}f^{(1)}(f_j(x))\prod_{\substack{k=0\\k\neq i}}^{n-1}f^{(1)}(f_k(x))\right]$$ I obtained this by using the product rule on the first derivative.

$f^{(2)}\left(f_i(x)\right)\prod_{j=0}^{i-1}f^{(1)}(f_j(x))$ Is the derivative of the $i$-th factor of the first derivative. The remaining terms in the product are: $\prod_{\substack{k=0\\k\neq i}}^{n-1}f^{(1)}(f_k(x))$


The important part is that I never wanted sub- and superscripts mixed on one $f$. Otherwise I could write the second derivative like this (leaving out the dependency upon $x$):

$$f_n^{(2)}=\sum_{i=0}^{n-1}\left[f^{(2)}\left(f_i\right) f_i^{(1)}\frac{f^{(1)}_n}{f^{(1)}\left(f_i\right)}\right]$$


That's how far I got, but now I can't find a expression for even just the next derivative. I feel like I'm missing some sort of formalism for writing more and more stacked sums/products, but I'm not sure. The pattern is so nice, but it eludes me to put it into words or onto paper somehow.

I tried defining $f_n(x) = f_{n-1}\left(f(x)\right)$, but that made the derivatives even more horrible expressions to deal with.

Question: Is there a general formula for $\frac{d^m}{dx^m}f_n(x)$?

Or, if that is too much, just a way to get to $\frac{d^3}{dx^3}f_n(x)$ would be much appreciated.

  • You should look at Faa Di Bruno's rule first. – Sarvesh Ravichandran Iyer Dec 12 '19 at 15:31
  • @астонвіллаолофмэллбэрг I have never heard of it, but just a quick glance at the wiki-article and I can tell this will be useful. Thank you! – NiveaNutella Dec 12 '19 at 15:34
  • You are welcome. Can I post the above as an answer on your request? – Sarvesh Ravichandran Iyer Dec 12 '19 at 15:35
  • @астонвіллаолофмэллбэрг As the article states, Faa Di Bruno's rule is a way of writing $$\frac{d^m}{dx^m}f(g(x))$$, but the "answer" seems to include derivatives of $g(x)$, which in this case would be $f_{n-1}(x)$, if I understand this correctly. So it would be pushing back the problem one step. I will have to read more on it. If you can answer the question with it not mixing sub-and superscripts, then you can. Otherwise it seems more of a tool to get me to the answer.. – NiveaNutella Dec 12 '19 at 15:43
  • That would be very difficult to write, I must admit! – Sarvesh Ravichandran Iyer Dec 12 '19 at 15:44

1 Answers1

2

\begin{align}f_{n+1}'''(x)&=\frac{\mathrm d^3}{\mathrm dx^3}f_{n+1}(x)\\&=\frac{\mathrm d^3}{\mathrm dx^3}f(f_n(x))\\&=\frac{\mathrm d^2}{\mathrm dx^2}f_n'(x)f'(f_n(x))\\&=\frac{\mathrm d}{\mathrm dx}f_n''(x)f'(f_n(x))+f_n'(x)^2f''(f_n(x))\\&=f'''_n(x)f'(f_n(x))+3f_n''(x)f_n'(x)f''(f_n(x))+f_n'(x)^3f'''(f_n(x))\end{align}

Writing it out this way has the advantage of avoiding plugging in complicated expressions into the already complicated derivatives. As for putting this into a non-recursive form, let $f_n'''(x)=g_n(x)\prod_{k<n}f'(f_k(x))$ to get

$$g_{n+1}(x)=g_n(x)+\begin{bmatrix}3f_n''(x)f_n'(x)f''(f_n(x))\\+f_n'(x)^3f'''(f_n(x))\end{bmatrix}\prod_{k\le n}f'(f_k(x))^{-1}$$

$$g_n(x)=\sum_{i<n}\begin{bmatrix}3f_i''(x)f_i'(x)f''(f_i(x))\\+f_i'(x)^3f'''(f_i(x))\end{bmatrix}\prod_{k\le i}f'(f_k(x))^{-1}$$

$$f_n'''(x)=\sum_{i<n}\begin{bmatrix}3f_i''(x)f_i'(x)f''(f_i(x))\\+f_i'(x)^3f'''(f_i(x))\end{bmatrix}\prod_{i<k<n}f'(f_k(x))$$

Similar such formulas can be easily derived in the same manner for higher derivatives using $f_{n+1}=f\circ f_n$ using Faà di Bruno's formula, though it is extremely messy.

  • Is it a mistake, or could you simplify the last part of your answer to a sum over

    $3f_i^{\prime\prime}$ $f_i ^{\prime}f^{\prime\prime}(f_i)+{f_i^{\prime}}^3 f ^{\prime\prime\prime}(f_i)$

    – NiveaNutella Dec 12 '19 at 16:08
  • Thanks, didn't notice the simplification. – Simply Beautiful Art Dec 12 '19 at 16:09
  • I'm not quite sure of the code of conduct, as I asked for help with $f^{(3)}_n$ and you certainly provided it. I will wait for a while, before accepting this in case someone else weighs in, if that's alright. – NiveaNutella Dec 12 '19 at 16:38
  • Accept an answer if you feel like it answered your question. You can also unaccept answers after accepting them. – Simply Beautiful Art Dec 12 '19 at 16:51