Special Functions

gamma function

/ GAM-uh; the symbol is the capital Greek letter Gamma /

The factorial 5! = 5 times 4 times 3 times 2 times 1 only makes sense for whole numbers. The gamma function is the answer to a natural question: is there a smooth curve that passes exactly through the factorials, so that we can ask for (1/2)! or even (i)! ? The gamma function, written Gamma(x), is that curve — it extends the factorial to real and complex arguments, slotting a continuous, infinitely smooth function through all the integer factorial points.

The standard definition is an integral: Gamma(x) = integral from 0 to infinity of t^{x-1} e^{-t} dt, valid when the real part of x is positive. A single integration by parts gives the central recurrence Gamma(x+1) = x times Gamma(x), the exact analogue of n! = n times (n-1)!. Because Gamma(1) = 1, this forces Gamma(n+1) = n! for whole numbers n, so the function really does interpolate the factorials. The famous special value Gamma(1/2) = square root of pi (it is a disguised Gaussian integral) lets it reach the half-integers. Using the recurrence backwards, Gamma is continued to all complex numbers except the points 0, -1, -2, ..., where it has simple poles.

Gamma is the single most pervasive special function in applied mathematics. It is the normalising constant of the Gamma and Beta probability distributions, sets the volume of an n-dimensional ball, appears in every fractional-calculus formula, and is the backbone for defining the Beta function, the error function relatives, and the Bessel and hypergeometric functions. A common misconception: Gamma(n) equals n!, but in fact Gamma(n) = (n-1)! — the argument is shifted by one, a shift that has tripped up generations of students.

Gamma(5) = integral from 0 to infinity of t^4 e^{-t} dt = 4! = 24, while Gamma(1/2) = square root of pi approximately 1.772. Then Gamma(3/2) = (1/2) times Gamma(1/2) = (square root of pi)/2.

The recurrence Gamma(x+1) = x Gamma(x) lets one value (here Gamma(1/2)) generate a whole ladder of half-integer values.

Watch the off-by-one: Gamma(n) = (n-1)!, not n!. The clean factorial identity is Gamma(n+1) = n!.

Also called
Euler gamma functionfactorial function extended伽玛函数Γ函数