Fractional Calculus Computer Algebra System math software Home | index | math | software | calculator | handbook | help | forum | contact | 中文



gamma

gamma and incomplete gamma functions

loggamma

log-gamma function


Calling Sequence Parameters Description Examples References Source

Calling Sequence

gamma(z) Γ(z)
gamma(a, z) Γ(a,z)
gamma(n,a, z) `Gamma^((n))(a,z)`
loggamma(z) logΓ(z)

Parameters

z - algebraic expression
a - algebraic expression
n - the nth derivative

Description

• The gamma function is defined for Re(z)>0 by
Γ(z)= `int_0^oo e^(-t) t^(z-1) dt`
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:
Γ(a,z)=Γ(a)−za1F1(a,1+a,−z)a
where 1F1 is the confluent hypergeometric function (in it notation, 1F1(a,1+a,-z) = hypergeom([a],[1+a],-z)).
For Re(a)>0, we also have the integral representation
Γ(a,z)=`int_z^oo e^(-t) t^(a-1) dt`
(Some authors refer to it'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, it 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 Γ(5).
• For positive real arguments z, the lngamma function is defined by:
lnΓ(z)=ln(Γ(z))
For complex z, it 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(z)) in general.)

Examples

 
 >   Γ(1) 
1 
 (1) 

 >   Γ(5)=4! 
24=24 
 (2) 

 >   Γ(−1.4)=(−2.4)! 
 2.659271873=2.659271873 
 (3) 

 >   Γ(4,−1) 
2e 
 (4) 

 >   Γ(1.0+2.5I) 
0.06687277236+0.04032263512I 
 (5) 

 >   Γ(1.0+2.5I,2.0+3.5I) 
0.01314614269+0.006253182683I 
 (6) 

 >   loggamma(1.234+2.345I) 
−2.132556911+0.7097892285I 
 (7) 

 >   lngamma(−1.5)≠ln(Γ(−1.5)) 
 0.8600470154−6.283185307I≠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. 
 




See Also

Copyright 2000-2017 DrHuang.com