简介

 $\mathrm{Gamma}$ 函数如下定义
$$ \Gamma(x) = \int_0^{\infty}t^{x - 1}e^{-t}\,\mathrm{d}t $$
那么它是如何来的呢?

考虑如下的一个数列
$$ a_n = \{1, 4, 9, 16, \cdots\} $$
这个数列可以用通项公式 $n^2$ 来表达, 即使 $n$ 为实数也是良好定义的. 现在我们来考虑阶乘 $n!$ . 在 $n$ 为整数时, 它是良好定义的, 但是当 $n$ 为实数时呢? $0.5!$ 等于多少? 欧拉于 1729 年完美的解决了这个问题, 由此导致了 $\mathrm{Gamma}$ 函数的产生. $\mathrm{Gamma}$ 函数可以看作是定义在实数域的 $(n - 1)!$ 为什么不是 $n!$ 呢? 后面会说明.

欧拉考虑了如下形式的积分 (至于为什么是如下形式积分, 请自行了解).
$$ J(e,n) = \int_0^1 x^e(1 - x)^n\,\mathrm{d}x $$
这里的 $e$ 并不是自然对数的底数, 而是任意实数. 由分布积分可得
$$ \begin{aligned} \int_0^1x^e(1 - x)^n\mathrm dx &= \int_0^1\left(\frac{1}{e + 1}x^{e+1}\right)'(1 - x)^n\,\mathrm{d}x\\\\ &=\left.\left(\left(\frac{1}{e+1}x^{e+1}\right)(1 - x)^n\right)\right|^1_0 - \int_0^1\left(\frac{1}{e+1}x^{e+1}\right)\cdot-n(1-x)^{n - 1}\,\mathrm{d}x\\\\ &=\frac{n}{e+1}\int_0^1 x^{e + 1}(1 - x)^{n - 1} \end{aligned} $$
因此
$$ J(e, n) = \frac{n}{e+1}J(e+1, n-1) $$
不断进行这个过程, 最终会得到
$$ \begin{aligned} J(e, n) &= \frac{n(n - 1)(n - 2)\cdots1}{(e+1)(e+2)(e + 3)\cdots(e+n)}J(e+n, 0)\\\\ &= \frac{n(n - 1)(n - 2)\cdots1}{(e+1)(e+2)(e + 3)\cdots(e+n)}\left.\left(\frac{1}{e+n+1}x^{e+n+1}\right)\right|^1_0\\\\ &=\frac{n!}{(e+1)(e+2)(e + 3)\cdots(e+n)(e+n+1)} \end{aligned} $$
因此有
$$ n! = (e+1)(e+2)\cdots(e+n+1)J(e,n)\tag{1} $$
此时就已经可以表达实数域的 $n!$ 了.

为了式子更加简化, 欧拉运用了亿点点计算技巧, 取 $e = f/g$ 并令 $f\rightarrow1, g\rightarrow0$ .

首先令 $x = t^{\frac{g}{f+g}}$ , 而有
$$ \begin{aligned} \frac{\,\mathrm{d}x}{\,\mathrm{d}t} &= \frac{g}{f+g}t^{\frac{g}{f+g} - 1}\\\\ \mathrm dx &= \frac{g}{f+g}t^{-\frac{f}{f+g}}\mathrm dt \end{aligned} $$

当 $x\in[0,1]$ 时, $t\in[0, 1]$ .

带入式 $(1)$ 可得
$$ \begin{aligned} n! &= (e+1)(e+2)\cdots(e+n+1)\int_0^1 x^e(1 - x)^n\,\mathrm{d}x\\\\ &= (\frac{f}{g}+1)(\frac{f}{g}+2)\cdots(\frac{f}{g}+n+1)\int_0^1t^{\frac{f}{f+g}}(1 - t^{\frac{g}{f+g}})^n \frac{g}{f+g}t^{-\frac{f}{f+g}}\,\mathrm{d}t\\\\ &=(\frac{f}{g}+1)(\frac{f}{g}+2)\cdots(\frac{f}{g}+n+1)\int_0^1(1 - t^{\frac{g}{f+g}})^n\frac{g}{f+g}\,\mathrm{d}t\\\\ &=\frac{(f+g)(f+2g)\cdots(f+(n+1)g)}{g^{n+1}}\int_0^1\left(\frac{1-t^{\frac{g}{f+g}}}{\frac{g}{f+g}}\right)^n\left(\frac{g}{f+g}\right)^{n + 1}\,\mathrm{d}t\\\\ &=\frac{(f+g)(f+2g)\cdots(f+(n+1)g)}{(f+g)^{n+1}}\int^1_0\left(\frac{1-t^{\frac{g}{f+g}}}{\frac{g}{f+g}}\right)^n\,\mathrm{d}t \end{aligned} $$
积分左边显然等于 $1$ , 那么右边等于什么呢?

上式等价于
$$ \int^1_0\left(\lim_{x\rightarrow0}\frac{1-t^{x}}{x}\right)^n\,\mathrm{d}t $$
使用洛必达法则
$$ \begin{aligned} \int^1_0\left(\lim_{x\rightarrow0}\frac{1-t^{x}}{x}\right)^n\,\mathrm{d}x &= \int^1_0\left(\lim_{x\rightarrow0}-t^x\ln t\right)^n\,\mathrm{d}t\\\\ &= \int_0^1(-\ln t)^n\,\mathrm{d}t \end{aligned} $$
于是 $n!$ 就简化成了
$$ n! =\int_0^1(-\ln t)^n\,\mathrm{d}t $$
令 $t = \mathrm{e}^{-u}$ , (注意这里的 $e$ 为自然对数的底数) , 当 $t\in[0, 1]$ 时 $u\in [0, +\infty]$ .


$$ \begin{aligned} \frac{\,\mathrm{d}t}{\,\mathrm{d}u} &= (\mathrm{e}^{-u})'\\\\ \frac{\,\mathrm{d}t}{\,\mathrm{d}u}&= -\mathrm{e}^{-u}\\\\ \,\mathrm{d}t&=-\mathrm{e}^{-u}\,\mathrm{d}u \end{aligned} $$
这里要注意到 $\mathrm{d}u < 0$ .

因此
$$ \begin{aligned} n! &= \int_0^{+\infty} u^n\mathrm{e}^{-u}\,\mathrm{d}u \end{aligned} $$
由于积分中的 $\mathrm{d}u>0$ , 因此负号被抵消了.

这就是 $n!$ 的积分表达, 而
$$ \Gamma(x) = \int_0^{\infty}t^{x - 1}\mathrm{e}^{-t}\,\mathrm{d}t = (n-1)! $$
所以, 为什么不是 $n!$ 呢? 欧拉最早的 $\mathrm{Gamma}$ 函数定义还真是 $\Gamma(n) = n!$ 但是欧拉后来不知道出于什么原因, 修改了 $\mathrm{Gamma}$ 函数的定义, 使得 $\Gamma(n) = (n-1)!$ 有数学家猜测可能是欧拉研究了如下形式的积分
$$ \begin{aligned} B(m,n)&=\int_0^1x^{m-1}(1-x)^{n-1}\,\mathrm{d}x\\\\ &=\frac{\Gamma(m)\Gamma(n)}{\Gamma(m+n)} \end{aligned} $$
这个函数现在称为 $\mathrm{Beta}$ 函数. 看, 多么有美感的一个式子, 如果 $\Gamma(n) = n!$ , 那么就会变为
$$ B(m, n) = \frac{\Gamma(m)\Gamma(n)}{\Gamma(m+n+1)} $$
公式的美感就降低了.

其证明可以看我的这篇文章.

不过, 这只是一个定义, 并不需要太纠结.


参考资料

网络资料