# Proving n! = (x^n)(e^-x) integrated from 0 to infinity

## Homework Statement

Prove $$\int_{0}^{\infty}x^{n}e^{-x} dx = n!$$

## Homework Equations

$$0! = 1$$ (by convention)

## The Attempt at a Solution

Basic step:
$$n=0 \\ \int_{0}^{\infty}x^{0}e^{-x} dx\ = 0! = 1\\ \int_{0}^{\infty}e^{-x} dx\ = -[e^{-\infty}-e^{0}]\\ -[e^{-\infty}-e^{0}] = -[\frac{1}{e^{\infty}}-1]\\ -[\frac{1}{e^{\infty}}-1] = -[0-1] = 1$$
Therefore the statement is true for n = 0.

Assuming that $$\int_{0}^{\infty}x^{n}e^{-x} dx = n!$$ is true,
I need to show $$\int_{0}^{\infty}x^{n+1}e^{-x} dx = (n+1)!$$

I don't really know what to do from here. I emailed the TA and he said to integrate by parts, but we haven't been taught that , and he hasn't replied again so if someone could help me out that would be great! Thanks!

dextercioby
Homework Helper

Well I would assume it is integrating the parts that are multiplied together, but I do not know how to do that.

dextercioby
Homework Helper
Then refresh your memory, go to the high-school book teaching you the part integration.

SammyS
Staff Emeritus
Homework Helper
Gold Member

## Homework Statement

Prove $$\int_{0}^{\infty}x^{n}e^{-x} dx = n!$$

## Homework Equations

$$0! = 1$$ (by convention)

## The Attempt at a Solution

Basic step:
$$n=0 \\ \int_{0}^{\infty}x^{0}e^{-x} dx\ = \int_{0}^{\infty}e^{-x} dx\ = -[e^{-\infty}-e^{0}] = -[e^{-\infty}-e^{0}] = -[\frac{1}{e^{\infty}}-1] = -[\frac{1}{e^{\infty}}-1] = -[0-1] = 1=0!$$
Therefore the statement is true for n = 0.

Assuming that $$\int_{0}^{\infty}x^{n}e^{-x} dx = n!$$ is true,
I need to show $$\int_{0}^{\infty}x^{n+1}e^{-x} dx = (n+1)!$$
I don't really know what to do from here. I emailed the TA and he said to integrate by parts, but we haven't been taught that , and he hasn't replied again so if someone could help me out that would be great! Thanks!
Since you don't know integration by parts, you might try to integrate by trial & error. In other words, try to find the anti-derivative of $\displaystyle x^{n+1}e^{-x}$ by finding a function whose derivative is $\displaystyle x^{n+1}e^{-x}\ .$ In this case that's not a difficult as it may at first seem.

This step may strike you as a bit crazy, but what is the derivative of $\displaystyle x^{n+1}e^{-x}\ ?$ Well, the derivative of $\displaystyle x^{n+1}e^{-x}\$ has a term which is also the same function, $\displaystyle x^{n+1}e^{-x}\ .$

Integrate both sides of the result, & see where that takes you.

Now that I look at that, the result you want should be staring right at you.

Last edited:
Thanks guys! I looked up integration by parts, and got to

$$\int_{0}^{\infty} x^{n+1}e^{-x} dx,\ \\ u = x^{n+1} \\ du = (n+1)x^{n} dx\ \\ dv = e^{-x} dx \\ \frac{dv}{dx}\ = e^{-x} \\ v = -e^{-x}$$

Last edited:
SammyS
Staff Emeritus
Homework Helper
Gold Member
Thanks guys! I looked up integration by parts, and got to

$$\int_{0}^{\infty} x^{n+1}e^{-x} dx\ \\ u = x^{n+1} \\ du = (n+1)x^{n} dx\ \\ dv = e^{-x} dx \\ \frac{dv}{dx}\ = e^{-x} \\ v = e^{-x}$$

Well, v = -e-x .

Thanks, yeah I had that written, but I didn't get it down, can you tell me what was wrong with my LaTeX before I continue the rest of my work?

SammyS
Staff Emeritus
Homework Helper
Gold Member
Thanks, yeah I had that written, but I didn't get it down, can you tell me what was wrong with my LaTeX before I continue the rest of my work?

You have an underscore, _ , in the fraction command, \frac_{}{} .

Also, you were missing the ^ with the ∞.

Have you completed the integration part of the proof ?

I was going to say, just "QUOTE" my post, but that won't work.

What will work is to "Right click" on the LaTeX output of my post, then "Show math as" to look at the TEX commands.

$$\int_{0}^{\infty} x^{n+1}e^{-x} dx,\ \\ u = x^{n+1} \\ du = (n+1)x^{n} dx\ \\ dv = e^{-x} dx \\ \frac{dv}{dx}\ = e^{-x} \\ v = -e^{-x}\\ \int udv\ = uv - \int vdu\ \\ -x^{n+1}e^{-x} + (n+1)\int e^{-x}x^{n} dx\$$

Last edited:
Yeah, ha I'm posting as I work on other problems, so I post a little bit, and then I update. It should be edited as far as I have gotten now. I'm not really sure what to do to prove that equals $$(n+1)n!$$

SammyS
Staff Emeritus
Homework Helper
Gold Member
Yeah, ha I'm posting as I work on other problems, so I post a little bit, and then I update. It should be edited as far as I have gotten now. I'm not really sure what to do to prove that equals $$(n+1)n!$$
Turn that indefinite integral into a definite integral with limits 0 to ∞ , & use your induction hypothesis.

$$-x^{n+1}e^{-x} + (n+1)n!$$
So do I have to prove the first part equals 0?

$$-x^{n+1}e^{-x} + (n+1)n!$$
So do I have to prove the first part equals 0?

Pretty simple using L'hopitals rule.

mmk, but what would the limit approach?

$$\lim_{x \to \ ?} \frac{-x^{(n+1)}}{e^{x}}$$
where
$$f(x) = -x^{(n+1)}\\ g(x) = e^{x}$$

SammyS
Staff Emeritus
Homework Helper
Gold Member
$$-x^{n+1}e^{-x} + (n+1)n!$$
So do I have to prove the first part equals 0?
If $\displaystyle\ \ \int x^{n+1}e^{-x} dx= -x^{n+1}e^{-x} + (n+1)\int e^{-x}x^{n} dx\,,$

then $\displaystyle\ \ \left.\int_{0}^{\infty} x^{n+1}e^{-x} dx= -{\LARGE{(}}x^{n+1}e^{-x}\right|_0^\infty + (n+1)\int_0^\infty e^{-x}x^{n} dx\ .$

$$\displaystyle\ \ \left.\int_{0}^{\infty} x^{n+1}e^{-x} dx= -{\LARGE{(}}x^{n+1}e^{-x}\right|_0^\infty{\LARGE{)}} + (n+1)\int_0^\infty e^{-x}x^{n} dx\ \\ = {\LARGE{[}}-\frac{x^{n+1}}{e^{\infty}} + x^{(n+1)}{\LARGE{]}} + (n+1)n! \\ = {\LARGE{[}}x^{(n+1)}{\LARGE{]}} + (n+1)n! \\ = (n+1)n! + x^{(n+1)}$$

That wouldn't equal (n+1)n!...
Then what would I do? I'm not really sure what I'm doing, it just seems to be getting more complicated to me =/
Thanks for helping me though!

Last edited:
mmk, but what would the limit approach?

$$\lim_{x \to \ ?} \frac{-x^{(n+1)}}{e^{x}}$$
where
$$f(x) = -x^{(n+1)}\\ g(x) = e^{x}$$

Well clealy at zero it's zero, the infinity part you use Lhopitals rule for x-> infinity.