Evaluating the integral $\int_{0}^{\infty} e^{-x}x^n dx$ where n=0,1,2 ...

1st Integration by part: let $a=x^n$, $da= nx^{n-1} dx$, Also $db=e^{-x}$, $b=-e^{-x}$ We have $$ -x^n e^{-x} + n\int x^{n-1}e^{-x} dx$$

2nd: let $a=x^{n-1}, da= (n-1)x^{n-2}, db= e^{-x}, b= -e^{-x}$ We have $$-x^n e^{-x} + n\left[x^{n-1}(-e^{-x}) - \int(n-1)x^{n-2}\cdot -e^{-x}\right]$$

How would you find the general form? What would it be?


The answer is $n!$

You can use an induction argument. First, note that $$\lim_{x \to \infty}e^{-x}p(x) = 0$$ for any polynomial $p$.

Then for $n \geq 1$, $$\int_0^{+\infty} e^{-x}x^n dx = \left[-e^{-x}x^{n}\right]_0^{+\infty} + n\int_0^{+\infty} e^{-x}x^{n-1} dx = 0 + n(n-1)! = n! $$

and the base case $n=0$ holds since $\int_0^{+\infty} e^{-x} dx = 1$.


Let $I_n=\int_{0}^{\infty}e^{-x}x^ndx$

$$I_{n-1}=\int_{0}^{\infty}e^{-x}x^{n-1}dx=\int_{0}^{\infty}\Big(\int_{x}^{\infty}e^{-y}dy\Big)x^{n-1}dx$$

change of variables: $\{x<y<\infty, 0<x<\infty\}\Rightarrow \{0<x<y,0<y<\infty\}$

Then,

$$I_{n-1}=\int_{0}^{\infty}\Big(\int_{0}^{y}x^{n-1}dx\Big)e^{-y}dy=\frac{1}{n}\int_{0}^{\infty}e^{-y}y^ndy=\frac{I_n}{n}$$

Then $I_n=nI_{n-1}$

Note that $I_1=1$

Then $$\int_{0}^{\infty}e^{-x}x^ndx=n!$$

For any $c>0$, the process is similar. You will get $I_{c-1}=\frac{I_c}{c}$ $$\Rightarrow I_{c}=cI_{c-1}\space\space\space\space\space\space\blacksquare$$


You want to evaluate: $$I=\int_0^{\infty}e^{-x}x^n, \ \ n=0,1,2,...$$

Note that the Gamma function (for positive integer $n$): $$(n-1)!=\Gamma(n)=\int_0^{\infty}x^{n-1}e^{-x}dx=\underbrace{e^{-x}\cdot\frac{x^n}{n}\bigg|_0^{\infty}}_{=0}+\int_0^{\infty}\frac{x^n}{n}\cdot e^{-x}dx=0+\frac{1}{n}\cdot I \Rightarrow$$ $$I=(n-1)!\cdot n=n!.$$


Consider the Laplace transform of $\mathcal{L}\{x^n\}(s)=\dfrac{n!}{s^{n+1} },\;n\in\mathbb{N}$

Plugging $s=1$ we get $\int_0^{\infty } e^{-x} x^n \, dx=n!$