Let $n \in \mathbb{Z_+},$ use integration by parts to prove
$$\int_0^{\infty}x^ne^{-x}dx = n!$$
I know that if you repeatedly differentiate $x^n$ you get $n!$, but I don't know how to prove this?
A step by step answer would be helpful. Thanks!
Let $n \in \mathbb{Z_+},$ use integration by parts to prove
$$\int_0^{\infty}x^ne^{-x}dx = n!$$
I know that if you repeatedly differentiate $x^n$ you get $n!$, but I don't know how to prove this?
A step by step answer would be helpful. Thanks!
On
Let $I_{n} =\int_{0}^{\infty}x^ne^{-x}\, dx$
Let $u = x^n \implies \frac{du}{dx} = nx^{n-1}$
Let $v=\int e^{-x}\, dx = -e^{-x}$
Then $I_{n} = uv - \int_{0}^{\infty} v\frac{du}{dx}dx = [-x^ne^{-x}]_{0}^{\infty} + n\int_{0}^{\infty}x^{n-1}e^{-x}\, dx$
Note that $\lim\limits_{x \to \infty}\frac{x^n}{e^x} = 0$ (this is pretty intuitive, as the denominator has $x$ as an exponent).
Edit:
$$\frac{x^n}{e^x}= \frac{x^n}{1+x+\frac{x^2}{2!}+...+\frac{x^n}{n!}+\frac{x^{n+1}}{(n+1)!}+...} = \frac{1}{\frac{1}{x^n}+\frac{x}{x^{n-1}}+\frac{x^2}{2!x^{n-2}}+...+\frac{x^n}{n!x^{n}}+\frac{x^{n+1}}{(n+1)!x^n}+...}$$
$\implies \lim\limits_{x \to \infty}\frac{x^n}{e^x} = 0$
Therefore $[-x^ne^{-x}]_{0}^{\infty}= -(0 - 0) = 0$
$I_{n} = 0+ nI_{n-1} = nI_{n-1}$
Then we find $I_{0} = \int_{0}^{\infty}e^{-x}\, dx = [e^{-x}]_{\infty}^{0} = 1$
Then $I_{1} = 1\cdot I_{0}$
$I_{2} = 2\cdot I_{1} = 2\cdot 1$
It is then simple to prove by induction the formula $I_{n} = n!$:
We have that $I_{0} = 1 = 0!$ so it's true for $n=1$
Assume true for $I_{n}$
Now we must prove true for $I_{n+1}$:
$I_{n+1}= (n+1)I_{n} = (n+1)n! = (n+1)!$ as required
hence true $\forall n\in\mathbb{N}$
HINT: Take $I_n=\int_0^{\infty}x^ne^{-x}dx $ so
$$\begin{align} I_n &= \int_0^\infty x^ne^{-x}dx\\ &=\left. x^n \cdot \frac{e^{-x}}{-1}\right|_0^\infty - \int_0^\infty nx^{n-1}\cdot \frac{e^{-x}}{-1}dx \\ &=0 - n(-1)\int_0^\infty x^{n-1}e^{-x}dx\\ &=n\int_0^\infty x^{n-1}e^{-x}dx \\ &= n \times I_{n-1} \end{align}$$
now you have a recursive relation $$\begin{align}I_n=nI_{n-1}=\\n(n-1)I_{n-2}=\\n(n-1)(n-2)I_{n-3}=\\ \vdots \end{align}$$