14

What is the closed form for:

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

JFNJr
  • 1,055

5 Answers5

10

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.

  • You gave it more thinking than I did :P but yes, brilliant solution. +1 – Patrick Da Silva May 20 '13 at 16:57
  • @PatrickDaSilva : Thank you. – Michael Hardy May 20 '13 at 22:27
  • ....um.... I think we're going to have to regard "$f(x)$" as a function of all $3$, or all $n, variables. – Michael Hardy May 20 '13 at 22:27
  • I admit that I feel you have the exact formula to compute this because I computed the first few examples and it looks right, but I don't understand how to go in the details. How do you define a function $g(x_1,\dots,x_n)$ such that $g(x,\dots,x) = f(x)$ and everything "works" nicely? – Patrick Da Silva May 20 '13 at 22:35
  • @PatrickDaSilva : I'm not so sure that's really necessary. You just need to know that the same argument that works when you differentiate with respect to $x_{n+1}$ in the inductive step also works if $x_{n+1}$ happens to be one of $x_1,\ldots,x_n$. – Michael Hardy May 20 '13 at 23:13
  • My question was more like... "what's the inductive step"? – Patrick Da Silva May 20 '13 at 23:37
  • I wrote something about this on another occasion. (I mangled the formula on the first page but got it right later in the paper.): http://www.combinatorics.org/ojs/index.php/eljc/article/view/v13i1r1/pdf – Michael Hardy May 20 '13 at 23:42
  • I believe the right way to formally do that inductive step is to write $g(x_1,\dots,x_n) = \frac{x_1+\dots+x_n}n$ and to consider $e^{f(g(x_1,\dots,x_n))}$. Computing $\frac{\partial^n}{\partial x_1 \dots \partial x_n} e^{f(g(x_1,\dots,x_n))}$ will allow us to have the appropriate combinatorial interpretation times a factor of $\frac 1{n^n}$ that will appear on each term, but we can apply the chain rule and get rid of that $n^n$ factor on the other hand. The chain rule will allow us to write $\frac{\partial^n}{\partial g^n} e^{f(g)}$ and we will recover our identity there. – Patrick Da Silva May 20 '13 at 23:55
5

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.

  • It may only look wrong because 1) some powers of $f$ are compensated by $f^j$ which comes next and 2) there are many similar terms in the double sum which can cancel each other. – Start wearing purple May 20 '13 at 16:16
  • I really didn't understand your comment to be honest. It looks wrong to me because there should be no power of $f$ at all in the expression of the derivatives... – Patrick Da Silva May 20 '13 at 17:48
  • of course. What I'm saying is that, although at first sight Wolfram answer contains terms containing powers of $f$, such terms may cancel each other in the sum. – Start wearing purple May 20 '13 at 18:05
  • @O.L. What I'm saying is even if it was right, it "feels" wrong because when I look at that formula I almost feel like I'm better off computing it by hand. I mean, there's a sum of sums in there. That must be a hell of a lot cancellation ; I believed there was a more brilliant way to think about this ; Michael Hardy found it. – Patrick Da Silva May 20 '13 at 20:22
  • 1
    Well I completely agree with that - it is clear from the very beginning that the most efficient formula should be given by a sum over partitions. – Start wearing purple May 20 '13 at 20:39
3

I dont know how to get this result, but check wolfram's solution. It's exactly what you are looking for.

http://www.wolframalpha.com/input/?i=d%5En%2Fdx%5En%28e%5E%28f%28x%29%29%29

Integral
  • 6,554
3

Related problem:(I), (II). Here is a formula for the $n$th derivative of the function $e^{\sin(x)}$

$$\left( e^{\sin(x)}\right)^{(n)}={{ i}^{{n} }}\ e^{\sin ( x )} \sum _{k=0}^{n} \sum _{j=0}^{n-k}\sum _{m = 0 }^{k} \frac{\left(-1 \right)^{n-k-m} {i}^{{ j + m}} }{{2}^{(j+m)}} {n\choose k} \left\{\matrix{n-k\\j}\right\} \left\{\matrix{k\\m}\right\} {\rm e}^{ i x (m - j)}\\ n \in \mathbb{N},\, i = \sqrt{-1}. $$

where $\left\{\matrix{n\\k}\right\}$ are Stirling numbers of the second kind.

Note: I'll appreciate if someone is interested in verifying this formula with Maple or Mathematica. I already tried it with Maple and it should be fine.

2

This is a simple application of Faà di Bruno's formula.

$$\partial_x^n e^{f(x)}=e^{f(x)}\sum \frac{n!}{\prod_{j=1}^n m_j!\,j!^{m_j}}\cdot \prod_{j=1}^nf^{(j)}(x)^{m_j},$$

where the sum is over all $n$-tuples $(m_1,\dots,m_n)\in{\Bbb N}^n$ such that $\sum_{j=1}^nj\,m_j=n$.