Example 2.28. Compute $I_{n}=\int_{0}^{\infty} x^{n} e^{-x} d x$.
Solution. Using the formula for integration by parts, we find

$$
\int_{0}^{\infty} x^{n} e^{-x} d x=-\left.\lim _{b \rightarrow \infty} x^{n} e^{-x}\right|_{0} ^{b}+n \int_{0}^{\infty} x^{n-1} e^{-x} d x
$$

from here

$$
I_{n}=\lim _{b \rightarrow \infty} \int_{0}^{b} x^{n} e^{-x} d x=\lim _{b \rightarrow \infty}\left(-b^{n} e^{-b}+n \int_{0}^{b} x^{n-1} e^{-x} d x\right)=n I_{n-1}
$$

We find \( I_{0}=\int_{0}^{\infty} e^{-x} d x \):

$$
I_{0}=\lim _{b \rightarrow \infty} \int_{0}^{b} e^{-x} d x=\lim _{b \rightarrow \infty}\left(e^{0}-e^{-b}\right)=1
$$

Thus

$$
I_{1}=1 \cdot I_{0}=1, I_{2}=2 \cdot I_{1}=2, \ldots, I_{n}=1 \cdot 2 \cdot \ldots \cdot n=n!
$$