{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Proof\n\nWe 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$.\n\n1. Setup. For $t \u003e 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]].\n2. For $s \u003e 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.\n3. 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]].\n4. 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)$.\n5. 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)$.\n6. Let $s \u003e 0$ and $0 \u003c c \u003c d$. Apply [[integration by parts|08Y1BBQTK9]] on $[c, d]$ with $u(t) = t^s$ and $v(t) = -e^{-t}$. Steps 4 and 5 give\n$$\\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.$$\n7. Lemma A: $c^s \\to 0$ as $c \\to 0^+$. Let $\\eta \u003e 0$ and $\\delta = e^{(\\ln \\eta)/s} \u003e 0$. By the [[inverse relations|0RKW2X63YR]], $\\ln \\delta = (\\ln \\eta)/s$.\n8. For $0 \u003c c \u003c \\delta$, $\\ln c \u003c \\ln \\delta$, since $\\ln$ is strictly increasing by the same result. So $s \\ln c \u003c \\ln \\eta$, and step 3 gives $0 \u003c c^s = e^{s \\ln c} \u003c e^{\\ln \\eta} = \\eta$. This proves Lemma A.\n9. Lemma B: $d^s e^{-d} \\to 0$ as $d \\to \\infty$. By the [[Archimedean property|0A74SX55QP]], choose a natural number $n \\ge s$.\n10. 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.\n11. So $0 \u003c d^s e^{-d} \\le d^n / e^d$ for $d \\ge 1$. Let $\\eta \u003e 0$. Since [[$e^d / d^n \\to \\infty$|0CT6CBGTYY]], there is $X \\ge 1$ with $e^d / d^n \u003e 1/\\eta$ for $d \u003e X$. Then $d^s e^{-d} \u003c \\eta$ for $d \u003e X$. This proves Lemma B.\n12. Take $(c, d) = (c, 1)$ in step 6, with $0 \u003c c \u003c 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$.\n13. 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$.\n14. Take $(c, d) = (1, d)$ in step 6, with $d \u003e 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$.\n15. As $d \\to \\infty$, Lemma B, step 2 and the algebra of limits give $B_{s+1} = e^{-1} + s B_s$.\n16. Adding steps 13 and 15 gives $\\Gamma(s + 1) = A_{s+1} + B_{s+1} = s (A_s + B_s) = s \\, \\Gamma(s)$.\n17. 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}$.\n18. 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 \u003c e^{-d} \\le d e^{-d}$, so $e^{-d} \\to 0$ and $B_1 = e^{-1}$.\n19. So $\\Gamma(1) = A_1 + B_1 = 1$.\n20. 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]].\n21. Assume $\\Gamma(n + 1) = n!$. Step 16 with $s = n + 1 \u003e 0$ gives $\\Gamma(n + 2) = (n + 1) \\Gamma(n + 1) = (n + 1) \\cdot n! = (n + 1)!$.\n22. By induction, $\\Gamma(n + 1) = n!$ for every natural number $n$.\n\n## Idea\n\nIntegration 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 \u003e 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.\n",
  "commit": "4a3290d299c8b2cd6493fce2296920ba7f82d942",
  "front": {
    "kind": "proof",
    "msc": [
      "33B15"
    ],
    "name": "Proof that the gamma function extends the factorial",
    "proves": "0FDCW77H44",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Gamma_function"
      },
      {
        "url": "https://proofwiki.org/wiki/Gamma_Function_Extends_Factorial"
      }
    ],
    "tag": "W6R4T2GY78",
    "uses": [
      "0V3FZMVB4K",
      "0VCTBJMEJF",
      "0TV07AQT62",
      "0RMVS7RXZX",
      "0044CPHJBV",
      "0KY08TWDMQ",
      "0EX9GFJ0B3",
      "0RXX2PT1MQ",
      "0E8HNVBCSP",
      "0P9BNBW2W3",
      "0KN2V7840E",
      "0RKW2X63YR",
      "07ZMX4ANJS",
      "0VGMHCF4SC",
      "06SESV7GQY",
      "08Y1BBQTK9",
      "0XYAFCN0PT",
      "07XBM3A9J5",
      "0A74SX55QP",
      "0CT6CBGTYY",
      "0WFCGVMRRC"
    ]
  },
  "kind": "proof",
  "link": "https://math2.tamnd.com/node/W6R4T2GY78/",
  "links": [
    {
      "field": "proves",
      "target": "0FDCW77H44"
    },
    {
      "field": "uses",
      "target": "0V3FZMVB4K"
    },
    {
      "field": "uses",
      "target": "0VCTBJMEJF"
    },
    {
      "field": "uses",
      "target": "0TV07AQT62"
    },
    {
      "field": "uses",
      "target": "0RMVS7RXZX"
    },
    {
      "field": "uses",
      "target": "0044CPHJBV"
    },
    {
      "field": "uses",
      "target": "0KY08TWDMQ"
    },
    {
      "field": "uses",
      "target": "0EX9GFJ0B3"
    },
    {
      "field": "uses",
      "target": "0RXX2PT1MQ"
    },
    {
      "field": "uses",
      "target": "0E8HNVBCSP"
    },
    {
      "field": "uses",
      "target": "0P9BNBW2W3"
    },
    {
      "field": "uses",
      "target": "0KN2V7840E"
    },
    {
      "field": "uses",
      "target": "0RKW2X63YR"
    },
    {
      "field": "uses",
      "target": "07ZMX4ANJS"
    },
    {
      "field": "uses",
      "target": "0VGMHCF4SC"
    },
    {
      "field": "uses",
      "target": "06SESV7GQY"
    },
    {
      "field": "uses",
      "target": "08Y1BBQTK9"
    },
    {
      "field": "uses",
      "target": "0XYAFCN0PT"
    },
    {
      "field": "uses",
      "target": "07XBM3A9J5"
    },
    {
      "field": "uses",
      "target": "0A74SX55QP"
    },
    {
      "field": "uses",
      "target": "0CT6CBGTYY"
    },
    {
      "field": "uses",
      "target": "0WFCGVMRRC"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/W6R4T2GY78.md",
  "msc": [
    "33B15"
  ],
  "name": "Proof that the gamma function extends the factorial",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/W6R/W6R4T2GY78.md",
  "status": null,
  "tag": "W6R4T2GY78",
  "uri": "m2://W6R4T2GY78",
  "url": "https://math2.tamnd.com/wiki/proof-that-the-gamma-function-extends-the-factorial/",
  "writing": {
    "tag": "W6R4T2GY78",
    "kind": "proof",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      },
      {
        "what": "a source with a locator",
        "have": 0,
        "want": 1
      }
    ]
  }
}
