# 伽马函数

伽马函数（gamma function），记作 \( \Gamma(z) \)，是一个将阶乘推广到复数的超越函数，对正整数有 \( \Gamma(z) = (z-1)! \)<sup>[1](https://encyclopediaofmath.org/wiki/Gamma-function)</sup>。当 \( \Re z > 0 \) 时，它由欧拉第二类积分给出，

\[ \Gamma(z) = \int_0^{\infty} x^{z-1} e^{-x} \, dx, \]

在复平面的其他区域则由解析延拓定义<sup>[1](https://encyclopediaofmath.org/wiki/Gamma-function)</sup><sup> • </sup><sup>[2](http://dlmf.nist.gov/5.2)</sup>。莱昂哈德·欧拉（Leonhard Euler）于1729年在致克里斯蒂安·哥德巴赫（Christian Goldbach）的信中引入该函数，阿德里安-马里·勒让德（Adrien-Marie Legendre）于1814年引入记号 \( \Gamma(z) \)<sup>[1](https://encyclopediaofmath.org/wiki/Gamma-function)</sup><sup> • </sup><sup>[3](https://www.sciencedirect.com/book/9780128241547/an-introduction-to-hypergeometric-supertrigonometric-and-superhyperbolic-functions)</sup>。

| 关键事实 | 详情 |
|---|---|
| 定义 | 对 \( \Re z > 0 \)，\( \Gamma(z) = \int_0^{\infty} x^{z-1} e^{-x}\,dx \)；其他区域由解析延拓定义<sup>[2](http://dlmf.nist.gov/5.2)</sup> |
| 阶乘联系 | \( \Gamma(1) = 1 \)，且对非负整数 \( n \) 有 \( n! = \Gamma(n+1) \)<sup>[4](https://dlmf.nist.gov/5.4)</sup> |
| 解析结构 | 亚纯、无零点；在 \( z = -n \) 处有留数为 \( (-1)^n/n! \) 的单极点；\( 1/\Gamma(z) \) 为整函数，在 \( z = -n \) 处有单零点<sup>[2](http://dlmf.nist.gov/5.2)</sup> |
| 起源 | 欧拉在1729年10月13日致哥德巴赫的信中通过无穷乘积引入<sup>[1](https://encyclopediaofmath.org/wiki/Gamma-function)</sup> |
| 唯一性 | 由玻尔–莫勒鲁普定理，\( \Gamma \) 是唯一满足 \( f(1)=1 \)、\( f(t+1)=t f(t) \) 及对数凸性的函数 \( f:(0,\infty)\to(0,\infty) \)<sup>[5](https://math.camden.rutgers.edu/files/Real_Analysis_CHPTR4-End.pdf)</sup> |
| 伴随函数 | psi（双伽马）函数 \( \psi(z) = \Gamma'(z)/\Gamma(z) \)，亚纯，在 \( z=-n \) 处有留数为−1的单极点<sup>[2](http://dlmf.nist.gov/5.2)</sup> |
| 标准计算 | 兰乔斯1964年的近似（SIAM J. Numer. Anal. B 1, pp. 86–96）被许多软件库采用<sup>[6](https://epubs.siam.org/doi/10.1137/0701008)</sup><sup> • </sup><sup>[7](https://arxiv.org/abs/2104.00697)</sup> |

## 定义与解析结构

欧拉积分只在右半平面 \( \Re z > 0 \) 收敛。对于 \( \Re z \le 0 \)，\( \Gamma(z) \) 由解析延拓定义<sup>[2](http://dlmf.nist.gov/5.2)</sup>。延拓后的函数是亚纯的，没有零点，并在 \( z = -n \)（\( n = 0, 1, 2, \ldots \)）处有留数为 \( (-1)^n/n! \) 的单极点。其倒数 \( 1/\Gamma(z) \) 是整函数，在这些点处有单零点<sup>[2](http://dlmf.nist.gov/5.2)</sup>。

在除去 \( z = 0, -1, \ldots \) 的平面上，该函数还满足汉克尔围道积分表示

\[ \Gamma(z) = \frac{1}{e^{2\pi i z} - 1} \int_C s^{z-1} e^{-s} \, ds, \]

其中 \( s^{z-1} = e^{(z-1)\ln s} \)，对数取定一个分支<sup>[1](https://encyclopediaofmath.org/wiki/Gamma-function)</sup>。

伽马函数通过 \( \Gamma(1) = 1 \) 和 \( n! = \Gamma(n+1) \) 与阶乘相联系<sup>[4](https://dlmf.nist.gov/5.4)</sup>。它也可以表示双阶乘：对偶数 \( n \)，\( n!! = 2^{n/2} \Gamma(n/2 + 1) \)；对奇数 \( n \)，\( n!! = \pi^{-1/2} 2^{n/2 + 1/2} \Gamma(n/2 + 1) \)<sup>[4](https://dlmf.nist.gov/5.4)</sup>。上升阶乘可化为伽马值的比，\( (a)_n = \Gamma(a+n)/\Gamma(a) \)，伽马函数正是以此进入超几何级数的系数<sup>[2](http://dlmf.nist.gov/5.2)</sup>。

对数导数 \( \psi(z) = \Gamma'(z)/\Gamma(z) \) 称为 psi 函数或双伽马函数，它本身是亚纯的，在 \( z = -n \) 处有留数为 −1 的单极点<sup>[2](http://dlmf.nist.gov/5.2)</sup>。欧拉常数

\[ \gamma = \lim_{n \to \infty}\left(1 + \tfrac{1}{2} + \tfrac{1}{3} + \cdots + \tfrac{1}{n} - \ln n\right) = 0.57721\,56649\,01532\,86060\ldots, \]

贯穿于特殊函数理论中以 \( \Gamma \) 为基础的这一分支<sup>[2](http://dlmf.nist.gov/5.2)</sup>。

## 历史

催生伽马函数的问题是阶乘序列 1, 2, 6, 24, 120, 720, … 的插值，克里斯蒂安·哥德巴赫（1690–1764）对此尤为关注<sup>[8](https://core.ac.uk/download/pdf/39671766.pdf)</sup>。丹尼尔·伯努利（Daniel Bernoulli）当时与欧拉同住在圣彼得堡，他于1729年10月6日写信给哥德巴赫，给出了已知最早的阶乘插值函数表示，形式为无穷乘积<sup>[9](https://luschny.de/math/factorial/history.html)</sup>。欧拉在1729年10月13日致哥德巴赫的信中宣布了自己的解答，其中包含无穷乘积

\[ \Gamma(z) = \lim_{n \to \infty} \frac{n!\, n^z}{z(z+1)\cdots(z+n)}, \]

由此他得到了对 \( \Re z > 0 \) 有效的积分表示<sup>[1](https://encyclopediaofmath.org/wiki/Gamma-function)</sup>。在第一封信的乘积形式中取 \( m = 1/2 \)，欧拉得到 \( \Gamma(3/2) = \sqrt{\pi}/2 \)，并由此推出沃利斯乘积<sup>[10](https://www.researchgate.net/publication/296704640_INTERESTING_INFINITE_PRODUCTS_OF_RATIONAL_FUNCTIONS_MOTIVATED_BY_EULER)</sup>。

欧拉在论文《论超越级数，即其通项无法以代数方式给出的级数》（*De progressionibus transcendentibus seu quarum termini generales algebraice dari nequeunt*）中发展了这些思想，该文写于1729年，1738年发表于《彼得堡科学院评论》第5卷。他在文中定义 \( [x] = \int_0^1 (\ln(1/t))^x\,dt \)，代换 \( t = e^{-z} \) 后化为 \( \int_0^{\infty} z^x e^{-z}\,dz \)，求得 \( [1/2] = \sqrt{\pi/2} \)，并导出递推关系 \( [x+1] = (x+1)\,[x] \)<sup>[11](https://scholarlycommons.pacific.edu/euler-works/19/)</sup>。记号 \( \Gamma(z) \) 归功于勒让德；高斯的替代记法为 \( \Pi(z-1) \)，\( (z-1)! \) 亦被使用<sup>[12](http://dlmf.nist.gov/5.1)</sup>。勒让德于1814年引入他的记号<sup>[3](https://www.sciencedirect.com/book/9780128241547/an-introduction-to-hypergeometric-supertrigonometric-and-superhyperbolic-functions)</sup>。

## 玻尔–莫勒鲁普刻画

有许多函数都能对阶乘插值，因此伽马函数的地位依赖于一条唯一性性质。1922年，哈拉尔德·玻尔（Harald Bohr）和约翰内斯·莫勒鲁普（Johannes Mollerup）利用对数凸性刻画了 \( \Gamma \)<sup>[13](https://arxiv.org/abs/2009.14742)</sup>。该定理指出，\( \Gamma \) 是唯一满足以下三条性质的函数 \( f:(0,\infty)\to(0,\infty) \)：\( f(1) = 1 \)；对 \( t > 0 \) 有 \( f(t+1) = t f(t) \)；\( f \) 是对数凸的，即 \( \ln \circ f \) 为凸函数<sup>[5](https://math.camden.rutgers.edu/files/Real_Analysis_CHPTR4-End.pdf)</sup>。几何上，对数凸性意味着在任意闭区间 \( [u,v] \subset (0,\infty) \) 上，\( \ln f \) 的图像位于其割线下方<sup>[5](https://math.camden.rutgers.edu/files/Real_Analysis_CHPTR4-End.pdf)</sup>。在加性表述中，\( \ln\Gamma(x) \) 是差分方程 \( \Delta f(x) = \ln x \) 在 \( (0,\infty) \) 上的唯一凸解，至多差一个加性常数<sup>[14](https://arxiv.org/abs/2207.12694)</sup>。

## 计算

软件通过若干互补方法来计算 \( \Gamma(z) \)。在右半平面，一种有效方法是从渐近展开生成的值出发进行向后递推；以级数给出的初值进行向前递推则是另一种选择。对于左半平面，计算可延续向后递推，或使用反射公式

\[ \Gamma(z) = \frac{\pi}{\sin(\pi z)\,\Gamma(1-z)}, \]

它将 \( z \) 处的值与 \( 1-z \) 处的值联系起来<sup>[15](http://dlmf.nist.gov/5.21)</sup><sup> • </sup><sup>[16](https://github.com/jax-ml/jax/blob/main/jax/_src/scipy/special.py)</sup>。同一套机制也覆盖 \( \ln\Gamma(z) \)、\( \psi(z) \) 及多伽马函数<sup>[15](http://dlmf.nist.gov/5.21)</sup>。

**兰乔斯与斯普奇近似。** 科尼利厄斯·兰乔斯（Cornelius Lanczos）于1964年在《工业与应用数学学会杂志，B辑：数值分析》第1卷第1期第86–96页发表了《伽马函数的一种精确近似》<sup>[6](https://epubs.siam.org/doi/10.1137/0701008)</sup>。兰乔斯公式被许多软件库采用<sup>[7](https://arxiv.org/abs/2104.00697)</sup>；例如，JAX库使用取 \( g = 7 \) 的兰乔斯系数计算主值分支的对数伽马，并对 \( \Re z < 0.5 \) 应用反射公式<sup>[16](https://github.com/jax-ml/jax/blob/main/jax/_src/scipy/special.py)</sup>。约翰·L·斯普奇（John L. Spouge）1994年发表于《SIAM数值分析杂志》（第31卷第3期第931–944页）的论文给出了与兰乔斯形式相同的近似：两者都用伽马函数极点的贡献修正斯特林近似，且计算 \( z! \) 使其相对误差为 \( \varepsilon \) 都需要 \( O(-\log \varepsilon) \) 时间。在相近精度下，斯普奇方法比兰乔斯方法需要略多的计算量，但其系数由简单公式给出，误差估计可推广到导数，因此由此可得双伽马函数和三伽马函数的近似<sup>[17](https://zenodo.org/records/1236136/files/article.pdf)</sup>。2021年的一个基于有理函数插值的框架推广了这两种经典方法，其近似在整体效率上可与斯特林公式媲美<sup>[7](https://arxiv.org/abs/2104.00697)</sup>。

## 应用

**统计学。** 伽马分布的概率密度函数直接含有 \( \Gamma \)：标准形式下，对 \( x \ge 0 \)、\( \gamma > 0 \)，有 \( f(x) = x^{\gamma-1} e^{-x} / \Gamma(\gamma) \)，其中 \( \gamma \) 为形状参数<sup>[18](https://www.itl.nist.gov/div898/handbook/eda/section3/eda366b.htm)</sup>。指数分布是 \( a = 1 \) 的特例，自由度为 \( n \) 的卡方分布是形状为 \( n/2 \)、尺度参数为2的伽马分布<sup>[19](https://www.itl.nist.gov/div898/handbook/apr/section1/apr165.htm)</sup>。不完全伽马函数 \( P(a,x) \) 和 \( Q(a,x) \) 充当伽马分布的概率积分，在统计学中被广泛使用<sup>[20](https://dlmf.nist.gov/8.23)</sup>。

**几何。** 半径为 \( r \) 的 \( n \) 维球体的体积 \( V \) 和表面积 \( S \) 为

\[ V = \frac{\pi^{n/2} r^n}{\Gamma(n/2 + 1)}, \qquad S = \frac{2\pi^{n/2} r^{n-1}}{\Gamma(n/2)} = \frac{n}{r} V, \]

这些公式对非整数 \( n \) 仍有意义<sup>[21](https://dlmf.nist.gov/draft1/5.19)</sup>。

**物理学。** 在非相对论量子力学中，两个带电粒子之间的碰撞用库仑相移 \( \mathrm{ph}\,\Gamma(\ell + 1 + i\eta) \) 描述，它出现在卢瑟福散射的分析中<sup>[22](https://dlmf.nist.gov/5.20)</sup>。在统计力学的可解模型中，配分函数取形式 \( \psi_n(\beta) = \Gamma(1 + n\beta/2)\,(\Gamma(1 + \beta/2))^{-n} \)，其中 \( \beta = 1/(kT) \)<sup>[22](https://dlmf.nist.gov/5.20)</sup>。加布里埃莱·韦内齐亚诺（Gabriele Veneziano）1968年指出了由贝塔函数（\( \Gamma \) 的近亲）描述的粒子散射振幅之间的关系，这是弦理论早期的一项重要进展；罗伯特·卡利茨（Robert Carlitz）于1972年用伽马函数描述了致密强子物质的配分函数<sup>[22](https://dlmf.nist.gov/5.20)</sup>。不完全伽马函数 \( \gamma(a,x) \) 通过高斯轨道和斯莱特轨道出现在量子化学中，也出现在种群生物学和复杂物理系统的幂律弛豫中<sup>[23](https://dlmf.nist.gov/8.24)</sup>。

## 相关函数

贝塔函数 \( \mathrm{B}(a,b) \) 在标准参考文献中与 \( \Gamma \) 并列处理，可通过伽马值表示，并与伽马函数一样源于欧拉积分<sup>[12](http://dlmf.nist.gov/5.1)</sup>。一个 \( q \)-模拟 \( \Gamma_q(z) \) 扩展了这一族函数，多重伽马函数的 \( q \)-模拟满足广义玻尔–莫勒鲁普定理<sup>[12](http://dlmf.nist.gov/5.1)</sup><sup> • </sup><sup>[24](https://arxiv.org/abs/q-alg/9505013)</sup>。

## References

1. [Gamma-function, Encyclopedia of Mathematics](https://encyclopediaofmath.org/wiki/Gamma-function)
2. [DLMF §5.2 Definitions, NIST Digital Library of Mathematical Functions](http://dlmf.nist.gov/5.2)
3. [An Introduction to Hypergeometric, Supertrigonometric, and Superhyperbolic Functions, ScienceDirect](https://www.sciencedirect.com/book/9780128241547/an-introduction-to-hypergeometric-supertrigonometric-and-superhyperbolic-functions)
4. [DLMF §5.4 Special Values and Extrema](https://dlmf.nist.gov/5.4)
5. [Bohr-Mollerup Theorem, Rutgers University–Camden real analysis notes](https://math.camden.rutgers.edu/files/Real_Analysis_CHPTR4-End.pdf)
6. [C. Lanczos (1964). A Precision Approximation of the Gamma Function, SIAM J. Numer. Anal. B 1, 86–96](https://epubs.siam.org/doi/10.1137/0701008)
7. [The Gamma Function via Interpolation, arXiv:2104.00697](https://arxiv.org/abs/2104.00697)
8. [DLMF project and history document, core.ac.uk](https://core.ac.uk/download/pdf/39671766.pdf)
9. [The birth of the real factorial function (1729–1826), Luschny](https://luschny.de/math/factorial/history.html)
10. [Interesting infinite products of rational functions motivated by Euler, ResearchGate](https://www.researchgate.net/publication/296704640_INTERESTING_INFINITE_PRODUCTS_OF_RATIONAL_FUNCTIONS_MOTIVATED_BY_EULER)
11. [Leonhard Euler, De progressionibus transcendentibus (E19), Euler Archive, University of the Pacific](https://scholarlycommons.pacific.edu/euler-works/19/)
12. [DLMF §5.1 Special Notation](http://dlmf.nist.gov/5.1)
13. [A Generalization of Bohr-Mollerup's Theorem for Higher Order Convex Functions, arXiv:2009.14742](https://arxiv.org/abs/2009.14742)
14. [a generalization of bohr-mollerup's theorem for higher order convex functions:a tutorial](https://arxiv.org/abs/2207.12694)
15. [DLMF §5.21 Methods of Computation](http://dlmf.nist.gov/5.21)
16. [jax/_src/scipy/special.py, JAX repository, GitHub](https://github.com/jax-ml/jax/blob/main/jax/_src/scipy/special.py)
17. [J. L. Spouge (1994). Computation of the Gamma, Digamma, and Trigamma Functions, SIAM J. Numer. Anal. 31(3), 931–944](https://zenodo.org/records/1236136/files/article.pdf)
18. [NIST/SEMATECH e-Handbook 1.3.6.6.11, Gamma Distribution](https://www.itl.nist.gov/div898/handbook/eda/section3/eda366b.htm)
19. [NIST/SEMATECH e-Handbook 8.1.6.5, Gamma](https://www.itl.nist.gov/div898/handbook/apr/section1/apr165.htm)
20. [DLMF §8.23 Statistical Applications](https://dlmf.nist.gov/8.23)
21. [DLMF §5.19 Mathematical Applications, n-Dimensional Sphere](https://dlmf.nist.gov/draft1/5.19)
22. [DLMF §5.20 Physical Applications](https://dlmf.nist.gov/5.20)
23. [DLMF §8.24 Physical Applications](https://dlmf.nist.gov/8.24)
24. [On a q-analogue of the multiple gamma functions, arXiv:q-alg/9505013](https://arxiv.org/abs/q-alg/9505013)

---
*Initially written Sep 17, 2026 · Reviewed: Oct 15, 2026 · Edited: Oct 15, 2026 · Last review: Oct 15, 2026*

Topic: 物质世界与数学 › 数学与统计学 › 数学分析与数学模型 › Complex analysis

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/gamma-function

English original: https://www.edgepedia.org/gamma-function
