Integration of $x^n e^{-x} dx$ I've been trying solve this, and even though I feel I'm really close to the answer- I'm quite unsure of the actual answer. 
The question is a definite integral $$\int_{0}^{\infty} \frac {x^n} {e^x}\,dx$$
So, I'm integrating it by parts, and going by the LAITE principle, I get:
$$I_n = \frac {-x^n} {e^x} + \int_{0}^{\infty} \frac {n x^{n-1}} {e^x}\,dx$$
The value inside the integral is $nI_{n-1}$, so all I'm left is to get the limit of the first term as x ranges from 0 to infinity. 
I know $n!$ = $\sum\frac {x^n} {e^x}$ . 
Somehow, I'm not exactly sure why I feel like the limit of the first term would go to zero (or n!), given that formula, but I'm not exactly sure how to substitute the n! formula for $e^x$. How do I proceed from here?
The options are 

*

*$n! -nI_{n-1} $

*$ n! + nI_{n-1}$

*$ nI_{n-1}$

*none of these

 A: By parts,
$$\int_{x=0}^\infty x^ne^{-x}\,dx=-x^ne^{-x}\Big|_{x=0}^\infty+n\int_{x=0}^\infty x^{n-1}e^{-x}\,dx.$$
The first term vanishes so that
$$I_n=nI_{n-1}.$$
As the base case is
$$I_0=\int_{x=0}^\infty e^{-x}\,dx=-e^{-x}\Big|_{x=0}^\infty=1,$$
we get the superb formula
$$I_n=n!$$

Note that as $e^x$ contains all powers of $x$,
$$e^x=\sum_{k=0}^\infty\frac{x^k}{k!}\ge\frac{x^{n+1}}{(n+1)!},$$
and $$0\le x^ne^{-x}\le\frac1{(n+1)!x},$$allowing the limit at $\infty$ to cancel.
A: What you wrote for $I_n$ makes no sense because $x$ is undefined. The integration by parts does not give that. If you have an indefinite integral, it gives an indefinite integral. If you have a definite integral, then you need to evaluate the corresponding indefinite integral over the given interval. Specifically, $\int \frac {x^n} {e^x}\,dx = -\frac{x^n}{e^x} + \int \frac {nx^{n-1}} {e^x}\,dx$ and hence $\int_0^\infty \frac {x^n} {e^x}\,dx = [ -\frac{x^n}{e^x} ]_0^\infty + \int_0^\infty \frac {nx^{n-1}} {e^x}\,dx$.
To see why $\frac{x^n}{e^x} \to 0$ as $x \to \infty$, one could use L-Hopital, but a simpler reason is that $\frac{x}{e^x} \le \frac{x}{1+x+\frac{1}{2}x^2} \to 0$, and the limit of a finite product is the product of the limits if they exist.
Also, as Yves Daoust pointed out in the comments, your statement about $n!$ is wrong. (Sorry I didn't look at it earlier.) Firstly, never write $\sum$ just like that unless you know absolutely what you are doing. Always include the (integer) variable that you are summing over, and the lower and upper limits. For example, $e^x = \sum_{n=0}^\infty \frac{x^n}{n!}$ for any $x \in \mathbb{C}$. Note that in this statement $n$ is meaningless outside the summation, because it is being used as the counter variable in the summation! So it would be automatically meaningless to 'manipulate' it into $\color{red}{ e^x = \frac{1}{n!} \sum_{n=0}^\infty x^n }$, because $n$ here would be undefined. Furthermore, there is no way to define $n$ to make it true, because for instance $\sum_{n=0}^\infty x^n$ would be infinite if $x = 1$.
