So I'm trying to evaluate this integral. $$\int_{0}^{\infty} u^{n}e^{-u} du $$ $\forall n\in \mathbb{Z} ,n\geq0$
So here's where I'm at, I know its one of these infinite integrals so i tried using the trick you use for $\int e^x\sin(x) dx$ whre you integrate by parts a few times till you get $-\int e^x \sin(x)dx$ on the RHS and take it over. so you get two of the integrand on the LHS and divide by two. I end up with: $$\frac{1}{2}\lim_{N\to\infty}[-Ne^{-N}-e^{-N}N^{n-1}]$$ Which I think tends to $0$. Its very likely I made a mistake, but for the life of me i cant see it any help appreciated.
We can obtain a recursion relation:$$\begin{align}I_n&=\int_0^\infty u^n e^{-u}\,du\\&=\left[-u^ne^{-u}\right]_0^\infty+n\int_0^\infty u^{n-1}e^{-u}\,du\\&=nI_{n-1}\end{align}$$
Then, use the fact that $$I_0=\int_0^\infty e^{-u}\,du=1$$ to conclude that $$I_n=n!$$