新起点
伽玛函数
2020-03-31 17:53:09

在数学中, Γ {\displaystyle \Gamma \,} 函数,也叫做伽玛函数(Gamma函数),是阶乘函数在实数与复数域上的扩展。如果 n {\displaystyle n} 为正整数,则:

对于实数部分为正的复数 z {\displaystyle z} ,伽玛函数定义为:

此定义可以用解析延拓原理,拓展到除去非正整数的整个复数域上。

在概率论中常见此函数,在组合数学中也常见。

Γ {\displaystyle \Gamma \,} 函数可以通过欧拉(Euler)第二类积分定义:

对复数 z {\displaystyle z\,} ,我们要求 R e ( z ) > 0 {\displaystyle \mathrm {Re} (z)>0} 。

Γ {\displaystyle \Gamma } 函数还可以通过对 e − t {\displaystyle \mathrm {e} ^{-t}\,} 做泰勒展开,解析延拓到整个复平面: Γ ( z ) = ∫ 1 ∞ t z − 1 e t d t + ∑ n = 0 ∞ ( − 1 ) n n ! 1 n + z {\displaystyle \Gamma (z)=\int _{1}^{\infty }{\frac {t^{z-1}}{\mathrm {e} ^{t}}}{\rm {d}}t+\sum _{n=0}^{\infty }{\frac {(-1)^{n}}{n!}}{\frac {1}{n+z}}}

这样定义的 Γ {\displaystyle \Gamma } 函数在全平面除了 z = 0 , − 1 , − 2 , … {\displaystyle z=0,-1,-2,\ldots } 以外的地方解析。

Γ {\displaystyle \Gamma } 函数也可以用无穷乘积的方式表示:

这说明 Γ ( z ) {\displaystyle \Gamma (z)} 是亚纯函数,而 1 Γ ( z ) {\displaystyle {\frac {1}{\Gamma (z)}}} 是全纯函数

Γ {\displaystyle \Gamma \,} 函数可以用无穷乘积表示:

其中 γ {\displaystyle \gamma \,} 是欧拉-马歇罗尼常数。

⟹ Γ ( α ) λ α = ∫ 0 ∞ x α − 1 e − λ x d x {\displaystyle \implies {\frac {\Gamma \left(\alpha \right)}{\lambda ^{\alpha }}}=\int _{0}^{\infty }x^{\alpha -1}\mathrm {e} ^{-\lambda x}{\rm {d}}x}

Γ {\displaystyle \Gamma \,} 函数的递推公式为: Γ ( x + 1 ) = x Γ ( x ) {\displaystyle \Gamma (x+1)=x\Gamma (x)} ,

对于正整数 n {\displaystyle n\,} ,有

可以说 Γ {\displaystyle \Gamma \,} 函数是阶乘的推广。

Γ ( n + 1 ) = ∫ 0 ∞ e − x x n + 1 − 1 d x = ∫ 0 ∞ e − x x n d x {\displaystyle \Gamma (n+1)=\int _{0}^{\infty }\mathrm {e} ^{-x}x^{n+1-1}\mathrm {d} x=\int _{0}^{\infty }\mathrm {e} ^{-x}x^{n}{\rm {d}}x}

我们用分部积分法来计算这个积分:

∫ 0 ∞ e − x x n d x = [ − x n e x ] 0 ∞ + n ∫ 0 ∞ e − x x n − 1 d x {\displaystyle \int _{0}^{\infty }\mathrm {e} ^{-x}x^{n}\mathrm {d} x=\left_{0}^{\infty }+n\int _{0}^{\infty }\mathrm {e} ^{-x}x^{n-1}{\rm {d}}x}

当 x = 0 {\displaystyle x=0\,} 时, − 0 n e 0 = 0 1 = 0 {\displaystyle {\tfrac {-0^{n}}{\mathrm {e} ^{0}}}={\tfrac {0}{1}}=0} 。当 x {\displaystyle x\,} 趋于无穷大时,根据洛必达法则,有:

lim x → ∞ − x n e x = lim x → ∞ − n ! ⋅ 0 e x = 0 {\displaystyle \lim _{x\rightarrow \infty }{\frac {-x^{n}}{\mathrm {e} ^{x}}}=\lim _{x\rightarrow \infty }{\frac {-n!\cdot 0}{\mathrm {e} ^{x}}}=0} 。

因此第一项 [ − x n e x ] 0 ∞ {\displaystyle \left_{0}^{\infty }} 变成了零,所以:

Γ ( n + 1 ) = n ∫ 0 ∞ x n − 1 e x d x {\displaystyle \Gamma (n+1)=n\int _{0}^{\infty }{\frac {x^{n-1}}{\mathrm {e} ^{x}}}{\rm {d}}x}

等式的右面正好是 n Γ ( n ) {\displaystyle n\Gamma (n)\,} 。因此,递推公式为:

此式可用来协助计算t分布概率密度函数、卡方分布概率密度函数、F分布概率密度函数等的累计概率。

对任何实数α

斯特灵公式能用以估计 Γ ( z ) {\displaystyle \Gamma (z)} 函数的增长速度。公式为:

其中e约等于2.718281828459。

对任何复数z,满足 Re(z) > 0,有

于是,对任何正整数 m

其中γ是欧拉-马歇罗尼常量。

注意到在 Γ {\displaystyle \Gamma } 函数的积分定义中若取 z {\displaystyle z\,} 为实部大于零之复数、则积分存在,而且在右半复平面上定义一个全纯函数。利用函数方程

并注意到函数 sin ⁡ ( π z ) {\displaystyle \sin(\pi z)\,} 在整个复平面上有解析延拓,我们可以在 R e ( z ) < 1 {\displaystyle \mathrm {Re} (z)<1} 时设

从而将 Γ {\displaystyle \Gamma \,} 函数延拓为整个复平面上的亚纯函数,它在 z = 0 , − 1 , − 2 , − 3 ⋯ {\displaystyle z=0,-1,-2,-3\cdots } 有单极点,留数为

许多编程语言或表格软件有提供Γ函数或对数的Γ函数,例如EXCEL。而对数的Γ函数还要再取一次自然指数才能获得Γ函数值。例如在EXCEL中,可使用GAMMALN函数,再用EXP,即可求得任意实数的伽玛函数的值。

而在没有提供Γ函数的程序环境中,也能够过泰勒级数或斯特灵公式等方式来近似,例如Robert H. Windschitl在2002年提出的方法,其在十进制可获得有效数字八位数的精确度,已足以填满单精度浮点数的二进制有效数字24位:

相关:

网站公告: