The (complete) gamma function is defined to be an extension of the factorial to complex and real number arguments. It is related to the factorial by
a slightly unfortunate notation due to Legendre which is now universally used instead of Gauss's simpler (Gauss 1812; Edwards 2001, p. 8).
It is analytic everywhere except at , , , ..., and the residue at is
There are no points at which .
The gamma function is implemented in the WolframLanguage as Gamma[z].
There are a number of notational conventions in common use for indication of a power of a gamma functions. While authors such as Watson (1939) use (i.e., using a trigonometric function-like convention), it is also common to write .
The gamma function can be defined as a definite integral for (Euler's integral form)
The complete gamma function can be generalized to the upper incomplete gamma function and lower incomplete gamma function .
Plots of the real and imaginary parts of in the complex plane are illustrated above.
Integrating equation (3)by parts for a real argument, it can be seen that
If is an integer , 2, 3, ..., then
so the gamma function reduces to the factorial fora positive integer argument.
A beautiful relationship between and the Riemann zeta function is given by
for (Havil 2003, p. 60).
The gamma function can also be defined by an infiniteproduct form (Weierstrass form)
where is the Euler-Mascheroni constant (Krantz 1999, p. 157; Havil 2003, p. 57). Taking the logarithm of both sides of (◇),
where is the digamma function and is the polygamma function. th derivatives are given in terms of the polygamma functions , , ..., .
The minimum value of for real positive is achieved when
This can be solved numerically to give (OEIS A030169; Wrench 1968), which has continued fraction [1, 2, 6, 63, 135, 1, 1, 1, 1, 4, 1, 38, ...] (OEIS A030170). At , achieves the value 0.8856031944... (OEIS A030171), which has continued fraction [0, 1, 7, 1, 2, 1, 6, 1, 1, ...] (OEIS A030172).
The Euler limit form is
(Krantz 1999, p. 156).
One over the gamma function is an entire function and can be expressed as
where is the Euler-Mascheroni constant and is the Riemann zeta function (Wrench 1968). An asymptotic series for is given by
(Bourguet 1883, Davis 1933, Isaacson and Salzer 1943, Wrench 1968). Wrench (1968) numerically computed the coefficients for the series expansion about 0 of
The Lanczos approximation gives a series expansion for for in terms of an arbitrary constant such that .
The gamma function satisfies the functional equations
Additional identities are
Using (41), the gamma function of a rational number can be reduced to a constant times or . For example,
Gamma functions of argument can be expressed using the Legendre duplication formula
Gamma functions of argument can be expressed using a triplication formula
The general result is the Gauss multiplicationformula
The gamma function is also related to the Riemann zeta function by
For integer , 2, ..., the first few values of are 1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880, ... (OEIS A000142). For half-integer arguments, has the special form
where is a double factorial. The first few values for , 3, 5, ... are therefore
, , ... (OEIS A001147 and A000079; Wells 1986, p. 40). In general, for a positive integer , 2, ...
Simple closed-form expressions of this type do not appear to exist for for a positive integer . However, Borwein and Zucker (1992) give a variety of identities relating gamma functions to square roots and elliptic integral singular values , i.e., elliptic moduli such that
where is a complete elliptic integral of the first kind and is the complementary integral. M. Trott (pers. comm.) has developed an algorithm for automatically generating hundreds of such identities.
Several of these are also given in Campbell (1966, p. 31).
A few curious identities include
of which Magnus and Oberhettinger (1949, p. 1) give only the last case and
(Magnus and Oberhettinger 1949, p. 1). Ramanujan also gave a number of fascinating identities:
Ramanujan gave the infinite sums
(Hardy 1923; Hardy 1924; Whipple 1926; Watson 1931; Bailey 1935; Hardy 1999, p. 7).
The following asymptotic series is occasionally useful in probability theory (e.g., the one-dimensional random walk):
(OEIS A143503 and A061549; Graham et al. 1994). This series also gives a nice asymptotic generalization of Stirling numbers of the first kind to fractional values.
It has long been known that is transcendental (Davis 1959), as is (Le Lionnais 1983; Borwein and Bailey 2003, p. 138), and Chudnovsky has apparently recently proved that is itself transcendental (Borwein and Bailey 2003, p. 138).
There exist efficient iterative algorithms for for all integers (Borwein and Bailey 2003, p. 137). For example, a quadratically converging iteration for (OEIS A068466) is given by defining
setting and , and then
(Borwein and Bailey 2003, pp. 137-138).
No such iteration is known for (Borwein and Borwein 1987; Borwein and Zucker 1992; Borwein and Bailey 2003, p. 138).