 GAMMA - Maple Programming Help

GAMMA

Gamma and incomplete Gamma functions

lnGAMMA

log-Gamma function

Calling Sequence

 GAMMA(z) $\mathrm{\Gamma }\left(z\right)$ GAMMA(a, z) $\mathrm{\Gamma }\left(a,z\right)$ lnGAMMA(z)

Parameters

 z - algebraic expression a - algebraic expression

Description

 • The Gamma function is defined for Re(z)>0 by

$\mathrm{\Gamma }\left(z\right)={\int }_{0}^{\mathrm{\infty }}{ⅇ}^{-t}{t}^{z-1}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}ⅆt$

 and is extended to the rest of the complex plane, less the non-positive integers, by analytic continuation.  GAMMA has a simple pole at each of the points z=0,-1,-2,....
 • The incomplete Gamma function is defined as:

$\mathrm{\Gamma }\left(a,z\right)=\mathrm{\Gamma }\left(a\right)-\frac{{z}^{a}1\mathrm{F1}\left(a,1+a,-z\right)}{a}$

 where 1F1 is the confluent hypergeometric function (in Maple notation, 1F1(a,1+a,-z) = hypergeom([a],[1+a],-z)).
 For Re(a)>0, we also have the integral representation

$\mathrm{\Gamma }\left(a,z\right)={\int }_{z}^{\mathrm{\infty }}{ⅇ}^{-t}{t}^{a-1}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}ⅆt$

 (Some authors refer to Maple's incomplete Gamma function as the complementary or upper incomplete Gamma function, and call GAMMA(a)-GAMMA(a,z) the incomplete or lower incomplete Gamma function.)
 • The GAMMA function extends the classical factorial function to the complex plane: GAMMA( n ) = (n-1)!.  In general, Maple does not distinguish these two functions, although the factorial function will evaluate for any positive integer, while for integer n, GAMMA(n) will evaluate only if n is not too large. Use expand to force GAMMA(n) to evaluate.
 • You can enter the command GAMMA using either the 1-D or 2-D calling sequence. For example, GAMMA(5) is equivalent to $\mathrm{\Gamma }\left(5\right)$.
 • For positive real arguments z, the lnGAMMA function is defined by:

$\mathrm{lnGAMMA}\left(z\right)=\mathrm{ln}\left(\mathrm{\Gamma }\left(z\right)\right)$

 For complex z, Maple evaluates the principal branch of the log-Gamma function, which is defined by analytic continuation from the positive real axis. Each of the points z=0,-1,-2,..., is a singularity and a branch point, and the union of the branch cuts is the negative real axis.  On the branch cuts, the values of lnGAMMA(z) are determined by continuity from above.  (Note, therefore, that lnGAMMA <> ln@GAMMA in general.)

Examples

 > $\mathrm{\Gamma }\left(1\right)$
 ${1}$ (1)
 > $\mathrm{\Gamma }\left(5\right)=4!$
 ${24}{=}{24}$ (2)
 > $\mathrm{\Gamma }\left(-1.4\right)=\left(-2.4\right)!$
 ${2.659271873}{=}{2.659271873}$ (3)
 > $\mathrm{\Gamma }\left(4,-1\right)$
 ${2}{}{ⅇ}$ (4)
 > $\mathrm{\Gamma }\left(1.0+2.5I\right)$
 ${0.06687277236}{+}{0.04032263512}{}{I}$ (5)
 > $\mathrm{\Gamma }\left(1.0+2.5I,2.0+3.5I\right)$
 ${0.01314614269}{+}{0.006253182683}{}{I}$ (6)
 > $\mathrm{lnGAMMA}\left(1.234+2.345I\right)$
 ${-2.132556911}{+}{0.7097892285}{}{I}$ (7)
 > $\mathrm{lnGAMMA}\left(-1.5\right)\ne \mathrm{ln}\left(\mathrm{\Gamma }\left(-1.5\right)\right)$
 ${0.8600470154}{-}{6.283185307}{}{I}{\ne }{0.8600470153}$ (8)

References

 Erdelyi, A. Higher Transcendental Functions. McGraw-Hill, 1953.
 Hare, D. E. G. "Computing the Principal Branch of log-Gamma." Journal of Algorithms, (November 1997): 221-236.