info prev up next book cdrom email home

Gamma Function


\begin{figure}\begin{center}\BoxedEPSF{GammaFunctionReIm.epsf scaled 700}\end{center}\end{figure}

The complete gamma function is defined to be an extension of the Factorial to Complex and Real Number arguments. It is Analytic everywhere except at $z=0$, $-1$, $-2$, .... It can be defined as a Definite Integral for $\Re[z] > 0$ (Euler's integral form)

$\displaystyle \Gamma(z)$ $\textstyle \equiv$ $\displaystyle \int^\infty_0 t^{z-1}e^{-t}\,dt$ (1)
  $\textstyle =$ $\displaystyle 2\int^\infty_0 e^{-t^2}t^{2z-1}\,dt,$ (2)

\Gamma(z)\equiv \int^1_0 \left[{\ln\left({1\over t}\right)}\right]^{z-1}\,dt.
\end{displaymath} (3)

Integrating (1) by parts for a Real argument, it can be seen that
$\displaystyle \Gamma(x)$ $\textstyle =$ $\displaystyle \int^\infty_0 t^{x-1}e^{-t}\,dt$  
  $\textstyle =$ $\displaystyle [-t^{x-1}e^{-t}]^\infty_0 + \int^\infty_0 (x-1)t^{x-2}e^{-t}\,dt$  
  $\textstyle =$ $\displaystyle (x-1)\int^\infty_0 t^{x-2}e^{-t}\,dt = (x-1)\Gamma(x-1).$  

If $x$ is an Integer $n=1$, 2, 3, ...then
$\displaystyle \Gamma(n)$ $\textstyle =$ $\displaystyle (n-1)\Gamma(n-1) = (n-1)(n-2)\Gamma(n-2)$  
  $\textstyle =$ $\displaystyle (n-1)(n-2)\cdots 1 = (n-1)!,$ (5)

so the gamma function reduces to the Factorial for a Positive Integer argument.

Binet's Formula is

\ln\Gamma(a)=(a-{\textstyle{1\over 2}})\ln a-a+{\textstyle{1...
...t_0^\infty {\tan\left({z\over a}\right)\over e^{2\pi z}-1}\,dz
\end{displaymath} (6)

for $\Re[a]>0$ (Whittaker and Watson 1990, p. 251). The gamma function can also be defined by an Infinite Product form (Weierstraß Form)
\Gamma(z) \equiv \left[{ze^{\gamma z}\prod_{r=1}^\infty \left({1 + {z\over r}}\right)e^{-z/r}}\right]^{-1},
\end{displaymath} (7)

where $\gamma$ is the Euler-Mascheroni Constant. This can be written
\Gamma(z)={1\over z}\mathop{\rm exp}\nolimits \left[{\sum_{k=1}^\infty {(-1)^k s_k\over k} x^k}\right],
\end{displaymath} (8)

$\displaystyle s_1$ $\textstyle \equiv$ $\displaystyle \gamma$ (9)
$\displaystyle s_k$ $\textstyle \equiv$ $\displaystyle \zeta(k)$ (10)

for $k\geq 2$, where $\zeta$ is the Riemann Zeta Function (Finch). Taking the logarithm of both sides of (7),
-\ln[\Gamma(z)]=\ln z+\gamma z+\sum_{n=1}^\infty \left[{\ln\left({1+{z\over n}}\right)-{z\over n}}\right].
\end{displaymath} (11)

$\displaystyle -{\Gamma'(z)\over \Gamma(z)}$ $\textstyle =$ $\displaystyle {1\over z}+\gamma+\sum_{n=1}^\infty \left({{{1\over n}\over 1+{z\over n}}-{1\over n}}\right)$  
  $\textstyle =$ $\displaystyle {1\over z}+\gamma+\sum_{n=1}^\infty \left({{1\over n+z}-{1\over n}}\right)$ (12)

$\displaystyle \Gamma'(z)$ $\textstyle =$ $\displaystyle -\Gamma(z)\left[{{1\over z}+\gamma+\sum_{n=1}^\infty \left({{1\over n+z}-{1\over n}}\right)}\right]$ (13)
  $\textstyle \equiv$ $\displaystyle \Gamma(z)\Psi(z) = \Gamma(z)\psi_0(z)$ (14)
$\displaystyle \Gamma'(1)$ $\textstyle =$ $\displaystyle -\Gamma(1)-\left\{{1+\gamma+\left[{({\textstyle{1\over 2}}-1)+({\...
...over 2}})+\ldots+\left({{1\over n+1}-{1\over n}}\right)+\ldots}\right]}\right\}$  
  $\textstyle =$ $\displaystyle -(1+\gamma-1)=-\gamma$ (15)
$\displaystyle \Gamma'(n)$ $\textstyle =$ $\displaystyle -\Gamma(n)\left\{{{1\over n}+\gamma+\left[{\left({{1\over 1+n}-1}...
...\over 2}}\right)+\left({{1\over 3+n}-{1\over 3}}\right)+\ldots}\right]}\right\}$  
  $\textstyle =$ $\displaystyle -(n-1)!\left({{1\over n}+\gamma-\sum_{k=1}^n {1\over k}}\right),$ (16)

where $\Psi(z)$ is the Digamma Function and $\psi_0(z)$ is the Polygamma Function. $n$th derivatives are given in terms of the Polygamma Functions $\psi_n$, $\psi_{n-1}$, ..., $\psi_0$.

The minimum value $x_0$ of $\Gamma(x)$ for Real Positive $x=x_0$ is achieved when

\end{displaymath} (17)

\end{displaymath} (18)

This can be solved numerically to give $x_0=1.46163\ldots$ (Sloane's A030169), which has Continued Fraction [1, 2, 6, 63, 135, 1, 1, 1, 1, 4, 1, 38, ...] (Sloane's A030170). At $x_0$, $\Gamma(x_0)$ achieves the value 0.8856031944... (Sloane's A030171), which has Continued Fraction [0, 1, 7, 1, 2, 1, 6, 1, 1, ...] (Sloane's A030172).

The Euler limit form is

$\displaystyle {1\over \Gamma(z)}$ $\textstyle =$ $\displaystyle z\left[{\,\lim_{m\to\infty} e^{(1+1/2+\ldots+1/m-\ln m)z}}\right]...
...fty} \prod_{n=1}^m \left\{{\left({1+{z\over n}}\right)e^{-z/n}}\right\}}\right]$  
  $\textstyle =$ $\displaystyle {1\over z}\prod_{n=1}^\infty \left[{\left({1+{1\over n}}\right)^z\left({1+{z\over n}}\right)^{-1}}\right],$ (19)

\Gamma(z) \equiv \lim_{n\to \infty} {1\cdot 2\cdot 3\cdots n\over z(z+1)(z+2)\cdots (z+n)} n^z.
\end{displaymath} (20)

The Lanczos Approximation for $z>0$ is

\Gamma(z+1)=(z+\gamma+{\textstyle{1\over 2}})^{z+1/2}e^{z+\g... z+1}+{c_2\over z+2}+\ldots+{c_n\over z+n}+\epsilon}\right].
\end{displaymath} (21)

The complete gamma function $\Gamma(x)$ can be generalized to the incomplete gamma function $\Gamma(x,a)$ such that $\Gamma (x) = \Gamma (x,0)$. The gamma function satisfies the recurrence relations
$\displaystyle \Gamma(1+z)$ $\textstyle =$ $\displaystyle z\Gamma(z)$ (22)
$\displaystyle \Gamma(1-z)$ $\textstyle =$ $\displaystyle -z\Gamma(-z).$ (23)

Additional identities are

$\displaystyle \Gamma(x)\Gamma(-x)$ $\textstyle =$ $\displaystyle - {\pi\over x\sin(\pi x)}$ (24)
$\displaystyle \Gamma(x)\Gamma(1-x)$ $\textstyle =$ $\displaystyle {\pi\over\sin(\pi x)}$ (25)
$\displaystyle \ln[\Gamma(x+iy+1)]$ $\textstyle =$ $\displaystyle \ln(x^2+y^2)+i\tan^{-1}\left({y\over x}\right)+\ln[\Gamma(x+iy)]$ (26)
$\displaystyle \vert(ix)!\vert^2$ $\textstyle =$ $\displaystyle {\pi x\over\sinh(\pi x)}$ (27)
$\displaystyle \vert(n+ix)!\vert$ $\textstyle =$ $\displaystyle \sqrt{\pi x\over\sinh(\pi x)} \prod_{s=1}^n \sqrt{s^2+x^2}.$ (28)

For integral arguments, the first few values are 1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880, ... (Sloane's A000142). For half integral arguments,

$\displaystyle \Gamma({\textstyle{1\over 2}})$ $\textstyle =$ $\displaystyle \sqrt{ \pi}$ (29)
$\displaystyle \Gamma({\textstyle{3\over 2}})$ $\textstyle =$ $\displaystyle {\textstyle{1\over 2}}\sqrt{\pi}$ (30)
$\displaystyle \Gamma({\textstyle{5\over 2}})$ $\textstyle =$ $\displaystyle {\textstyle{3\over 4}}\sqrt{\pi}.$ (31)

In general, for $m$ a Positive Integer $m = 1$, 2, ...
$\displaystyle \Gamma({\textstyle{1\over 2}}+m)$ $\textstyle =$ $\displaystyle {1\cdot 3\cdot 5\cdots (2m-1)\over 2^m}\sqrt{\pi}$  
  $\textstyle =$ $\displaystyle {(2m-1)!!\over 2^m} \sqrt{\pi}$ (32)
$\displaystyle \Gamma({\textstyle{1\over 2}}-m)$ $\textstyle =$ $\displaystyle {(-1)^m2^m\over 1\cdot 3\cdot 5\cdots(2m-1)}\sqrt{\pi}$  
  $\textstyle =$ $\displaystyle {(-1)^m2^m\over (2m-1)!!} \sqrt{\pi}.$ (33)

For $\Re[x]=-{1\over 2}$,
\vert(-{\textstyle{1\over 2}}+iy)!\vert^2 = {\pi\over\cosh(\pi y)}.
\end{displaymath} (34)

Gamma functions of argument $2z$ can be expressed using the Legendre Duplication Formula
\Gamma(2z)=(2\pi)^{-1/2} 2^{2z-1/2}\Gamma(z)\Gamma(z+{\textstyle{1\over 2}}).
\end{displaymath} (35)

Gamma functions of argument $3z$ can be expressed using a triplication Formula
\Gamma(3z)=(2\pi)^{-1} 3^{3z-1/2}\Gamma(z)\Gamma(z+{\textstyle{1\over 3}})\Gamma(z+{\textstyle{2\over 3}}).
\end{displaymath} (36)

The general result is the Gauss Multiplication Formula
\Gamma(z)\Gamma(z+{\textstyle{1\over n}})\cdots\Gamma(z+{\textstyle{n+-\over n}}) = (2\pi)^{(n-1)/2} n^{1/2-nz}\Gamma(nz).
\end{displaymath} (37)

The gamma function is also related to the Riemann Zeta Function $\zeta(z)$ by
\Gamma\left({s\over 2}\right)\pi^{-s/2}\zeta(s)=\Gamma\left({1-s\over 2}\right)\pi^{-(1-s)/2}\zeta(1-s).
\end{displaymath} (38)

Borwein and Zucker (1992) give a variety of identities relating gamma functions to square roots and Elliptic Integral Singular Values $k_n$, i.e., Moduli $k_n$ such that

{K'(k_n)\over K(k_n)}=\sqrt{n},
\end{displaymath} (39)

where $K(k)$ is a complete Elliptic Integral of the First Kind and $K'(k)=K(k')=K(\sqrt{1-k^2}\,)$ is the complementary integral.

$\quad \Gamma({\textstyle{1\over 3}})=2^{7/9}3^{-1/12}\pi^{1/3}[K(k_3)]^{1/3}$ (40)
$\quad \Gamma({\textstyle{1\over 4}})=2\pi^{1/4}[K(k_1)]^{1/2}$ (41)
$\quad \Gamma({\textstyle{1\over 6}})=2^{-1/3}3^{1/2}\pi^{-1/2}[\Gamma({\textstyle{1\over 3}})]^2$ (42)
$\quad \Gamma({\textstyle{1\over 8}})\Gamma({\textstyle{3\over 8}})=(\sqrt{2}-1)^{1/2}2^{13/4}\pi^{1/2}K(k_2)$ (43)
$\quad {\Gamma({\textstyle{1\over 8}})\over\Gamma({\textstyle{3\over 8}})}=2(\sqrt{2}+1)^{1/2}\pi^{-1/4}[K(k_1)]^{1/2}$ (44)
$\quad \Gamma({\textstyle{1\over 12}})=2^{-1/4}3^{3/8}(\sqrt{3}+1)^{1/2}\pi^{-1/2}\Gamma({\textstyle{1\over 4}})\Gamma({\textstyle{1\over 3}})$ (45)
$\quad \Gamma({\textstyle{5\over 12}})=2^{1/4}3^{-1/8}(\sqrt{3}-1)^{1/2}\pi^{1/2} {\Gamma({\textstyle{1\over 4}})\over\Gamma({\textstyle{1\over 3}})}$ (46)
$\quad {\Gamma({\textstyle{1\over 24}})\Gamma({\textstyle{11\over 24}})\over\Gam...
...extstyle{5\over 24}})\Gamma({\textstyle{7\over 24}})}=\sqrt{3}\sqrt{2+\sqrt{3}}$ (47)
$\quad {\Gamma({\textstyle{1\over 24}})\Gamma({\textstyle{5\over 24}})\over\Gamm...
...{\textstyle{11\over 24}})}= 4\cdot 3^{1/4}(\sqrt{3}+\sqrt{2}\,)\pi^{-1/2}K(k_1)$ (48)
$\cr $ (49)
$\quad \Gamma({\textstyle{1\over 24}})\Gamma({\textstyle{5\over 25}})\Gamma({\te...
...11\over 24}}) = 384(\sqrt{2}+1)(\sqrt{3}-\sqrt{2}\,)(2-\sqrt{3}\,)\pi[K(k_6)]^2$ (50)
$\quad \Gamma({\textstyle{1\over 10}})=2^{-7/10}5^{1/4}(\sqrt{5}+1)^{1/2}\pi^{-1/2}\Gamma({\textstyle{1\over 5}})\Gamma({\textstyle{2\over 5}})$ (51)
$\quad \Gamma({\textstyle{3\over 10}})=2^{-3/5}(\sqrt{5}-1)\pi^{1/2}{\Gamma({\textstyle{1\over 5}})\over\Gamma({\textstyle{2\over 5}})}$ (52)
$\quad {\Gamma({\textstyle{1\over 15}})\Gamma({\textstyle{4\over 15}})\Gamma({\t...
...^{1/2}5^{1/6}\sin({\textstyle{2\over 15}}\pi)[\Gamma({\textstyle{1\over 3}})]^2$ (53)
$\quad {\Gamma({\textstyle{1\over 15}})\Gamma({\textstyle{2\over 15}})\Gamma({\t...
...\over 5}}\pi)\sin({\textstyle{4\over 15}}\pi)[\Gamma({\textstyle{1\over 5}})]^2$ (54)
$\quad {\Gamma({\textstyle{2\over 15}})\Gamma({\textstyle{4\over 15}})\Gamma({\t...
...^{1/2}[\Gamma({\textstyle{2\over 5}})]^2\over \sin({\textstyle{4\over 15}}\pi)}$ (55)
$\quad {\Gamma({\textstyle{1\over 15}})\Gamma({\textstyle{2\over 15}})\Gamma({\t...
...yle{7\over 15}})} = 60(\sqrt{5}-1)\sin({\textstyle{7\over 15}}\pi)[K(k_{15})]^2$ (56)
$\quad {\Gamma({\textstyle{1\over 20}})\Gamma({\textstyle{9\over 20}})\over\Gamm...
...tstyle{3\over 20}})\Gamma({\textstyle{7\over 20}})} = 2^{-1}5^{1/4}(\sqrt{5}+1)$ (57)
$\quad {\Gamma({\textstyle{1\over 20}})\Gamma({\textstyle{3\over 20}})\over\Gamm...
...over 20}}\pi)\sin({\textstyle{9\over 20}}\pi)[\Gamma({\textstyle{1\over 5}})]^2$ (58)
$\quad {\Gamma({\textstyle{1\over 20}})\Gamma({\textstyle{7\over 20}})\over\Gamm...
...over 20}}\pi)\sin({\textstyle{9\over 20}}\pi)[\Gamma({\textstyle{2\over 5}})]^2$ (59)
$\quad \Gamma({\textstyle{1\over 20}})\Gamma({\textstyle{3\over 20}})\Gamma({\te...
...over 20}})\Gamma({\textstyle{9\over 20}}) = 160(\sqrt{5}-2)^{1/2}\pi[K(k_5)]^2.$ (60)

A few curious identities include

\prod_{n=1}^8 \Gamma({\textstyle{1\over 3}} n)={640\over 3^6} \left({\pi\over\sqrt{3}}\right)^3
\end{displaymath} (61)

{[\Gamma({\textstyle{1\over 4}})]^4\over 16\pi^2}={3^2\over 3^2-1} {5^2-1\over 5^2} {7^2\over 7^2-1} \cdots
\end{displaymath} (62)

{\Gamma'(1)\over\Gamma(1)}-{\Gamma'({\textstyle{1\over 2}})\over\Gamma({\textstyle{1\over 2}})}=2\ln 2
\end{displaymath} (63)

(Magnus and Oberhettinger 1949, p. 1). Ramanujan also gave a number of fascinating identities:
\end{displaymath} (64)

...h[\pi(m+n)\sqrt{3}\,]-\cos[\pi(m-n)]\over 2\pi^2(m^2+mn+n^2)},
\end{displaymath} (65)

\phi(m,n)\equiv\prod_{k=1}^\infty\left[{1+\left({m+n\over k+m}\right)^3}\right],
\end{displaymath} (66)

\prod_{k=1}^\infty\left[{1+\left({n\over k}\right)^3}\right]...
...)]}{\cosh(\pi n\sqrt{3}\,)-\cos(\pi n)\over 2^{n+2}\pi^{3/2}n}
\end{displaymath} (67)

(Berndt 1994).

The following Asymptotic Series is occasionally useful in probability theory (e.g., the 1-D Random Walk):

{\Gamma(J+{\textstyle{1\over 2}})\over\Gamma(J)}=\sqrt{J}\le...
...ver 128J^2}+{5\over 1024J^3}-{21\over 32768J^4}+\ldots}\right)
\end{displaymath} (68)

(Graham et al. 1994). This series also gives a nice asymptotic generalization of Stirling Numbers of the First Kind to fractional values.

It has long been known that $\Gamma({\textstyle{1\over 4}})\pi^{-1/4}$ is Transcendental (Davis 1959), as is $\Gamma({\textstyle{1\over 3}})$ (Le Lionnais 1983), and Chudnovsky has apparently recently proved that $\Gamma({\textstyle{1\over 4}})$ is itself Transcendental.

The upper incomplete gamma function is given by

\Gamma(a,x) \equiv \int^\infty_x t^{a-1}e^{-t}\,dt = 1-\gamma(a,x),
\end{displaymath} (69)

where $\gamma$ is the lower incomplete gamma function. For $a$ an Integer $n$
\Gamma(n,x) = (n-1)!e^{-x} \sum_{s=0}^{n-1} {x^s\over s!} = (n-1)!e^{-x}\mathop{\rm es}\nolimits_{n-1}(x),
\end{displaymath} (70)

where es is the Exponential Sum Function. The lower incomplete gamma function is given by
$\displaystyle \gamma(a,x)$ $\textstyle \equiv$ $\displaystyle \Gamma(a)-\Gamma(a,x) = \int^x_0 e^{-t}t^{a-1}\,dt$  
  $\textstyle =$ $\displaystyle a^{-1}x^a e^{-x} {}_1F_1(1;1+a;x)$  
  $\textstyle =$ $\displaystyle a^{-1}x^a {}_1F_1(a;1+a;-x),$ (71)

where ${}_1F_1(a;b;x)$ is the Confluent Hypergeometric Function of the First Kind. For $a$ an Integer $n$,
$\displaystyle \gamma (n,x)$ $\textstyle =$ $\displaystyle (n-1)!\left({1 - e^{-x}\sum_{s=0}^{n-1} {x^s\over s!}}\right)$  
  $\textstyle =$ $\displaystyle (n-1)!\left[{1-\mathop{\rm es}\nolimits_{n-1}(x)}\right].$ (72)

The function $\Gamma(a,z)$ is denoted Gamma[a,z] and the function $\gamma(a,z)$ is denoted Gamma[a,0,z] in Mathematica ${}^{\scriptstyle\circledRsymbol}$ (Wolfram Research, Champaign, IL).

See also Digamma Function, Double Gamma Function, Fransén-Robinson Constant G-Function, Gauss Multiplication Formula, Lambda Function, Legendre Duplication Formula, Mu Function, Nu Function, Pearson's Function, Polygamma Function, Regularized Gamma Function, Stirling's Series


Abramowitz, M. and Stegun, C. A. (Eds.). ``Gamma (Factorial) Function'' and ``Incomplete Gamma Function.'' §6.1 and 6.5 in Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables, 9th printing. New York: Dover, pp. 255-258 and 260-263, 1972.

Arfken, G. ``The Gamma Function (Factorial Function).'' Ch. 10 in Mathematical Methods for Physicists, 3rd ed. Orlando, FL: Academic Press, pp. 339-341 and 539-572, 1985.

Artin, E. The Gamma Function. New York: Holt, Rinehart, and Winston, 1964.

Berndt, B. C. Ramanujan's Notebooks, Part IV. New York: Springer-Verlag, pp. 334-342, 1994.

Borwein, J. M. and Zucker, I. J. ``Elliptic Integral Evaluation of the Gamma Function at Rational Values of Small Denominator.'' IMA J. Numerical Analysis 12, 519-526, 1992.

Davis, H. T. Tables of the Higher Mathematical Functions. Bloomington, IN: Principia Press, 1933.

Davis, P. J. ``Leonhard Euler's Integral: A Historical Profile of the Gamma Function.'' Amer. Math. Monthly 66, 849-869, 1959.

Finch, S. ``Favorite Mathematical Constants.''

Graham, R. L.; Knuth, D. E.; and Patashnik, O. Answer to problem 9.60 in Concrete Mathematics: A Foundation for Computer Science. Reading, MA: Addison-Wesley, 1994.

Le Lionnais, F. Les nombres remarquables. Paris: Hermann, p. 46, 1983.

Magnus, W. and Oberhettinger, F. Formulas and Theorems for the Special Functions of Mathematical Physics. New York: Chelsea, 1949.

Nielsen, N. Handbuch der Theorie der Gammafunktion. New York: Chelsea, 1965.

Press, W. H.; Flannery, B. P.; Teukolsky, S. A.; and Vetterling, W. T. ``Gamma Function, Beta Function, Factorials, Binomial Coefficients'' and ``Incomplete Gamma Function, Error Function, Chi-Square Probability Function, Cumulative Poisson Function.'' §6.1 and 6.2 in Numerical Recipes in FORTRAN: The Art of Scientific Computing, 2nd ed. Cambridge, England: Cambridge University Press, pp. 206-209 and 209-214, 1992.

Sloane, N. J. A. Sequences A030169, A030170, A030171, A030172, and A000142/M1675 in ``An On-Line Version of the Encyclopedia of Integer Sequences.''

Spanier, J. and Oldham, K. B. ``The Gamma Function $\Gamma(x)$'' and ``The Incomplete Gamma $\gamma(\nu; x)$ and Related Functions.'' Chs. 43 and 45 in An Atlas of Functions. Washington, DC: Hemisphere, pp. 411-421 and 435-443, 1987.

Whittaker, E. T. and Watson, G. N. A Course in Modern Analysis, 4th ed. Cambridge, England: Cambridge University Press, 1990.

info prev up next book cdrom email home

© 1996-9 Eric W. Weisstein