Incomplete gamma function

From testwiki
Jump to navigation Jump to search

Template:Short description Template:Use dmy dates

The upper incomplete gamma function for some values of s: 0 (blue), 1 (red), 2 (green), 3 (orange), 4 (purple).
Plot of the regularized incomplete gamma function Q(2,z) in the complex plane from -2-2i to 2+2i with colors created with Mathematica 13.1 function ComplexPlot3D
Plot of the regularized incomplete gamma function Q(2,z) in the complex plane from -2-2i to 2+2i with colors created with Mathematica 13.1 function ComplexPlot3D

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: Γ(s,x)=xts1etdt, whereas the lower incomplete gamma function is defined as: γ(s,x)=0xts1etdt. In both cases Template:Mvar is a complex parameter, such that the real part of Template:Mvar is positive.

Properties

By integration by parts we find the recurrence relations Γ(s+1,x)=sΓ(s,x)+xsex and γ(s+1,x)=sγ(s,x)xsex. Since the ordinary gamma function is defined as Γ(s)=0ts1etdt we have Γ(s)=Γ(s,0)=limxγ(s,x) and γ(s,x)+Γ(s,x)=Γ(s).

Continuation to complex values

The lower incomplete gamma and the upper incomplete gamma function, as defined above for real positive Template:Mvar and Template:Mvar, can be developed into holomorphic functions, with respect both to Template:Mvar and Template:Mvar, defined for almost all combinations of complex Template:Mvar and Template:Mvar.[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] γ(s,x)=k=0xsexxks(s+1)(s+k)=xsΓ(s)exk=0xkΓ(s+k+1). Given the rapid growth in absolute value of Template:Math when Template:Math, and the fact that the [[Reciprocal Gamma function|reciprocal of Template:Math]] is an entire function, the coefficients in the rightmost sum are well-defined, and locally the sum converges uniformly for all complex Template:Mvar and Template:Mvar. By a theorem of Weierstrass,[3] the limiting function, sometimes denoted as Template:Nowrap[4] γ*(s,z):=ezk=0zkΓ(s+k+1) is entire with respect to both Template:Mvar (for fixed Template:Mvar) and Template:Mvar (for fixed Template:Mvar),[1] and, thus, holomorphic on Template:Math by Hartog's theorem.[5] Hence, the following decomposition[1] γ(s,z)=zsΓ(s)γ*(s,z), extends the real lower incomplete gamma function as a holomorphic function, both jointly and separately in Template:Mvar and Template:Mvar. It follows from the properties of zs and the Γ-function, that the first two factors capture the singularities of γ(s,z) (at Template:Math or Template:Mvar a non-positive integer), whereas the last factor contributes to its zeros.

Multi-valuedness

The complex logarithm Template:Math is determined up to a multiple of Template:Math only, which renders it multi-valued. Functions involving the complex logarithm typically inherit this property. Among these are the complex power, and, since Template:Math appears in its decomposition, the Template:Math-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 Template:Math of multi-valued functions by a suitable manifold in Template:Math 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 Template:Math having their vertex at Template:Math often prove to be appropriate domains for complex expressions. A sector Template:Mvar consists of all complex Template:Mvar fulfilling Template:Math and Template:Math with some Template:Mvar and Template:Math. Often, Template:Mvar can be arbitrarily chosen and is not specified then. If Template:Mvar is not given, it is assumed to be Template:Pi, and the sector is in fact the whole plane Template:Math, with the exception of a half-line originating at Template:Math and pointing into the direction of Template:Math, usually serving as a branch cut. Note: In many applications and texts, Template:Mvar 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 Template:Open-open. Based on such a restricted logarithm, Template:Math and the incomplete gamma functions in turn collapse to single-valued, holomorphic functions on Template:Mvar (or Template:Math), called branches of their multi-valued counterparts on D. Adding a multiple of Template:Math to Template:Mvar yields a different set of correlated branches on the same set Template:Mvar. However, in any given context here, Template:Mvar is assumed fixed and all branches involved are associated to it. If Template:Math, 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 e2πiks,[1] for Template:Mvar a suitable integer.

Behavior near branch point

The decomposition above further shows, that γ behaves near Template:Math asymptotically like: γ(s,z)zsΓ(s)γ*(s,0)=zsΓ(s)/Γ(s+1)=zs/s.

For positive real Template:Mvar, Template:Mvar and Template:Mvar, Template:Math, when Template:Math. This seems to justify setting Template:Math for real Template:Math. However, matters are somewhat different in the complex realm. Only if (a) the real part of Template:Mvar is positive, and (b) values Template:Math are taken from just a finite set of branches, they are guaranteed to converge to zero as Template:Math, and so does Template:Math. On a single branch of Template:Math is naturally fulfilled, so there Template:Math for Template:Mvar 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 Template:Math 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 Template:Math [2] are preserved on corresponding branches.

Integral representation

The last relation tells us, that, for fixed Template:Mvar, Template:Mvar is a primitive or antiderivative of the holomorphic function Template:Math. Consequently, for any complex Template:Math, uvts1etdt=γ(s,v)γ(s,u) 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 Template:Mvar is positive, then the limit Template:Math for Template:Math applies, finally arriving at the complex integral definition of Template:Math[1] γ(s,z)=0zts1etdt,(s)>0.

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 Template:Math and Template:Mvar.

Limit for Template:Math
Real values

Given the integral representation of a principal branch of Template:Math, the following equation holds for all positive real Template:Mvar, Template:Mvar:[7] Γ(s)=0ts1etdt=limxγ(s,x)

s complex

This result extends to complex Template:Mvar. Assume first Template:Math and Template:Math. Then |γ(s,b)γ(s,a)|ab|ts1|etdt=abts1etdtabtetdt where[8] |zs|=|z|sesargz has been used in the middle. Since the final integral becomes arbitrarily small if only Template:Mvar is large enough, Template:Math converges uniformly for Template:Math on the strip Template:Math towards a holomorphic function,[3] which must be Γ(s) because of the identity theorem. Taking the limit in the recurrence relation Template:Math and noting, that lim Template:Math for Template:Math and all Template:Mvar, shows, that Template:Math converges outside the strip, too, towards a function obeying the recurrence relation of the Γ-function. It follows Γ(s)=limxγ(s,x) for all complex Template:Mvar not a non-positive integer, Template:Mvar real and Template:Math principal.

Sectorwise convergence

Now let Template:Mvar be from the sector Template:Math with some fixed Template:Mvar (Template:Math), Template:Math be the principal branch on this sector, and look at Γ(s)γ(s,u)=Γ(s)γ(s,|u|)+γ(s,|u|)γ(s,u).

As shown above, the first difference can be made arbitrarily small, if Template:Math is sufficiently large. The second difference allows for following estimation: |γ(s,|u|)γ(s,u)|u|u||zs1ez|dz=u|u||z|s1esargzezdz, where we made use of the integral representation of Template:Math and the formula about Template:Math above. If we integrate along the arc with radius Template:Math around 0 connecting Template:Mvar and Template:Math, then the last integral is R|argu|Rs1es|argu|eRcosarguδRsesδeRcosδ=M(Rcosδ)seRcosδ where Template:Math is a constant independent of Template:Mvar or Template:Mvar. Again referring to the behavior of Template:Math for large Template:Mvar, we see that the last expression approaches 0 as Template:Mvar increases towards Template:Math. In total we now have: Γ(s)=lim|z|γ(s,z),|argz|<π/2ϵ, if Template:Mvar is not a non-negative integer, Template:Math is arbitrarily small, but fixed, and Template:Math denotes the principal branch on this domain.

Overview

γ(s,z) is:

Upper incomplete gamma function

As for the upper incomplete gamma function, a holomorphic extension, with respect to Template:Mvar or Template:Mvar, is given by[1] Γ(s,z)=Γ(s)γ(s,z) at points Template:Math, 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 Template:Mvar is a non-positive integer in the above equation, neither part of the difference is defined, and a limiting process, here developed for Template:Math, fills in the missing values. Complex analysis guarantees holomorphicity, because Γ(s,z) proves to be bounded in a neighbourhood of that limit for a fixed Template:Mvar.

To determine the limit, the power series of γ* at Template:Math is useful. When replacing ex by its power series in the integral definition of γ, one obtains (assume Template:Mvar,Template:Mvar positive reals for now): γ(s,x)=0xts1etdt=0xk=0(1)kts+k1k!dt=k=0(1)kxs+kk!(s+k)=xsk=0(x)kk!(s+k) or[4] γ*(s,x)=k=0(x)kk!Γ(s)(s+k), which, as a series representation of the entire γ* function, converges for all complex Template:Mvar (and all complex Template:Mvar not a non-positive integer).

With its restriction to real values lifted, the series allows the expansion: γ(s,z)1s=1s+zsk=0(z)kk!(s+k)=zs1s+zsk=1(z)kk!(s+k),(s)>1,s0.

When Template:Math:[9] zs1sln(z),Γ(s)1s=1sγ+O(s)1sγ, (γ is the Euler–Mascheroni constant here), hence, Γ(0,z)=lims0(Γ(s)1s(γ(s,z)1s))=γln(z)k=1(z)kk(k!) is the limiting function to the upper incomplete gamma function as Template:Math, also known as the exponential integral Template:Nowrap[10]

By way of the recurrence relation, values of Γ(n,z) for positive integers Template:Mvar can be derived from this result,[11] Γ(n,z)=1n!(ezznk=0n1(1)k(nk1)!zk+(1)nΓ(0,z)) so the upper incomplete gamma function proves to exist and be holomorphic, with respect both to Template:Mvar and Template:Mvar, for all Template:Mvar and Template:Math.

Γ(s,z) is:

Special values

  • Γ(s+1,1)=es!e if Template:Mvar is a positive integer,
  • Γ(s,x)=(s1)!exk=0s1xkk! if Template:Mvar is a positive integer,[12]
  • Γ(s,0)=Γ(s),(s)>0,
  • Γ(1,x)=ex,
  • γ(1,x)=1ex,
  • Γ(0,x)=Ei(x) for x>0,
  • Γ(s,x)=xsE1s(x),
  • Γ(12,x)=πerfc(x),
  • γ(12,x)=πerf(x).

Here, Ei is the exponential integral, En is the generalized exponential integral, erf is the error function, and erfc is the complementary error function, erfc(x)=1erf(x).

Asymptotic behavior

Evaluation formulae

The lower gamma function can be evaluated using the power series expansion:[15] γ(s,z)=k=0zsezzks(s+1)(s+k)=zsezk=0zksk+1 where sk+1 is the Pochhammer symbol.

An alternative expansion is γ(s,z)=k=0(1)kk!zs+ks+k=zssM(s,s+1,z), where Template:Math is Kummer's confluent hypergeometric function.

Connection with Kummer's confluent hypergeometric function

When the real part of Template:Mvar is positive, γ(s,z)=s1zsezM(1,s+1,z) where M(1,s+1,z)=1+z(s+1)+z2(s+1)(s+2)+z3(s+1)(s+2)(s+3)+ has an infinite radius of convergence.

Again with confluent hypergeometric functions and employing Kummer's identity, Γ(s,z)=ezU(1s,1s,z)=zsezΓ(1s)0euus(z+u)du=ezzsU(1,1+s,z)=ez0eu(z+u)s1du=ezzs0ezu(1+u)s1du.

For the actual computation of numerical values, Gauss's continued fraction provides a useful expansion: γ(s,z)=zsezsszs+1+zs+2(s+1)zs+3+2zs+4(s+2)zs+5+3zs+6.

This continued fraction converges for all complex Template:Mvar, provided only that Template:Mvar is not a negative integer.

The upper gamma function has the continued fraction[16] Γ(s,z)=zsezz+1s1+1z+2s1+2z+3s1+ andTemplate:Citation needed Γ(s,z)=zsez1+zs+s13+zs+2(s2)5+zs+3(s3)7+zs+4(s4)9+zs+

Multiplication theorem

The following multiplication theorem holds trueTemplate:Citation needed: Γ(s,z)=1tsi=0(11t)ii!Γ(s+i,tz)=Γ(s,tz)(tz)setzi=1(1t1)iiLi1(si)(tz).

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: γ(s,x) = EXP(GAMMALN(s))*GAMMA.DIST(x,s,1,TRUE).
  • The upper incomplete function: Γ(s,x) = 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 Template:Code, however, it does not support negative values for the first argument. The function Template:Code from the mpmath library supports all complex arguments.

Regularized gamma functions and Poisson random variables

Two related functions are the regularized gamma functions: P(s,x)=γ(s,x)Γ(s),Q(s,x)=Γ(s,x)Γ(s)=1P(s,x). P(s,x) is the cumulative distribution function for gamma random variables with shape parameter s and scale parameter 1.

When s is an integer, Q(s+1,λ) is the cumulative distribution function for Poisson random variables: If X is a Poi(λ) random variable then Pr(Xs)=iseλλii!=Γ(s+1,λ)Γ(s+1)=Q(s+1,λ).

This formula can be derived by repeated integration by parts.

In the context of the stable count distribution, the s parameter can be regarded as inverse of Lévy's stability parameter α: Q(s,x)=0e(xs/ν)𝔑1/s(ν)dν,(s>1) where 𝔑α(ν) is a standard stable count distribution of shape α=1/s<1.

P(s,x) and Q(s,x) are implemented as gammainc[17] and gammaincc[18] in scipy.

Derivatives

Using the integral representation above, the derivative of the upper incomplete gamma function Γ(s,x) with respect to Template:Mvar is Γ(s,x)x=xs1ex The derivative with respect to its first argument s is given by[19] Γ(s,x)s=lnxΓ(s,x)+xT(3,s,x) and the second derivative by 2Γ(s,x)s2=ln2xΓ(s,x)+2x[lnxT(3,s,x)+T(4,s,x)] where the function T(m,s,x) is a special case of the Meijer G-function T(m,s,x)=Gm1,mm,0(0,0,,0s1,1,,1|x). This particular special case has internal closure properties of its own because it can be used to express all successive derivatives. In general, mΓ(s,x)sm=lnmxΓ(s,x)+mxn=0m1Pnm1lnmn1xT(3+n,s,x) where Pjn is the permutation defined by the Pochhammer symbol: Pjn=(nj)j!=n!(nj)!. All such derivatives can be generated in succession from: T(m,s,x)s=lnxT(m,s,x)+(m1)T(m+1,s,x) and T(m,s,x)x=T(m1,s,x)+T(m,s,x)x This function T(m,s,x) can be computed from its series representation valid for |z|<1, T(m,s,z)=(1)m1(m2)!dm2dtm2[Γ(st)zt1]|t=0+n=0(1)nzs1+nn!(sn)m1 with the understanding that Template:Mvar is not a negative integer or zero. In such a case, one must use a limit. Results for |z|1 can be obtained by analytic continuation. Some special cases of this function can be simplified. For example, T(2,s,x)=Γ(s,x)/x, xT(3,1,x)=E1(x), where E1(x) is the Exponential integral. These derivatives and the function T(m,s,x) provide exact solutions to a number of integrals by repeated differentiation of the integral definition of the upper incomplete gamma function.[20][21] For example, xts1lnmtetdt=msmxts1etdt=msmΓ(s,x) This formula can be further inflated or generalized to a huge class of Laplace transforms and Mellin transforms. When combined with a computer algebra system, the exploitation of special functions provides a powerful method for solving definite integrals, in particular those encountered by practical engineering applications (see Symbolic integration for more details).

Indefinite and definite integrals

The following indefinite integrals are readily obtained using integration by parts (with the constant of integration omitted in both cases): xb1γ(s,x)dx=1b(xbγ(s,x)γ(s+b,x)),xb1Γ(s,x)dx=1b(xbΓ(s,x)Γ(s+b,x)). The lower and the upper incomplete gamma function are connected via the Fourier transform: γ(s2,z2π)(z2π)s2e2πikzdz=Γ(1s2,k2π)(k2π)1s2. This follows, for example, by suitable specialization of Template:Harv.

Notes

  1. 1.0 1.1 1.2 1.3 1.4 1.5 Template:Cite web
  2. 2.0 2.1 2.2 Template:Cite web
  3. 3.0 3.1 Template:Cite web
  4. 4.0 4.1 Template:Cite web
  5. Template:Cite web
  6. Template:Cite web
  7. Template:Cite web
  8. Template:Cite web
  9. see last eq.
  10. Template:Cite web
  11. Template:Cite web
  12. Template:Mathworld (equation 2)
  13. 13.0 13.1 Template:Cite book
  14. Template:Cite web
  15. Template:Cite web
  16. Abramowitz and Stegun p. 263, 6.5.31
  17. Template:Cite web
  18. Template:Cite web
  19. K.O. Geddes, M.L. Glasser, R.A. Moore and T.C. Scott, Evaluation of Classes of Definite Integrals Involving Elementary Functions via Differentiation of Special Functions, AAECC (Applicable Algebra in Engineering, Communication and Computing), vol. 1, (1990), pp. 149–165, [1]
  20. Template:Cite journal
  21. Template:Cite arXiv, App B

References

Template:Refbegin

Template:Refend