Tuesday, January 1, 2013

The Gamma Function

The concept of the "factorial" function in mathematics is well-known. For any positive integer n, n factorial, denoted n!, is the product of n with all smaller positive integers. In equation form,

n! = (n)*(n-1)*(n-2)*...*3*2*1

The first few values are 1! = 1, 2! = 2*1 = 2, 3! = 3*2*1 = 6, 4! = 4*3*2*1 = 24,... In addition, one can easily see that dividing the factorial of a number by the number itself yields the previous factorial, that is, n!/n = (n-1)!. As an example, 4!/4 = 24/4 = 6 = 3!. Extrapolating backward, 1!/1 = 1 would be the value of zero factorial. Thus we consider 0! = 1.

The problem with which we are concerned is how to extend the idea of factorials to values other than the positive integers, a procedure called interpolation. In other words, we seek a function, f(x) that generates the factorials for the positive integers but also is defined on non-integers.

First to be considered are the polynomial and exponential functions, i.e. those of the form xn and ax, respectively, for natural numbers n and general positive numbers a, where x is the variable quantity. Can either of these types, or additions/subtractions thereof, yield a function that matches the factorials? The answer is no, for the following reason: the factorial function grows faster than any polynomial or exponential function. This means that if one increases x high enough, x! (assuming x is an integer) will always exceed a function of the above types. To see this, we shall examine the growth of polynomial and exponential functions in turn.

For any function xn, xn exceeds x! at x = n, as nn is a product of n n's, while n! is a product of n numbers less than or equal to n. However, consider the comparison of values at x = n2:

(n2)n = n2n, while
(n2)! = n2*(n2-1)*...*n*...*2*1.

A close examination of the expansion of the factorial allows one to see that there are n2 - n terms exceeding n (those that occur prior to n), while the polynomial value is a product with 2n terms, all equaling n. So as long as
n2 - n > 2n, the factorial will be greater. This is true for all n > 3. Also, for any xn, the ratio of the value of this function at x = a + 1 to that at a for positive integral a approaches 1 as a increases, as this ratio is Since (a + 1)/a clearly approaches 1 as a increases, so does this quantity taken to a constant positive power. In contrast, the ratio (a + 1)!/a! always equals a + 1, and this continues to increase as a increases. Thus, once a factorial exceeds a polynomial, its exceptionally large rate of change insures that it stays above the polynomial. To treat the cases where n = 2,3 and n2 - n ≤ 2n, it is easy to see that any polynomial with an x4 term exceeds one with either an x2 or an x3 as its highest term, and since the factorial exceeds x4, it is also greater than the other two.

For exponential functions, it suffices to treat those ax where a is an integer. If the factorial exceeds these, it also exceeds any exponential function for real a. Going as before, at x = a, ax is greater than a! for the same reasons as for the polynomials. However, each increase of x by 1 beyond this is equivalent to multiplying the exponential function by a, but the factorial by a number greater than a:
aa + 1 = a*aa, while (a + 1)! = (a + 1)*a! and so on. The factorial clearly increases faster, and thus "catches up with" and exceeds the exponential function. To further illustrate this, consider the graph below (click to enlarge): The polynomial function x10 (green), the exponential function 10x (red), and the factorial function x! (blue) compared on a logarithmic graph. The factorial function is interpolated here, but for the time being, we still consider only integer values. Initially, when x is between 2 and 10, the polynomial is the greatest. At 10, the polynomial and exponential functions are obviously equal. Finally, x = 25 is the first point at which the factorial exceeds both functions, the value of 25! being over ten trillion trillion!

The factorial, however, can be shown to increase less rapidly than functions such as xx. In fact, no combination of elementary functions can represent the factorial. To find an expression for the factorial, one must consider more precisely the conditions that must be met. There are an infinite number of curves through any set of points, and therefore the condition that the function coincide with the factorial for positive integers is insufficient to define it uniquely. Therefore, the following two conditions are given for the function f:

f(0) = 1, and
f(x + 1) = (x + 1)f(x).

The second condition generalizes the standard rule for factorials, (n + 1)! =
(n + 1)n!, to any x.

The function that satisfies these conditions is the Gamma function, denoted Γ(x). However, the Gamma function is actually slightly different from the factorial function, as it is translated one unit. What this means is that, for positive integers n,
Γ(n) = (n - 1)!. Therefore, the Gamma function actually satisfies

Γ(1) = 1, and
Γ(x + 1) = xΓ(x)

for all x. There are several ways to actually formulate the Gamma function, one being an infinite product: In evaluating this product, the expression after the Π must be calculated for every positive integer k. Then, all of these values must be multiplied. As the upper bound on k increases to infinity, the product converges to the actual value of n!. Note that the above product is defined for every n, except for negative integers. This is because, if n is a negative integer, in the term k = -n, the denominator of k/(k + n) becomes zero. Since once term is undefined, the whole product is. In addition, due to the 1/n term outside of the infinite product, Γ(0) is undefined. Thus the Gamma function is defined for all numbers except the nonpositive integers.

Next, we must confirm that the Gamma function satisfies the required conditions, in order to see that it truly is an extension of the factorial function. It is clear that Γ(1) = 1, because, in this case, ((k + 1)/k)n = (k + 1)/k, and k/(k + n) = k/(k + 1), which is precisely the reciprocal of the first term. When these are multiplied, they yield 1, no matter the value of k. Thus the infinite product takes the form (1/1)(1*1*1*...) = 1, as desired. Next, it must be proven that Γ(n + 1) = nΓ(n). When n + 1 is substituted for n in the above product, it yields the following expression: (1)
After some manipulation, this becomes , (2)
as an infinite product of two terms multiplied together is the product of the infinite products of each term. The first of the two expressions in parentheses is simply the expression for Γ(n), and the value of the second can be inferred from its expansion: (3)
The fraction (n + 1)/(n + 2) in the first term (k = 1) of the expansion is canceled by its reciprocal, which appears later as the value of (k + 1)/k when k = n + 1. Whenever the first and second fractions of the infinite product can assume reciprocal values for a positive integer value of k, they cancel, for any (k + 1)/k can be cancelled by some expression of the form (k + n)/(k + n + 1) as long as k > n. Therefore, with all of these canceled, all that remains is a product of the fractions (k + 1)/k, as k ranges from 1 to n, or, in numerical form, (2/1)*(3/2)*...*((n + 1)/n). The value of this is (n + 1)/1 = n + 1, since every other number appears once in the numerator of a term, and once in the denominator. Finally, the n + 1 that results cancels with the fraction before the second infinite product in (2), yielding simply n. Thus, finally,

Γ(n + 1) = nΓ(n),

and the infinite product formula agrees with the (shifted) factorial function for all positive integers n. The actual behavior of the Gamma function and its values are discussed in another post.

Sources: Gamma Function, Wikipedia, Mathematical Thought from Ancient to Modern Times, vol. 2 by Morris Kline