---
tag: W6R4T2GY78
kind: proof
name: Proof that the gamma function extends the factorial
msc: [33B15]
proves: 0FDCW77H44
uses: [0V3FZMVB4K, 0VCTBJMEJF, 0TV07AQT62, 0RMVS7RXZX, 0044CPHJBV, 0KY08TWDMQ, 0EX9GFJ0B3, 0RXX2PT1MQ, 0E8HNVBCSP, 0P9BNBW2W3, 0KN2V7840E, 0RKW2X63YR, 07ZMX4ANJS, 0VGMHCF4SC, 06SESV7GQY, 08Y1BBQTK9, 0XYAFCN0PT, 07XBM3A9J5, 0A74SX55QP, 0CT6CBGTYY, 0WFCGVMRRC]
sources:
  - url: https://en.wikipedia.org/wiki/Gamma_function
  - url: https://proofwiki.org/wiki/Gamma_Function_Extends_Factorial
---

## Proof

We integrate by parts on $[c, d] \subset (0, \infty)$ and let $c \to 0^+$ and $d \to \infty$. Then we argue by induction on $n$.

1. Setup. For $t > 0$ and real $r$, $t^r = e^{r \ln t}$ is the [[real power|0TV07AQT62]], where $e^y = \exp(y)$ is the [[exponential function|0RMVS7RXZX]] and $\ln$ is the [[natural logarithm|0044CPHJBV]].
2. For $s > 0$, the integral of the [[gamma function|0V3FZMVB4K]] is the sum $\Gamma(s) = A_s + B_s$ of two [[improper integrals|0VCTBJMEJF]]. Here $A_s = \lim_{c \to 0^+} \int_c^1 t^{s-1} e^{-t} \, dt$ and $B_s = \lim_{d \to \infty} \int_1^d t^{s-1} e^{-t} \, dt$. The definition of $\Gamma(s)$ presupposes that both limits exist.
3. Facts on $\exp$. It is differentiable with $\exp' = \exp$ ([[derivative|0EX9GFJ0B3]]). It satisfies $e^{x+y} = e^x e^y$ ([[sum rule|0E8HNVBCSP]]), so $e^{-b} = 1/e^b$. It is [[positive|0P9BNBW2W3]] and [[strictly increasing|0KN2V7840E]].
4. By the [[chain rule|0RXX2PT1MQ]] and step 3, $t \mapsto -e^{-t}$ has derivative $e^{-t}$. By the [[derivative of $x^a$|0KY08TWDMQ]], $t \mapsto t^s$ has derivative $s t^{s-1}$ on $(0, \infty)$.
5. All the functions in step 4 and their derivatives are differentiable on $(0, \infty)$, hence [[continuous|07ZMX4ANJS]]. So their [[products are continuous|0VGMHCF4SC]] and [[Riemann integrable|06SESV7GQY]] on each $[c, d] \subset (0, \infty)$.
6. Let $s > 0$ and $0 < c < d$. Apply [[integration by parts|08Y1BBQTK9]] on $[c, d]$ with $u(t) = t^s$ and $v(t) = -e^{-t}$. Steps 4 and 5 give
$$\int_c^d t^s e^{-t} \, dt = c^s e^{-c} - d^s e^{-d} + s \int_c^d t^{s-1} e^{-t} \, dt.$$
7. Lemma A: $c^s \to 0$ as $c \to 0^+$. Let $\eta > 0$ and $\delta = e^{(\ln \eta)/s} > 0$. By the [[inverse relations|0RKW2X63YR]], $\ln \delta = (\ln \eta)/s$.
8. For $0 < c < \delta$, $\ln c < \ln \delta$, since $\ln$ is strictly increasing by the same result. So $s \ln c < \ln \eta$, and step 3 gives $0 < c^s = e^{s \ln c} < e^{\ln \eta} = \eta$. This proves Lemma A.
9. Lemma B: $d^s e^{-d} \to 0$ as $d \to \infty$. By the [[Archimedean property|0A74SX55QP]], choose a natural number $n \ge s$.
10. For $d \ge 1$, $\ln d \ge \ln 1 = 0$, so $s \ln d \le n \ln d$. By steps 3 and 1, $d^s \le e^{n \ln d}$. By induction on $n$ with the sum rule, $e^{n \ln d} = (e^{\ln d})^n$. This equals $d^n$ by the inverse relations.
11. So $0 < d^s e^{-d} \le d^n / e^d$ for $d \ge 1$. Let $\eta > 0$. Since [[$e^d / d^n \to \infty$|0CT6CBGTYY]], there is $X \ge 1$ with $e^d / d^n > 1/\eta$ for $d > X$. Then $d^s e^{-d} < \eta$ for $d > X$. This proves Lemma B.
12. Take $(c, d) = (c, 1)$ in step 6, with $0 < c < 1$. Since $1^s = e^{s \ln 1} = 1$, we get $\int_c^1 t^s e^{-t} \, dt = c^s e^{-c} - e^{-1} + s \int_c^1 t^{s-1} e^{-t} \, dt$.
13. As $c \to 0^+$, $e^{-c} \to e^0 = 1$ by continuity, and $c^s \to 0$ by Lemma A. The right side of step 12 then tends to $-e^{-1} + s A_s$. This uses step 2 and the [[algebra of limits|07XBM3A9J5]]. So $A_{s+1}$ exists and $A_{s+1} = -e^{-1} + s A_s$.
14. Take $(c, d) = (1, d)$ in step 6, with $d > 1$. We get $\int_1^d t^s e^{-t} \, dt = e^{-1} - d^s e^{-d} + s \int_1^d t^{s-1} e^{-t} \, dt$.
15. As $d \to \infty$, Lemma B, step 2 and the algebra of limits give $B_{s+1} = e^{-1} + s B_s$.
16. Adding steps 13 and 15 gives $\Gamma(s + 1) = A_{s+1} + B_{s+1} = s (A_s + B_s) = s \, \Gamma(s)$.
17. The value $\Gamma(1)$. Here $t^0 = e^0 = 1$, so the integrand is $e^{-t}$. Its antiderivative is $-e^{-t}$ by step 4. The [[second fundamental theorem of calculus|0XYAFCN0PT]] gives $\int_c^1 e^{-t} \, dt = e^{-c} - e^{-1}$ and $\int_1^d e^{-t} \, dt = e^{-1} - e^{-d}$.
18. As $c \to 0^+$, $e^{-c} \to 1$, so $A_1 = 1 - e^{-1}$. By Lemma B with $s = 1$ and $n = 1$, $d e^{-d} \to 0$. For $d \ge 1$, $0 < e^{-d} \le d e^{-d}$, so $e^{-d} \to 0$ and $B_1 = e^{-1}$.
19. So $\Gamma(1) = A_1 + B_1 = 1$.
20. We prove $\Gamma(n + 1) = n!$ by induction on the natural number $n$. For $n = 0$, step 19 gives $\Gamma(1) = 1 = 0!$, by the definition of the [[factorial|0WFCGVMRRC]].
21. Assume $\Gamma(n + 1) = n!$. Step 16 with $s = n + 1 > 0$ gives $\Gamma(n + 2) = (n + 1) \Gamma(n + 1) = (n + 1) \cdot n! = (n + 1)!$.
22. By induction, $\Gamma(n + 1) = n!$ for every natural number $n$.

## Idea

Integration by parts moves one factor of $t$ from $t^s$ onto the derivative, which gives $s t^{s-1}$. The boundary term $t^s e^{-t}$ vanishes at both ends: $t^s \to 0$ at $0$ because $s > 0$, and $e^{-t}$ beats any power at infinity. Together with $\Gamma(1) = 1$, the recursion $\Gamma(s+1) = s \Gamma(s)$ gives the factorials.
