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

\Gamma(n+1)=n!,\,

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]

Contents

[edit] Background

A plot of n against the factorial n! for a few small integers suggests that it ought to be possible to draw a smooth curve that interpolates the factorial to non-integer values. The surprisingly difficult problem of finding a formula that exactly describes the curve challenged some of the leading mathematicians of the 18th century.
A plot of n against the factorial n! for a few small integers suggests that it ought to be possible to draw a smooth curve that interpolates the factorial to non-integer values. The surprisingly difficult problem of finding a formula that exactly describes the curve challenged some of the leading mathematicians of the 18th century.

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

n! = \lim_{m\to\infty} \frac{m^n \, m!}{(n+1)(n+2)\ldots(n+m)}

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]

n! = \int_0^1(-\log t)^n\,dt.\,\,

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

n! \approx \sqrt{2 \pi n} \left(\frac{n}{e}\right)^n.

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

\Gamma(z)=\int_0^\infty t^{z-1}e^{-t}dt,

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

\Gamma(n+1) = n!\;

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 along part of the real axis
The gamma function along part of the real axis

The gamma function is a meromorphic function with simple poles at z = −n for n = 0, 1, 2, 3, ... and residues

\operatorname{Res}(\Gamma,-n) = \frac{(-1)^n}{n!}.

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.

The gamma function on 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

\Gamma(z+1) = z \, \Gamma(z)

which can also be written more generally as

\Gamma(z+n) = z \,(z+1)\cdots(z+n-1) \;\Gamma(z).

The gamma function satisfies several other functional equations. These include the reflection formula or complement formula (also found by Euler)

\Gamma(1-z) \; \Gamma(z) = {\pi \over \sin \pi z},

which describes the gamma function's behavior for negative numbers, and Legendre's duplication formula

\Gamma(z) \; \Gamma\left(z + \frac{1}{2}\right) = 2^{1-2z} \; \sqrt{\pi} \; \Gamma(2z).

The duplication formula is a special case of Gauss's multiplication formula

\prod_{k=0}^{m-1} \Gamma\left(z+\frac{k}{m}\right) = (2 \pi)^{(m-1)/2} \; m^{1/2 - mz} \; \Gamma(mz).

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

\Gamma\left(\frac{1}{2}\right) = \sqrt \pi.

Hence, by Euler's functional equation, the gamma function or factorial of any half-integer is a rational multiple of √π. Generally,

\Gamma\left(n+\frac{1}{2}\right) = \sqrt \pi \, \frac{(2n-1)!!}{2^n},

where n!! denotes the double factorial.

For imaginary numbers yi, the absolute value is given by

\,|\Gamma(yi)|^2 = \frac{\pi}{y \, \sinh(\pi y)}\,
\,|\Gamma(1/2 + yi)|^2 = \pi \, \mathrm{sech} (\pi y)\,
\,|\Gamma(1 + yi)|^2 = \pi y \, \mathrm{csch} (\pi y).

In general,

\left| \frac{\Gamma(x+yi)}{\Gamma(x)} \right|^2 = \prod_{k=0}^\infty \left(\frac{y^2}{(k+x)^2} + 1\right)^{-1}.

The complex conjugate satisfies

\overline{\Gamma(z)} = \Gamma(\overline{z}).

[edit] Alternative representations

1/Γ(x) along part of the real axis
1/Γ(x) along part of the real axis

Euler's product definition is

\Gamma(z) = \lim_{m \to \infty} \frac{m^z \, m!}{z \, (z+1)\cdots(z+m)}.

In addition, the gamma function is given by the Weierstrass product

\frac{1}{\Gamma(z)} = z e^{\gamma z} \prod_{n=1}^\infty \left(1 + \frac{z}{n}\right) e^{-z/n}

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

\Gamma(z) = \frac{1}{z} \prod_{k=1}^\infty \frac{(1+1/k)^z}{(1+z/k)}.

Two alternative integral representations are Cauchy–Saalschütz's integral

\Gamma(z) = \int_0^\infty x^{z-1} \left( e^{-x} - \sum_{m=0}^k (-1)^m \frac{x^m}{m!}\right) dx.

and the Hankel contours

\Gamma(z) = \frac{1}{e^{2\pi i z}-1} \int_C t^{z-1} e^{-t} dt
\frac{1}{\Gamma(z)} = \frac{i}{2\pi} \int_C (-t)^{-z} e^{-t} dt,

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

\Gamma(z) = \frac{1}{z} \exp \left[\gamma z + \sum_{k=2}^\infty \frac{(-1)^k \zeta(k)}{k} z^k \right]

or logarithmically,

\log \left[ \Gamma(z) \right] = -\log z -\gamma z - \sum_{k=1}^\infty \left[ \log \left( 1+\frac{z}{k} \right) - \frac{z}{k}\right].

The reciprocal gamma function has a Maclaurin series

\frac{1}{\Gamma(z)} = z + \gamma z^2 + \left(\begin{matrix}\frac{\gamma^2}{2} - \frac{\pi^2}{12}\end{matrix}\right)z^3 + \ldots

where the coefficient ak corresponding to the zk-term is given by

a_k = k a_1 a_k - a_2 a_{k-1} + \sum_{j=2}^k (-1)^j \, \zeta(j) \, a_{k-j}

for k > 2. Two noteworthy relations between the gamma function and the zeta function are the integral (for (Re(z) > 1)

\zeta(z) \; \Gamma(z) = \int_0^\infty \frac{t^{z-1}}{e^t-1} \; dt

and the zeta function's reflection formula

\Gamma\left(\frac{s}{2}\right)\zeta(s)\pi^{-s/2} = \Gamma\left(\frac{1-s}{2}\right)\zeta(1-s)\pi^{(1-s)/2}.

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

\Gamma(z+1)=\sqrt{2\pi z}\left({z\over e}\right)^z R(z)

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

\Gamma(z+1) = \sqrt{2\pi} {\left(z+a\right)}^{z+1/2} e^{-(z+a)} \left[A_a(z) +  \epsilon_a(z)\right]

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:

\Gamma(z) = N^z e^{-N} \sum_{k=0}^\infty \frac{N^k}{z(z+1) \dots (z+k)} + \int_N^\infty e^{-t} t^{z-1} dt

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

\Gamma \left(n + \frac{p}{q}\right) = q^{-n} \, \Gamma \left(\frac{p}{q} \right) \prod_{k=1}^n (p+kq-q).

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 π:

\prod_{k=1}^{n-1} \Gamma\left(\frac{k}{n}\right) = \frac{(2\pi)^{(n-1)/2}}{\sqrt n}.

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

G = \frac{1}{\mathrm{AGM}\left(1, \sqrt 2\right)} = \frac{1}{(2\pi)^{3/2}} \left[\Gamma\left(\begin{matrix}\frac{1}{4}\end{matrix}\right)\right]^2

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]

Values at small rational arguments
x Γ(x) (exact value) Γ(x) (numerical value)
3/2 \begin{matrix}\frac{1}{2}\end{matrix} \sqrt \pi 0.8862269254527580137
5/2 \begin{matrix}\frac{3}{4}\end{matrix} \sqrt \pi 1.3293403881791370205
−1/2 -2 \sqrt \pi −3.5449077018110320546
−3/2 \begin{matrix}\frac{4}{3}\end{matrix} \sqrt \pi 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

\left(\begin{matrix}\frac{d}{dz}\end{matrix}\right)^{m} \log\left[ \Gamma(z) \right] = \psi^{(m-1)}(z).

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

\Gamma'(z) = \Gamma(z) \, \psi^{(0)}(z)

and the derivative at an integer is

\Gamma'(n+1) = n!\,\left(1 + \frac{1}{2} + \frac{1}{3} + \ldots + \frac{1}{n} - \gamma\right) = \left|S_n^{(2)}\right| - n! \,\gamma

where S_n^{(2)} 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

 \Gamma(a,x) = \int_x^{\infty} t^{a-1}\,e^{-t}\,dt\,\!

and

 \gamma(a,x) = \int_0^x t^{a-1}\,e^{-t}\,dt.\,\!

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

\mathrm{\Beta}(x,y) = \frac{\Gamma(x)\,\Gamma(y)}{\Gamma(x+y)} = \int_0^1t^{x-1}(1-t)^{y-1}\,dt.

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

\;_2F_1 (a,b;c;1)=\frac{\Gamma(c)\Gamma(c-a-b)}{\Gamma(c-a)\Gamma(c-b)}.

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,

S_n=\frac{dV_n}{dR}={2\pi^\frac{n}{2}R^{n-1}\over\Gamma(\frac{n}{2})}.

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
  1. ^ Kuptsov
  2. ^ Gourdon & Sebah
  3. ^ Andrews et al., page 2
  4. ^ Knuth, page 49
  5. ^ Gourdon & Sebah
  6. ^ Gourdon & Sebah
  7. ^ Kuptsov
  8. ^ Knuth, page 47
  9. ^ Knuth, page 48
  10. ^ Bank & Kaufman
  11. ^ Gourdon & Sebah
  12. ^ Miller et al.
  13. ^ Weisstein, Gamma function
  14. ^ Lanczos
  15. ^ Gourdon & Sebah
  16. ^ Borwein, Bailey & Girgensohn, page 133
  17. ^ Borwein & Borwein, page 332
  18. ^ Haible & Papanikolaou
  19. ^ Gourdon & Sebah
  20. ^ Weisstein, Transcendental Number
  21. ^ Finch
  22. ^ Borwein & Bailey, page 137
  23. ^ Moler
  24. ^ Borwein & Borwein, page 332
  25. ^ Haible & Papanikolaou
  26. ^ Borwein & Borwein, page 297
Works cited