Regularized Gamma function

In mathematics, the gamma function is defined by a definite integral. The incomplete gamma function is defined as an integral function of the same integrand. There are two varieties of the incomplete gamma function: the upper incomplete gamma function is for the case that the lower limit of integration is variable (ie where the "upper" limit is fixed), and the lower incomplete gamma function can vary the upper limit of integration.

The upper incomplete gamma function is defined as:
 * $$ \Gamma(a,x) = \int_x^{\infty} t^{a-1}\,e^{-t}\,dt .\,\!$$

The lower incomplete gamma function is defined as:
 * $$ \gamma(a,x) = \int_0^x t^{a-1}\,e^{-t}\,dt .\,\!$$

Properties
In both cases a is a complex parameter, such that the real part of a is positive.

By integration by parts we can find that


 * $$ \Gamma(a+1,x) = a\Gamma(a,x) + x^a e^{-x}\,$$
 * $$ \gamma(a+1,x) = a\gamma(a,x) - x^a e^{-x}.\,$$

Since the ordinary gamma function is defined as


 * $$ \Gamma(a) = \int_0^{\infty} t^{a-1}\,e^{-t}\,dt \,\!$$

we have


 * $$ \gamma(a,x) + \Gamma(a,x) = \Gamma(a).\, $$

Furthermore,


 * $$\Gamma(a,x)=(a-1)!e^{-x}\sum_{k=0}^{a-1}\frac{x^k}{k!}$$ if a is an integer.
 * $$ \Gamma(a,0) = \Gamma(a)\, $$
 * $$ \Gamma(a) = (a-1)!\, $$ if a is an integer.

and


 * $$ \gamma(a,x) \rightarrow \Gamma(a)

\quad \mathrm{as\ } x \rightarrow \infty. \,$$

Also


 * $$\Gamma(0,x) = -\mbox{Ei}(-x)\mbox{ for }x>0 \,$$
 * $$\Gamma\left({1 \over 2}, x\right) = \sqrt\pi\,\mbox{erfc}\left(\sqrt x\right) \,$$
 * $$\gamma\left({1 \over 2}, x\right) = \sqrt\pi\,\mbox{erf}\left(\sqrt x\right) \,$$
 * $$\Gamma(1,x) = e^{-x} \,$$
 * $$\gamma(1,x) = 1 - e^{-x} \,$$

where Ei is the exponential integral, erf is the error function, and erfc is the complementary error function, erfc(x) = 1 &minus; erf(x).

Regularized Gamma functions
Two related functions are the regularized Gamma functions:


 * $$P(a,x)=\frac{\gamma(a,x)}{\Gamma(a)}$$


 * $$Q(a,x)=\frac{\Gamma(a,x)}{\Gamma(a)}=1-P(a,x).$$

Connection with Kummer's confluent hypergeometric function
It is easily shown that, when the real part of z is positive,



\gamma(a,z) = \int_0^z e^{-t}t^{a-1} dt = a^{-1} z^a e^{-z} M(1,a+1,z), $$

where M(1, a+1, z) is Kummer's confluent hypergeometric function. Since the series



M(1, a+1, z) = 1 + \frac{1}{(a+1)}z + \frac{1}{(a+1)(a+2)}z^2 + \frac{1}{(a+1)(a+2)(a+3)}z^3 + \cdots $$

has an infinite radius of convergence, we may take



\gamma(a,z) = a^{-1} z^a e^{-z} M(1,a+1,z)\, $$

as the definition of &gamma;(a, z) for all complex z. In this light, the lower incomplete gamma function &gamma;(a, z) is an entire function of the complex variable z. Since the gamma function &Gamma;(z) is a meromorphic function with simple poles at {0, &minus;1, &minus;2, &hellip;}, we may define the meromorphic upper incomplete gamma function as



\Gamma(a, z) = \Gamma(a) - \gamma(a, z). \, $$

For the actual computation of numerical values, the continued fraction of Gauss provides a useful expansion:



\frac{a e^z}{z^a} \gamma(a, z) = \cfrac{1}{1 - \cfrac{z}{a+1 + \cfrac{z}{a+2 - \cfrac{(a+1)z} {a+3 + \cfrac{2z}{a+4 - \cfrac{(a+2)z}{a+5 + \cfrac{3z}{a+6 - \ddots}}}}}}}. $$

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

Miscellaneous utilities

 * $$P(a,x)$$ - Incomplete Gamma Function Calculator
 * $$Q(a,x)$$ - Incomplete Gamma Function Calculator - Complemented
 * $$\gamma(a,x)$$ - Incomplete Gamma Function Calculator - Lower Limit of Integration
 * $$\Gamma(a,x)$$ - Incomplete Gamma Function Calculator - Upper Limit of Integration

Función gamma incompleta fa:تابع گاما‫ی ناکامل 不完全ガンマ関数