Understanding Leibniz formula: $D^n (f g) = \sum\limits_{k=0}^{n} \binom{n}{k} D^{n-k}f D^kg$ I would like some clarification for better understanding of Leibniz formula: $$D^n (f g) = \sum\limits_{k=0}^{n} \binom{n}{k} D^{n-k}f D^kg$$
If I use the formula with the following expression: $f(x)= x^3e^x$
$$D^n (f g) = \sum\limits_{k=0}^{n} \binom{n}{k} D^{n-k}x^3 D^k e^x = \binom{n}{0} 6e^x + \binom{n}{1} 6x e^x + \binom{n}{2} 3x^2e^x + \binom{n}{3} x^3 e^x$$
But when using the commutative law I get a different result...
$$D^n (gf) = \sum\limits_{k=0}^{n} \binom{n}{k} D^{n-k}e^x D^k x^3 = \binom{n}{0} e^x x^3 + \binom{n}{1} e^x 3x^2 + \binom{n}{2} e^x 6x + \binom{n}{3} e^x6$$
Since my question was to calculate $D^nf$ of $f(x) = x^3e^x$ I get two different expressions depending on which "order" I use which seems strange...
 A: $$D^n (gf) = \sum\limits_{k=0}^{n} \binom{n}{k} D^{n-k}e^x D^k x^3 = \binom{n}{0} e^x x^3 + \binom{n}{1} e^x 3x^2 + \binom{n}{2} e^x 6x + \binom{n}{3} e^x6$$
Second expression you wrote  is correct but the first formula you wrote you  made mistake.
Let me show where you made mistake
$$D^n (f g) = \sum\limits_{k=0}^{n} \binom{n}{k} D^{n-k}x^3 D^k e^x \neq \binom{n}{0} 6e^x + \binom{n}{1} 6x e^x + \binom{n}{2} 3x^2e^x + \binom{n}{3} x^3 e^x$$
The first expression you wrote  must be:
$$D^n (f g) = \sum\limits_{k=0}^{n} \binom{n}{k} D^{n-k}x^3 D^k e^x =\binom{n}{0} \frac{d^n(x^3)}{dx^n} e^x + \binom{n}{1} \frac{d^{n-1}(x^3)}{dx^{n-1}} e^x+\binom{n}{2} \frac{d^{n-2}(x^3)}{dx^{n-2}} e^x +....+\binom{n}{n-3} \frac{d^3(x^3)}{dx^3}e^x + \binom{n}{n-2} \frac{d^2(x^3)}{dx^2}e^x+\binom{n}{n-1} \frac{d(x^3)}{dx}e^x+\binom{n}{n} x^3e^x   $$
To use the fact:  $$\frac{d^m(x^3)}{dx^m}=0$$where $m>3$
You can get 
$$D^n (f g) = \sum\limits_{k=0}^{n} \binom{n}{k} D^{n-k}x^3 D^k e^x =\binom{n}{n-3} \frac{d^3(x^3)}{dx^3}e^x + \binom{n}{n-2} \frac{d^2(x^3)}{dx^2}e^x+\binom{n}{n-1} \frac{d(x^3)}{dx}e^x+\binom{n}{n} x^3e^x   $$
To use the fact: $$\binom{n}{n-k}=\binom{n}{k}=\frac{n!}{k!(n-k)!}$$
$$D^n (f g) = \sum\limits_{k=0}^{n} \binom{n}{k} D^{n-k}x^3 D^k e^x =\binom{n}{3} \frac{d^3(x^3)}{dx^3}e^x + \binom{n}{2} \frac{d^2(x^3)}{dx^2}e^x+\binom{n}{1} \frac{d(x^3)}{dx}e^x+\binom{n}{0} x^3e^x   $$
A: Note that the RHS of your equations for $D^n(fg)$ and $D^n(gf)$ have the exact same $n$ functions and $n$ coefficients, but $D^n(gf)$ has the functions arranged in the reverse order. If we can establish that the original sequence of coefficients is equal to the sequence of coefficients in reverse order, we'll have established the desired equality. This is the goal.
As @Luis says, what we need is
\begin{equation}
\binom{n}{k} = \binom{n}{n-k}. 
\tag{1}
\end{equation}
Note that the LHS of $(1)$ is our sequence of coefficients in the original order of $D^n(fg)$, and the RHS of $(1)$ is the reversed sequence of coefficients! Since $(1)$ says they're equal, we've established what we set out to.
