Closed form for $n$th derivative of exponential of $f$

What is the closed form for:

$$\frac{\partial^n}{\partial x^n}\exp(f(x))=\exp(f(x))\cdot[????]$$


Solution 1:

See the Wikipedia articles titled Exponential formula and Faà di Bruno's formula. Both involve enumerations of set partitions.

It's simpler to express with $\dfrac{\partial^n}{\partial x_1\,\partial x_2\,\cdots\,\partial x_n}$ than with $\dfrac{\partial^n}{\partial x^n}$, but after doing that, just declare $x_1,\ldots,x_n$ to be all the same variable and then drop the subscripts and collect like terms. So for example: \begin{align} & \frac{\partial^3}{\partial x_1\,\partial x_2\,\partial x_3} e^{f(x)} \\[10pt] & = e^{f(x)}\left(\frac{\partial^3 f(x)}{\partial x_1\,\partial x_2\,\partial x_3} \right. \\[10pt] & {} + \underbrace{\frac{\partial f(x)}{\partial x_1} \cdot \frac{\partial^2 f(x)}{\partial x_2\,\partial x_3}} + \underbrace{\frac{\partial f(x)}{\partial x_2} \cdot \frac{\partial^2 f(x)}{\partial x_2\,\partial x_3}} + \underbrace{\frac{\partial f(x)}{\partial x_3} \cdot \frac{\partial^2 f(x)}{\partial x_1\,\partial x_2}} \\[10pt] & \left.{} + \frac{\partial f(x)}{\partial x_1} \cdot \frac{\partial f(x)}{\partial x_2} \cdot \frac{\partial f(x)}{\partial x_3} \right). \end{align}

You get one term for each partition of the set of three variables. For the fourth derivative, there's one for each of the $15$ partitions of the set of four variables, etc.

Consequently $$ \frac{\partial^3 f(x)}{\partial x^3} = e^{f(x)}\left( \frac{\partial^3 f(x)}{\partial x^3} + 3 \frac{\partial f(x)}{\partial x}\cdot\frac{\partial^2 f(x)}{\partial x^2} + \left( \frac{\partial f(x)}{\partial x} \right)^3 \right), $$ and similarly with the fourth derivative the sum of the coefficients is $15$, etc.

Later note: Here's a summary of the proof: Mathematical induction on the order of the derivative.

Solution 2:

So we know that if $f,g$ are infinitely differentiable, we can compute $$ \frac{d}{dx} \left( e^{f(x)} g(x) \right) = \left( f'(x) e^{f(x)} \right) g(x) + e^{f(x)} g'(x) = e^{f(x)} \left( f'(x) g(x) + g'(x) \right). $$ So since $e^{f(x)} = e^{f(x)} \left( 1 \right)$ and that we know that all derivatives of $e^{f(x)}$ are going to be of the form $e^{f(x)}g(x)$ for some functions $g$, we can apply the above formula and assume that $$ \frac {d^n}{dx^n} e^{f(x)} = e^{f(x)} g_n(x), \qquad g_0(x) = 1. $$ We can use the formula found above to find a recurrence relation for $g_n(x)$ : $$ g_n(x) = f'(x) g_{n-1}(x) + g_{n-1}'(x), \qquad g_0(x) $$ The formula from Wolfram Alpha provided by Integral looks wrong because there should be no $f(x)^j$ in there ; it's impossible to make the function $f$ appear in the factor because all derivatives of $e^{f(x)}$ have the derivatives of $f$ appear in the factor (i.e. the function $g_n$), but never the function $f$ itself.

If you wanted this for yourself to compute higher derivatives of $e^{f(x)}$ I suggest you just apply the recurrence relation to get the first few. For a general formula I must admit I don't know. Would require more thinking.