I'm learning about measure theory, specifically Lebesgue integral, and need help with the following problem:
Show that $\int_{0}^{\infty}x^ne^{-x}\,dx=n!$ by differentiating the equality $\int_{0}^{\infty}e^{-tx}\,dx=\frac{1}{t}$.
Since I had no idea how to solve this problem I first did some research and come across the definition of the Gamma function which I think this problem is related to. I have found that
$$\Gamma(x+1)=\int_{0}^{\infty}t^xe^{-t}\,dt.$$
Using integration by parts it is actually quiet easy to show that the RSH improper integral evaluates to $$\Gamma(x+1)=x\Gamma(x).$$
From the above result, substituting successively $x$ with $n-1, n-2,\ldots$ we get that the Gamma function is indeed the factorial function. In particular
$$\Gamma(n+1)=n!$$
My issue is that the problem specifically says to use the fact that $\int_{0}^{\infty}e^{-tx}\,dx=\frac{1}{t}$ and differentiate it. Nowhere in the above prove am I using this equality. How do I show that the improper integral is equal to the factorial function using the given equality?
Let $f(t)$ be the function represented by the integral
$$\begin{align} f(t)&=\int_0^\infty e^{-tx}\,dx\\\\ &=\frac1t \end{align}$$
Note that the $n$'th derivative, $f^{(n)}(t)$, of $f(t)$ is given by
$$\begin{align} f^{(n)}(t)&=\int_0^\infty (-1)^n x^n\,e^{-tx}\,dx\\\\ &=(-1)^n\,n! \frac{1}{t^{n+1}} \tag 2 \end{align}$$
Dividing both sides of $(2)$ by $(-1)^n$ and setting $t=1$ we find that
$$\int_0^\infty x^ne^{-x}\,dx=n!$$
as was to be shown!