TITLE: Is there a way to prove $\int {x^n e^x dx} = e^x \sum_{k = 0}^n {( - 1)^k \frac{{n!}}{{(n-k)!}}x^{n-k} } + C$ combinatorially?
QUESTION [19 upvotes]: In How to integrate $\int x^n e^x dx$?, it is shown that
$$\int {x^n e^x dx}  = e^x \sum_{k = 0}^n ( - 1)^k \frac{n!}{(n-k)!}x^{n-k}   + C.$$
Since $\frac{n!}{(n-k)!}$ is $P(n,k)$, the number of $k$-permutations of $n$ objects, the right-hand side of this formula smells like the  inclusion-exclusion principle to me.  In fact, the right-hand side is almost the formula for the number of derangements on $n$ elements, which is one of the classic examples of the use of the inclusion-exclusion principle. 
This would seem to imply that there is some way to interpret $\int x^n e^x dx$ combinatorially such that the right-hand side formula falls out immediately.  However, I haven't been able to see it.  (I don't even know much about combinatorial interpretations of indefinite integration - or even if there are known ways to do so in special cases like this one.)  
Does anyone know or see a way to prove 
$$\int {x^n e^x dx}  = e^x \sum_{k = 0}^n ( - 1)^k \frac{n!}{(n-k)!}x^{n-k}   + C$$
combinatorially?
Added: To clarify, I am looking for a proof that shows that the left- and right-hand sides of the formula count the same thing.  That, to me, is a combinatorial proof.

REPLY [3 votes]: I managed to find a simple probability argument that's in the spirit of what I was looking for.
First, do a variable switch, with $t = -x$: $\int x^n e^x dx = (-1)^{n+1} \int t^n e^{-t} dt$.
Now, consider the definite version of the second integral, with an extra factor of $\frac{1}{n!}$:  $$\int_0^T \frac{t^n e^{-t}}{n!} dt.$$
This is the probability that the sum of $n+1$ independent exponential(1) random variables (which has an Erlang (or gamma) distribution) is less than $T$.  
Since interarrival times in a Poisson process are independent and exponentially distributed, this is also the probability that at least $n+1$ events have occurred by time $T$ in a Poisson process with rate 1.  If $N(T)$ denotes the number of events that occur in $[0,T]$ in a Poisson(1) process, we know that $P(N(T) = k) = T^k e^{-T}/k!$.  Thus 
$$\int_0^T \frac{t^n e^{-t}}{n!} dt = P(N(T) \geq n+1) = 1 - P(N(T) \leq n) = 1 - \sum_{k=0}^n P(N(T) = k) = 1 - \sum_{k=0}^n \frac{T^k}{k!} e^{-T}.$$
Switching back in terms of $x$ and multiplying through by $n!$, we have
$$\int x^n e^x dx = - (-1)^{n+1} \sum_{k=0}^n \frac{n!}{k!} (-x)^ke^x +C = e^x \sum_{k=0}^n (-1)^{n-k} \frac{n!}{k!}x^k +C$$
$$= e^x \sum_{k=0}^n (-1)^k \frac{n!}{(n-k)!}x^{n-k} + C.$$