# The $n$th derivative of $f(e^x)$

Because it comes up every so often, I was wondering if there was a nice general expansion for the $$n$$th derivative of $$f(e^x)$$.

$$\frac{\mathrm d}{\mathrm dx}f(e^x)=e^xf'(e^x)$$

$$\frac{\mathrm d^2}{\mathrm dx^2}f(e^x)=e^xf'(e^x)+e^{2x}f''(e^x)$$

$$\frac{\mathrm d^3}{\mathrm dx^3}f(e^x)=e^xf'(e^x)+3e^{2x}f''(e^x)+e^{3x}f'''(e^x)$$

$$\vdots$$

One can see that we end up with the form

$$\frac{\mathrm d^n}{\mathrm dx^n}f(e^x)=\sum_{k=1}^nC(n,k)e^{kx}f^{(k)}(e^x)$$

for some constants $$C(n,k)$$. I've found that it reduces to solving the following recurrence relation:

$$C(n,k)=\begin{cases}0,&n0\land k=1\\kC(n-1,k)+C(n-1,k-1),&n>0\land k>1\end{cases}$$

From which you can deduce things such as $$C(n,2)=2^{n-1}-1$$.

Is there a nice general solution?

• Your $C(n,k)$ look a lot like the Stirling numbers of the second kind – Sri-Amirthan Theivendran Mar 15 '19 at 15:50
• @FoobazJohn look at me getting rusty – Simply Beautiful Art Mar 15 '19 at 15:51
• If you calculate the fourth derivative as well and enter the coefficients 1, 1, 1, 1, 3, 1, 1, 7, 6, 1 at oeis.org then you'll find oeis.org/A008277. – Martin R Mar 15 '19 at 16:01
• Ah, bad to use $C(n,k)$, since that is sometimes used for $\binom n k$. I almost missed the definition of $C.$ – Thomas Andrews Mar 15 '19 at 16:02
• You have seen Faa Di Bruno's rule? – Teresa Lisbon Mar 15 '19 at 16:07

As mentioned in the comments, $$C(n,k)$$ are the Stirling numbers of the second kind, $${n \brace k}$$. They have the following "closed form:" $${n\brace k}=\frac1{k!}\sum_j(-1)^j\binom{k}{j}(k-j)^n.$$ If you like, you can substitute that mess for $$C(n,k)$$, but I think it is better to leave it as $${n \brace k}$$. This is as simple as it gets.