User:Fredrik/Gamma
From Wikipedia, the free encyclopedia
In mathematics, the gamma function or Gamma function, denoted in formulas by the Greek capital letter Γ (Gamma), is a function that generalizes the concept of a factorial. The factorial of a positive integer n, written n!, is the product n! = 1 · 2 · 3 ... · n. The gamma function is related to the factorial as
but unlike the ordinary factorial also has a meaningful definition for numbers that are fractional or complex. The gamma function does not have a simple formula, however; it is non-elementary, or impossible to express as a finite combination of arithmetic operations, exponential functions, and logarithms.
The gamma function is a common special function used in both pure and applied mathematics, appearing in expressions for a large number of integrals, series, products, and other special functions.[1] Discovered by Leonhard Euler in 1729 and sometimes known as Euler's gamma function, it was studied by many prominent mathematicians of the 18th and 19th centuries, including Adrien-Marie Legendre, Carl Friedrich Gauss, Christoph Gudermann, Joseph Liouville, Karl Weierstrass and Charles Hermite.[2]
[edit] Background
The problem of extending the factorial to non-integer arguments was apparently first proposed by Daniel Bernoulli and Christian Goldbach in the 1720s.[3] Leonhard Euler found a solution in 1729, in the form of the limiting product
of which he informed Goldbach in a letter dated October 13, 1729.[4] The following year, on January 8, he again wrote to Goldbach to announce the discovery that, for n ≥ 0, the same function can be expressed with the integral[5]
The correctness of Euler's first solution can be shown by evaluating the limit explicitly. The second equation can be proved inductively: a function f satisfies f(n) = n! for all positive integers n if f(1) = 1! and f(n) = n · f(n-1). This recursive property is known as the functional equation of the factorial, or Euler's functional equation.[6][7] Euler's integral can be shown to satisfy the functional equation using integration by parts.
The problem of finding a continuous expression for the factorial was also studied by James Stirling, who in his 1730 work Methodus Differentialis published the famous Stirling's formula
Although Stirling's formula gives a good estimate of n!, also for non-integers, it does not provide the exact value. Stirling made several attempts to refine his approximation, and eventually found a solution, although he never managed to prove that the extended version of his formula indeed corresponds exactly to the factorial. A proof was first given by Charles Hermite in 1900.[8]
Despite their different approaches, Euler's and Stirling's results in fact describe the same extension of the factorial. In a definite sense, this function is the only such extension: the Bohr-Mollerup theorem, proved in 1922, states that any function which corresponds to the factorial at the integers, satisfies the functional equation of the factorial, and is logarithmically convex, must be the same as Euler's function, now known as the gamma function.
It is perhaps surprising that the product 1 · 2 · ... · n cannot be written as a simple closed-form expression in n. By contrast, the sum 1 + 2 + ... + n is simply a triangular number, given in closed form by n(n+1)/2 which readily generalizes to non-integer n.[9] Hölder's theorem, first proved by Otto Hölder in 1887, states that the extended factorial is in fact transcendental, in the sense that it does not satisfy any algebraic differential equation whose coefficients are rational functions.[10]
[edit] Definition and notation
The gamma function is usually defined as the Euler integral of the second kind
which, up to a change of variables, is equivalent to the integral Euler described to Goldbach. The integral is only valid for arguments with a positive real part, but permits an analytic continuation to the left-half complex plane. It is this analytic continuation that is commonly referred to as the gamma function.
The notation n! is nowadays usually reserved for integer factorials, although some authors use z! for real or complex arguments as well.
The symbol Γ was introduced by Adrien-Marie Legendre in 1809.[11] It has been suggested that he chose Γ because it resembles an upside-down L, the first letter in his own surname.[12] Legendre also introduced the convention to normalize the argument with respect to the factorial such that
Opinions of this normalization have included "slightly unfortunate" and "void of any rationality", but the convention is nevertheless ubiquitous today.[13] [14] An alternative notation but less common notation is
- Π(n) = n! = Γ(n + 1),
used by Carl Friedrich Gauss.
[edit] Fundamental properties
The gamma function is a meromorphic function with simple poles at z = −n for n = 0, 1, 2, 3, ... and residues
It has no zeros, and hence the reciprocal gamma function 1/Γ(z) is an entire function. The gamma function's graph along the positive part of the real line is convex, with a local minimum xm ≈ 1.46163 for which Γ(xm) ≈ 0.885603. The function alternates sign between the poles along the negative part of the real line.
Interval | Sign | Local extreme xm | Γ(xm) |
---|---|---|---|
(0, ∞) | + | 1.4616321449683623413 | 0.88560319441088870028 |
(-1, 0) | - | -0.50408300826445540926 | -3.5446436111550050891 |
(-2, -1) | + | -1.5734984731623904588 | 2.3024072583396801358 |
(-3, -2) | - | -2.6107208684441446500 | -0.88813635840124192010 |
(-4, -3) | + | -3.6352933664369010979 | 0.24512753983436625044 |
With Legendre's notation, the statement of Euler's functional relation becomes
which can also be written more generally as
The gamma function satisfies several other functional equations. These include the reflection formula or complement formula (also found by Euler)
which describes the gamma function's behavior for negative numbers, and Legendre's duplication formula
The duplication formula is a special case of Gauss's multiplication formula
Inserting z = 1/2 into the reflection formula, or recognizing that the Euler integral with z = 1/2 reduces to the Gaussian integral, reveals the remarkable fact that
Hence, by Euler's functional equation, the gamma function or factorial of any half-integer is a rational multiple of √π. Generally,
where n!! denotes the double factorial.
For imaginary numbers yi, the absolute value is given by
In general,
The complex conjugate satisfies
[edit] Alternative representations
Euler's product definition is
In addition, the gamma function is given by the Weierstrass product
where γ ≈ 0.577215665 is Euler's constant. This product is taken over the gamma function's poles, or equivalently, the zeros of its reciprocal. Another product is
Two alternative integral representations are Cauchy–Saalschütz's integral
and the Hankel contours
where C is a path encircling 0 in the positive direction, beginning at and returning to positive infinity, avoiding the branch cut of the natural logarithm on the real axis.
[edit] Relation to the zeta function
The gamma function can be expanded in several different ways as series and products involving the Riemann zeta function ζ and Euler's constant. Due to these relations, the gamma function is important in analytic number theory. The link between γ the constant and Γ the function has been suggested to parallel that between π and the trigonometric functions.[15]
The Weierstrass product is equivalent to the series representation
or logarithmically,
The reciprocal gamma function has a Maclaurin series
where the coefficient ak corresponding to the zk-term is given by
for k > 2. Two noteworthy relations between the gamma function and the zeta function are the integral (for (Re(z) > 1)
and the zeta function's reflection formula
It has been said that this last formula, which among other things relates the the Riemann's zeta function's "trivial" zeros at ζ(−2n) to the poles of the gamma function, "must represent one of the most beautiful findings in mathematics".[16]
[edit] Asymptotic expansions and numerical approximations
None of the series and product representations of the gamma function given above are effective for numerical calculation, but many good methods exist. The most famous is Stirling's formula
where R is a function that grows like O(1+1/z). If R is taken to be 1, the relative error of this estimate vanishes as z approaches infinity, although the absolute error is unbounded. A popular way to calculate the gamma function is to evaluate Stirling's formula along with a more accurate approximation of R; the function R is sometimes called Binet's function after Jacques Philippe Marie Binet who derived formulas for this purpose. Approximation of Binet's function by a series results in an asymptotic expansion involving Bernoulli numbers.
Two relatively modern inventions are the Lanczos approximation, found by Cornelius Lanczos in 1964, and Spouge's approximation derived by John L. Spouge in 1994. Both have the form
where a is an arbitrary positive constant that controls the relative error ε and Aa is a rapidly convergent series in z whose coefficients depend on a. With pre-calculated coefficients, Lanczos's method yields a compact approximation of the gamma function for fixed accuracy levels; however, the error term is difficult to estimate for arbitrary-precision purposes and the coefficients are expensive to calculate. Spouge's formula exhibits slower convergence, but its coefficients have a simple expression and the accuracy can be set arbitrarily high.
There are also more elementary methods. The simplest way to approximate the gamma function by a convergent series is perhaps to choose a finite upper limit for Euler's integral and expand the lower integral as a series:
If the real part of z lies in the interval [1, 2], the error introduced by omitting the right-hand integral and truncating the series at k = 6N is at most 2Ne-N. This allows the gamma function to be calculated to n-digit precision with time complexity O(n1/2 (log n)2 M(n)) where M(n) is the complexity of n-digit multiplication. If the argument is a small rational number, binary splitting brings the complexity down to O((log n)2 M(n)).[17] [18]
[edit] Rational arguments
Except when p/q is an integer or a half-integer, it is not known whether Γ(p/q) can be expressed in closed form in terms of elementary functions. It is sufficient to consider fractions in the unit interval, since the gamma function of an arbitrary rational number n + p/q relates algebraically to the gamma function of the corresponding fractional part p/q as
The value Γ(x) is known to be transcendental for x = 1/6, 1/4, 1/3, 2/3, 3/4 and 5/6, and for each of these arguments, Γ(x) is algebraically independent from π. Γ(1/4) π-1/4 is also transcendental, and it is known that Γ(1/4) is algebraically independent from Gelfond's constant eπ, as is Γ(1/3) from eπ√3. [19] [20] [21] Nevertheless, the product of the gamma function over the entire range 1/n, 2/n, 3/n, ..., 1 turns out to have a simple expression in terms of π:
Further, Γ(p/q)q is a period. The Chowla-Selberg formula gives an application for the gamma function at rational points, as it states that singular values of elliptic integrals can be evaluated analytically in terms of such values. The connection with elliptic integrals also relates these values to the arithmetic-geometric mean (AGM). The evaluation of Gauss's constant
in terms of Γ(1/4) provides a specific example. Arithmetic-geometric mean iterations such as the Brent-Salamin algorithm for quick calculation of π with extremely high precision may in fact be viewed as algorithms for Γ(1/2), and similar iterations can be constructed for all numbers of the form Γ(k/24) where k is an integer. [22]
x | Γ(x) (exact value) | Γ(x) (numerical value) |
---|---|---|
3/2 | 0.8862269254527580137 | |
5/2 | 1.3293403881791370205 | |
−1/2 | −3.5449077018110320546 | |
−3/2 | 2.3632718012073547031 |
[edit] Derivatives and differential equations
The logarithmic derivatives of the gamma function are given by the polygamma functions ψ(m) according to the formula
In particular, the first derivative of the gamma function is given in terms of the 0-th order polygamma function (also called the digamma function) as
and the derivative at an integer is
where denotes a Stirling number of the first kind.
[edit] Related functions
The gamma function belongs to a category of related special functions given by non-elementary integrals. Two useful generalizations in this context are the incomplete gamma functions
and
The error function, the Fresnel integrals, Gaussian integrals, the Dawson integral and the Laplace transform of a power function can all be expressed in terms of the gamma function or an incomplete gamma function. The gamma function is also used to define the beta function
Particular values of hypergeometric functions can sometimes be evaluated in terms of the gamma function. In particular, Gauss's theorem states that the classical hypergeometric function 2F1 satisfies
Hypergeometric functions are useful as "general" functions that reduce to other common functions for particular inputs. Functions devised to be even more general, such as the Meijer G-function and the Fox H-function, are constructed from complex integrals of gamma functions.
There are many other generalizations of the gamma function, including a multivariate gamma function and a q-series analog, the elliptic gamma function. The analog of the gamma function over a finite field or a finite ring are the Gaussian sums, a type of exponential sum. Two other analogs of the gamma function are the Barnes G-function, which extends superfactorials to the complex numbers, and the K-function which does the same for hyperfactorials. The Glaisher-Kinkelin constant sometimes appears in formulas related to these functions and the gamma function.
[edit] Other applications
Many common expressions defined in terms of factorials can be extended to non-integers by use of the gamma function. Examples include binomial coefficients and the Pochhammer symbol. In general, products involving arithmetic progressions can be rewritten as quotients of gamma functions. The gamma function is also used to define derivatives of fractional order, based on the appearance of a factorial in the expression for an integer-order derivative of a monomial. A geometrical application of the gamma function is the formula for the surface area of an (n-1)-hypersphere with radius R,
The gamma function is also used in statistics to express the gamma distribution, the inverse-gamma distribution, and the beta distribution.
[edit] Calculation
Double-precision implementations of the gamma function or its logarithm are included with most scientific computing software and special functions libraries, for example Matlab, GNU Octave, and the GNU Scientific Library. The gamma function was also added to the C mathematics library (math.h) as part of the C99 standard, but not all C compilers implement it. Arbitrary-precision implementations are available in most computer algebra systems, such as Mathematica and Maple. MPFR provides a free arbitrary-precision implementation. The gamma function is not widely supported by pocket calculators, but often Stirling's formula is adequate for such use.
Due to Euler's functional relation, the gamma function can be approximated efficiently anywhere on the real line if its value is known on an interval of unit length such as [1, 2]. The Matlab gamma function implementation, for example, reduces arguments to this range and then employs a pre-computed rational approximation.[23] A tedious argument reduction can be avoided for extremely large arguments, since Stirling's extended formula quickly becomes accurate and can be used instead. The Lanczos approximation is an alternative to these methods for calculating the gamma function with fixed precision; it is compact, and unlike most approximation methods achieves uniform accuracy everywhere in the complex plane without additional adjustments.
Stirling's extended formula can be used to evaluate the gamma function with arbitrary precision, by choosing an evaluation point sufficiently distant from the origin. This method is used by several computer algebra systems. Numerical integration, approximation by an incomplete gamma function, and Spouge's approximation have also been employed for high-precision calculations. For asymptotic performance, the series expansion of the lower incomplete gamma function allows the gamma function to be calculated to n-digit precision with time complexity O(n1/2 (log n)2 M(n)) where M(n) is the complexity of n-digit multiplication. If the argument is a small rational number, binary splitting brings the complexity down to O((log n)2 M(n)).[24] [25] For arguments that are fractions of the form k/24, arithmetic-geometric mean algorithms provide complexity O((log n) M(n)).[26]
[edit] References
- Notes
- ^ Kuptsov
- ^ Gourdon & Sebah
- ^ Andrews et al., page 2
- ^ Knuth, page 49
- ^ Gourdon & Sebah
- ^ Gourdon & Sebah
- ^ Kuptsov
- ^ Knuth, page 47
- ^ Knuth, page 48
- ^ Bank & Kaufman
- ^ Gourdon & Sebah
- ^ Miller et al.
- ^ Weisstein, Gamma function
- ^ Lanczos
- ^ Gourdon & Sebah
- ^ Borwein, Bailey & Girgensohn, page 133
- ^ Borwein & Borwein, page 332
- ^ Haible & Papanikolaou
- ^ Gourdon & Sebah
- ^ Weisstein, Transcendental Number
- ^ Finch
- ^ Borwein & Bailey, page 137
- ^ Moler
- ^ Borwein & Borwein, page 332
- ^ Haible & Papanikolaou
- ^ Borwein & Borwein, page 297
- Works cited
- G. E. Andrews, R. Askey & R. Roy. Special Functions. Cambridge University Press, 2001. ISBN 0521789885.
- S. B. Bank & R. P. Kaufman. "A Note on Hölder's Theorem Concerning the Gamma Function". Mathematische Annalen, vol 232, 1978.
- J. Borwein & D. Bailey. Mathematics by Experiment - Plausible Reasoning in the 21st Century. A K Peters, 2003. ISBN 1-56881-211-6.
- J. Borwein, D. Bailey & R. Girgensohn. Experimentation in Mathematics - Computational Paths to Discovery. A K Peters, 2003. ISBN 1-56881-136-5.
- J. Borwein & P. Borwein. Pi and the AGM: A Study in Analytic Number Theory and Computational Complexity. John Wiley 1987.
- S. Finch. "Euler Gamma Function Constants". Mathsoft Constants. Retrieved August 3, 2006.
- X. Gourdon & P. Sebah. Introduction to the Gamma Function. Updated 2002, retrieved August 2, 2006.
- B. Haible & T. Papanikolaou. Fast multiprecision evaluation of series of rational numbers. Technical Report No. TI-7/97, Darmstadt University of Technology, 1997
- D. E. Knuth. The Art of Computer Programming, volume 1 (Fundamental Algorithms). Addison-Wesley, third edition, 1997.
- L. P. Kutsov. "Gamma-function". Encyclopaedia of Mathematics. Springer Online Reference Works. Retrieved August 2, 2006.
- C. Lanczos. A precision approximation of the gamma function. J. SIAM Numer. Anal. Ser. B, Vol. 1. 1964.
- J. Miller et al. Earliest Uses of Function Symbols. Retrieved August 9, 2006.
- C. Moler. "The Tetragamma Function and Numerical Craftsmanship", The MathWorks News & Notes - Cleve's Corner, 2002. Retrieved September 1, 2006.
- E. W. Weisstein. "Gamma Function". MathWorld. Retrieved September 14, 2006.
- E. W. Weisstein. "Transcendental Number". MathWorld. Retrieved August 3, 2006.