Gamma function
In mathematics, the gamma function (represented by Γ, the capital letter gamma from the Greek alphabet) is one commonly used extension of the factorial function to complex numbers. The gamma function is defined for all complex numbers except the non-positive integers. For every positive integer n,
For the gamma function of ordinals, see Veblen function. For the gamma distribution in statistics, see Gamma distribution. For the function used in video and image color representations, see Gamma correction.Gamma
Calculus, mathematical analysis, statistics, physics
Derived by Daniel Bernoulli, for complex numbers with a positive real part, the gamma function is defined via a convergent improper integral:
The gamma function then is defined as the analytic continuation of this integral function to a meromorphic function that is holomorphic in the whole complex plane except zero and the negative integers, where the function has simple poles.
The gamma function has no zeros, so the reciprocal gamma function 1/Γ(z) is an entire function. In fact, the gamma function corresponds to the Mellin transform of the negative exponential function:
Other extensions of the factorial function do exist, but the gamma function is the most popular and useful. It is a component in various probability-distribution functions, and as such it is applicable in the fields of probability and statistics, as well as combinatorics.
Definition[edit]
Main definition[edit]
The notation is due to Legendre.[1] If the real part of the complex number z is strictly positive (), then the integral converges absolutely, and is known as the Euler integral of the second kind. (Euler's integral of the first kind is the beta function.[1]) Using integration by parts, one sees that:
Properties[edit]
General[edit]
Besides the fundamental property discussed above: other important functional equations for the gamma function are Euler's reflection formula which implies and the Legendre duplication formula
Practical implementations[edit]
Unlike many other functions, such as a Normal Distribution, no obvious fast, accurate implementation that is easy to implement for the Gamma Function is easily found. Therefore, it is worth investigating potential solutions. For the case that speed is more important than accuracy, published tables for are easily found in an Internet search, such as the Online Wiley Library. Such tables may be used with linear interpolation. Greater accuracy is obtainable with the use of cubic interpolation at the cost of more computational overhead. Since tables are usually published for argument values between 1 and 2, the property may be used to quickly and easily translate all real values and into the range , such that only tabulated values of between 1 and 2 need be used.[55]
If interpolation tables are not desirable, then the Lanczos approximation mentioned above works well for 1 to 2 digits of accuracy for small, commonly used values of z. If the Lanczos approximation is not sufficiently accurate, the Sterling's formula for the Gamma Function may be used. A more complete and accurate solution to Sterling's Approximation may be found at Math2.org, and is reproduced below in terms of [56] for the first 8 () terms. Based on experimental findings against known values of for 1, 1.5, and 2 (1, , and 1 respectively), this solution is accurate to 9 digits for values of z above 5 and 16 digits for z above 20. Smaller values of z are less accurate, but the simple translation of may be used to easily translate higher, more accurate values to lower values when needed. Less accurate needs may also be accommodated by simply using fewer terms of the infinite series.
Stirling's Asymptotic Series for using the first 8 terms: