Incomplete gamma function explained
In mathematics, the upper and lower incomplete gamma functions are types of special functions which arise as solutions to various mathematical problems such as certain integrals.
Their respective names stem from their integral definitions, which are defined similarly to the gamma function but with different or "incomplete" integral limits. The gamma function is defined as an integral from zero to infinity. This contrasts with the lower incomplete gamma function, which is defined as an integral from zero to a variable upper limit. Similarly, the upper incomplete gamma function is defined as an integral from a variable lower limit to infinity.
Definition
The upper incomplete gamma function is defined as:whereas the lower incomplete gamma function is defined as:In both cases is a complex parameter, such that the real part of is positive.
Properties
By integration by parts we find the recurrence relationsandSince the ordinary gamma function is defined aswe haveand
Continuation to complex values
The lower incomplete gamma and the upper incomplete gamma function, as defined above for real positive and, can be developed into holomorphic functions, with respect both to and, defined for almost all combinations of complex and .[1] Complex analysis shows how properties of the real incomplete gamma functions extend to their holomorphic counterparts.
Lower incomplete gamma function
Holomorphic extension
Repeated application of the recurrence relation for the lower incomplete gamma function leads to the power series expansion: [2] Given the rapid growth in absolute value of when, and the fact that the reciprocal of is an entire function, the coefficients in the rightmost sum are well-defined, and locally the sum converges uniformly for all complex and . By a theorem of Weierstraß,[3] the limiting function, sometimes denoted as [4] is entire with respect to both (for fixed) and (for fixed),[1] and, thus, holomorphic on by Hartog's theorem.[5] Hence, the following decomposition[1] extends the real lower incomplete gamma function as a holomorphic function, both jointly and separately in and . It follows from the properties of
and the
Γ-function, that the first two factors capture the
singularities of
(at or a non-positive integer), whereas the last factor contributes to its zeros.
Multi-valuedness
The complex logarithm is determined up to a multiple of only, which renders it multi-valued. Functions involving the complex logarithm typically inherit this property. Among these are the complex power, and, since appears in its decomposition, the -function, too.
The indeterminacy of multi-valued functions introduces complications, since it must be stated how to select a value. Strategies to handle this are:
- (the most general way) replace the domain of multi-valued functions by a suitable manifold in called Riemann surface. While this removes multi-valuedness, one has to know the theory behind it;[6]
- restrict the domain such that a multi-valued function decomposes into separate single-valued branches, which can be handled individually.
The following set of rules can be used to interpret formulas in this section correctly. If not mentioned otherwise, the following is assumed:
=Sectors
=Sectors in having their vertex at often prove to be appropriate domains for complex expressions. A sector consists of all complex fulfilling and with some and . Often, can be arbitrarily chosen and is not specified then. If is not given, it is assumed to be, and the sector is in fact the whole plane, with the exception of a half-line originating at and pointing into the direction of, usually serving as a branch cut. Note: In many applications and texts, is silently taken to be 0, which centers the sector around the positive real axis.
=Branches
=In particular, a single-valued and holomorphic logarithm exists on any such sector D having its imaginary part bound to the range . Based on such a restricted logarithm, and the incomplete gamma functions in turn collapse to single-valued, holomorphic functions on (or), called branches of their multi-valued counterparts on D. Adding a multiple of to yields a different set of correlated branches on the same set . However, in any given context here, is assumed fixed and all branches involved are associated to it. If, the branches are called principal, because they equal their real analogues on the positive real axis. Note: In many applications and texts, formulas hold only for principal branches.
=Relation between branches
=The values of different branches of both the complex power function and the lower incomplete gamma function can be derived from each other by multiplication of
,
[1] for a suitable integer.
Behavior near branch point
The decomposition above further shows, that γ behaves near asymptotically like:
For positive real, and,, when . This seems to justify setting for real . However, matters are somewhat different in the complex realm. Only if (a) the real part of is positive, and (b) values are taken from just a finite set of branches, they are guaranteed to converge to zero as, and so does . On a single branch of is naturally fulfilled, so there for with positive real part is a continuous limit. Also note that such a continuation is by no means an analytic one.
Algebraic relations
All algebraic relations and differential equations observed by the real hold for its holomorphic counterpart as well. This is a consequence of the identity theorem, stating that equations between holomorphic functions valid on a real interval, hold everywhere. In particular, the recurrence relation [2] and [2] are preserved on corresponding branches.
Integral representation
The last relation tells us, that, for fixed, is a primitive or antiderivative of the holomorphic function . Consequently, for any complex,holds, as long as the path of integration is entirely contained in the domain of a branch of the integrand. If, additionally, the real part of is positive, then the limit for applies, finally arriving at the complex integral definition of [1]
Any path of integration containing 0 only at its beginning, otherwise restricted to the domain of a branch of the integrand, is valid here, for example, the straight line connecting and .
=Real values
=Given the integral representation of a principal branch of, the following equation holds for all positive real, :[7]
=s complex
=This result extends to complex . Assume first and . Thenwhere[8] has been used in the middle. Since the final integral becomes arbitrarily small if only is large enough, converges uniformly for on the strip towards a holomorphic function, which must be Γ(s) because of the identity theorem. Taking the limit in the recurrence relation and noting, that lim for and all, shows, that converges outside the strip, too, towards a function obeying the recurrence relation of the Γ-function. It followsfor all complex not a non-positive integer, real and principal.
=Sectorwise convergence
=Now let be from the sector with some fixed, be the principal branch on this sector, and look at
As shown above, the first difference can be made arbitrarily small, if is sufficiently large. The second difference allows for following estimation:
\left|z^ e^\right| dz = \int_u^
\left|z\right|^ \, e^ \, e^ \, dz,where we made use of the integral representation of and the formula about above. If we integrate along the arc with radius around 0 connecting and, then the last integral is
where is a constant independent of or . Again referring to the behavior of for large, we see that the last expression approaches 0 as increases towards .In total we now have:
if is not a non-negative integer, is arbitrarily small, but fixed, and denotes the principal branch on this domain.
Overview
is:
- entire in for fixed, positive integer ;
- multi-valued holomorphic in for fixed not an integer, with a branch point at ;
- on each branch meromorphic in for fixed, with simple poles at non-positive integers s.
Upper incomplete gamma function
As for the upper incomplete gamma function, a holomorphic extension, with respect to or, is given by[1] at points, where the right hand side exists. Since
is multi-valued, the same holds for
, but a restriction to principal values only yields the single-valued principal branch of
.
When is a non-positive integer in the above equation, neither part of the difference is defined, and a limiting process, here developed for, fills in the missing values. Complex analysis guarantees holomorphicity, because
proves to be
bounded in a
neighbourhood of that limit for a fixed .
To determine the limit, the power series of
at is useful. When replacing
by its power series in the integral definition of
, one obtains (assume, positive reals for now):
or
[4] which, as a series representation of the entire
function, converges for all complex (and all complex not a non-positive integer).
With its restriction to real values lifted, the series allows the expansion:
When :[9] (
is the
Euler–Mascheroni constant here), hence,
is the limiting function to the upper incomplete gamma function as, also known as the
exponential integral [10] By way of the recurrence relation, values of
for positive integers can be derived from this result,
[11] so the upper incomplete gamma function proves to exist and be holomorphic, with respect both to and, for all and .
is:
- entire in for fixed, positive integral ;
- multi-valued holomorphic in for fixed non zero and not a positive integer, with a branch point at ;
- equal to
for with positive real part and (the limit when
), but this is a continuous extension, not an
analytic one (
does not hold for real !);
- on each branch entire in for fixed .
Special values
if is a positive
integer,
if is a positive
integer,
[12] \Gamma(s,0)=\Gamma(s),\Re(s)>0
,
,
,
\Gamma(0,x)=-\operatorname{Ei}(-x)
for
,
\Gamma(s,x)=xs\operatorname{E}1-s(x)
,
\Gamma\left(\tfrac{1}{2},x\right)=\sqrt\pi\operatorname{erfc}\left(\sqrtx\right)
,
\gamma\left(\tfrac{1}{2},x\right)=\sqrt\pi\operatorname{erf}\left(\sqrtx\right)
.
Here,
is the
exponential integral,
is the generalized exponential integral,
is the
error function, and
is the complementary error function,
\operatorname{erfc}(x)=1-\operatorname{erf}(x)
.
Asymptotic behavior
as
,
as
and
(for real, the error of is on the order of if and if),
\Gamma(s,x)\sim\Gamma(s)-
(-1)n
as an
asymptotic series where
and
.
[13] \Gamma(-N,x)\simCN+
lnx-
(-1)n
as an
asymptotic series where
and
, where
, where
is the
Euler-Mascheroni constant.
[13]
as
,
as
,
\Gamma(s,z)\simzs-1e-z\sumk=0
z-k
as an
asymptotic series where
and
\left|\argz\right|<\tfrac{3}{2}\pi
.
[14] Evaluation formulae
The lower gamma function can be evaluated using the power series expansion:[15] where
}is the
Pochhammer symbol.
An alternative expansion iswhere is Kummer's confluent hypergeometric function.
Connection with Kummer's confluent hypergeometric function
When the real part of is positive,where has an infinite radius of convergence.
Again with confluent hypergeometric functions and employing Kummer's identity,
For the actual computation of numerical values, Gauss's continued fraction provides a useful expansion:
This continued fraction converges for all complex, provided only that is not a negative integer.
The upper gamma function has the continued fraction[16] and
Multiplication theorem
The following multiplication theorem holds true:
Software implementation
The incomplete gamma functions are available in various of the computer algebra systems.
Even if unavailable directly, however, incomplete function values can be calculated using functions commonly included in spreadsheets (and computer algebra packages). In Excel, for example, these can be calculated using the gamma function combined with the gamma distribution function.
- The lower incomplete function:
= EXP(GAMMALN(s))*GAMMA.DIST(x,s,1,TRUE)
.
- The upper incomplete function:
= EXP(GAMMALN(s))*(1-GAMMA.DIST(x,s,1,TRUE))
.These follow from the definition of the gamma distribution's cumulative distribution function.
In Python, the Scipy library provides implementations of incomplete gamma functions under, however, it does not support negative values for the first argument. The function from the mpmath library supports all complex arguments.
Regularized gamma functions and Poisson random variables
Two related functions are the regularized gamma functions:
is the
cumulative distribution function for
gamma random variables with
shape parameter
and
scale parameter 1.
When
is an integer,
is the cumulative distribution function for
Poisson random variables: If
is a
random variable then