Maths WorkshopMaths problems with full solutions
Exercise 783Calculus › Single-variable calculus › Integration › Improper integralsM1Added 2 Nov 2026

Differentiating under the integral sign

#parameter integrals#Gamma function#factorial

Statement

  1. For a>0a>0 compute I(a)=∫0+∞e−ax dxI(a)=\displaystyle\int_0^{+\infty}e^{-ax}\,dx.
  2. By differentiating with respect to aa, compute ∫0+∞xe−ax dx\displaystyle\int_0^{+\infty}xe^{-ax}\,dx and guess ∫0+∞xne−ax dx\displaystyle\int_0^{+\infty}x^ne^{-ax}\,dx.
  3. Prove, by integration by parts, that ∫0+∞xne−x dx=n!\displaystyle\int_0^{+\infty}x^ne^{-x}\,dx=n!.
Hint

Part 2 relies on swapping dda\frac d{da} and ∫\int, which is allowed here (the integrand and its aa-derivative are dominated by integrable functions). For part 3, find a recurrence relation.

Show solutionHide solution

Solution

1. I(a)=[−1ae−ax]0+∞=1aI(a)=\left[-\frac1ae^{-ax}\right]_0^{+\infty}=\frac1a.

2. Differentiating I(a)=∫0∞e−axdxI(a)=\int_0^\infty e^{-ax}dx in aa gives I′(a)=−∫0∞xe−axdxI'(a)=-\int_0^\infty xe^{-ax}dx, while I′(a)=−1a2I'(a)=-\frac1{a^2}. Hence
∫0+∞xe−ax dx=1a2.\int_0^{+\infty}xe^{-ax}\,dx=\frac1{a^2}.
Repeating nn times, (−1)nI(n)(a)=∫0∞xne−axdx(-1)^nI^{(n)}(a)=\int_0^\infty x^ne^{-ax}dx and I(n)(a)=(−1)nn!an+1I^{(n)}(a)=(-1)^n\frac{n!}{a^{n+1}}, so
∫0+∞xne−ax dx=n!an+1.\int_0^{+\infty}x^ne^{-ax}\,dx=\frac{n!}{a^{n+1}}.

3. Let Gn=∫0∞xne−xdxG_n=\int_0^\infty x^ne^{-x}dx. By parts with u=xnu=x^n, v′=e−xv'=e^{-x}:
Gn=[−xne−x]0+∞+n∫0∞xn−1e−x dx=nGn−1,G_n=\bigl[-x^ne^{-x}\bigr]_0^{+\infty}+n\int_0^\infty x^{n-1}e^{-x}\,dx=nG_{n-1},
since xne−x→0x^ne^{-x}\to0 at infinity. With G0=1G_0=1, Gn=n!G_n=n!.

Remark. The function Γ(s)=∫0∞xs−1e−xdx\Gamma(s)=\int_0^\infty x^{s-1}e^{-x}dx extends the factorial to real numbers: Γ(n+1)=n!\Gamma(n+1)=n!.