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
(1)
|
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
(2)
|
There are no points at which .
The gamma function is implemented in the Wolfram Language 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)
(3)
| |||
(4)
|
or
(5)
|
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
(6)
| |||
(7)
| |||
(8)
| |||
(9)
|
If is an integer , 2, 3, ..., then
(10)
| |||
(11)
| |||
(12)
| |||
(13)
|
so the gamma function reduces to the factorial for a positive integer argument.
A beautiful relationship between and the Riemann zeta function is given by
(14)
|
for (Havil 2003, p. 60).
The gamma function can also be defined by an infinite product form (Weierstrass form)
(15)
|
where is the Euler-Mascheroni constant (Krantz 1999, p. 157; Havil 2003, p. 57). Taking the logarithm of both sides of (◇),
(16)
|
Differentiating,
(17)
| |||
(18)
|
(19)
| |||
(20)
| |||
(21)
| |||
(22)
| |||
(23)
| |||
(24)
| |||
(25)
| |||
(26)
|
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
(27)
|
(28)
|
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
(29)
|
so
(30)
| |||
(31)
| |||
(32)
| |||
(33)
|
(Krantz 1999, p. 156).
One over the gamma function is an entire function and can be expressed as
(34)
|
where is the Euler-Mascheroni constant and is the Riemann zeta function (Wrench 1968). An asymptotic series for is given by
(35)
|
Writing
(36)
|
the satisfy
(37)
|
(Bourguet 1883, Davis 1933, Isaacson and Salzer 1943, Wrench 1968). Wrench (1968) numerically computed the coefficients for the series expansion about 0 of
(38)
|
The Lanczos approximation gives a series expansion for for in terms of an arbitrary constant such that .
The gamma function satisfies the functional equations
(39)
| |||
(40)
|
Additional identities are
(41)
| |||
(42)
| |||
(43)
| |||
(44)
|
Using (41), the gamma function of a rational number can be reduced to a constant times or . For example,
(45)
| |||
(46)
| |||
(47)
| |||
(48)
|
For ,
(49)
|
Gamma functions of argument can be expressed using the Legendre duplication formula
(50)
|
Gamma functions of argument can be expressed using a triplication formula
(51)
|
The general result is the Gauss multiplication formula
(52)
|
The gamma function is also related to the Riemann zeta function by
(53)
|
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
(54)
|
where is a double factorial. The first few values for , 3, 5, ... are therefore
(55)
| |||
(56)
| |||
(57)
|
, , ... (OEIS A001147 and A000079; Wells 1986, p. 40). In general, for a positive integer , 2, ...
(58)
| |||
(59)
| |||
(60)
| |||
(61)
|
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
(62)
|
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.
(63)
| |||
(64)
| |||
(65)
| |||
(66)
| |||
(67)
| |||
(68)
| |||
(69)
| |||
(70)
| |||
(71)
| |||
(72)
| |||
(73)
| |||
(74)
| |||
(75)
| |||
(76)
| |||
(77)
| |||
(78)
| |||
(79)
| |||
(80)
| |||
(81)
| |||
(82)
| |||
(83)
|
Several of these are also given in Campbell (1966, p. 31).
A few curious identities include
(84)
| |||
(85)
| |||
(86)
| |||
(87)
| |||
(88)
| |||
(89)
| |||
(90)
|
of which Magnus and Oberhettinger (1949, p. 1) give only the last case and
(91)
|
(Magnus and Oberhettinger 1949, p. 1). Ramanujan also gave a number of fascinating identities:
(92)
|
(93)
|
where
(94)
|
(95)
|
(Berndt 1994).
Ramanujan gave the infinite sums
(96)
|
and
(97)
|
(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):
(98)
|
(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
(99)
| |||
(100)
|
setting and , and then
(101)
|
(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).