Prove $\int_0^\infty t^n e^{-t} dt = n!$ by differentiation

138 Views Asked by At

I have to prove $\int_0^\infty t^n e^{-t} dt = n!$ by differentiating infinitely often under the integral. $(t, x > 0)$

I think I have proven that I can make use of a Lemma we have. It is differentiation under the integral sign (see here). I'm not entirely sure about that because in the Lemma it states that we need to have $x \in I$ where $I$ is an open interval.

In this case we would have $I = (0,\infty)$, which is open, but I'm not sure if this is an interval in that sense. So I have checked the proof if we made use of some bounds $a, b$, but I couldn't find that, so I presumed that it's allowed. (And also if it's not allowed, couldn't we just use limits then and still get the same results as below?)

However, if I apply that Lemma on $\int_0^\infty e^{-xt}dt = \frac{1}{x}$, then I get:

$$-\frac{1}{x^2} = \int_0^\infty -t e^{-xt}dt$$

Again apply it:

$$\frac{2}{x^3} = \int_0^\infty t^2 e^{-xt} dt$$

Doing it iteratively will lead to:

$$\frac{n!}{x^{n+1}} = \int_0^\infty t^n e^{-xt}dt $$(depending on if $n$ is even, I might need to add a minus at two points, but it's on both sides, so no difference)

But this is not what I needed. I can multiply with $x^{n+1}$ and take it inside the integral:

$$n! = \int_0^\infty t^n \cdot e^{-t} \cdot \frac{x^{n+1}}{e^x}dt$$

This holds for any $x$. So I can choose $x$ that way, that $\frac{x^{n+1}}{e^x} = 1$, such $x$ do exist.

But is this really how it should be done?