Gamma function
The gamma function is a mathematical function that extends the domain of factorials to non-integers. The factorial of a positive integer n, written n!, is the product 1·2·3···n. The gamma function, denoted by , is defined to satisfy for all positive integers n and to smoothly interpolate the factorial between the integers. The gamma function is one of the most commonly occurring examples of a nonelementary function; that is, a function that cannot be expressed in finite terms using algebraic operations, exponentials, and logarithms. Its study dates back to Leonhard Euler, who gave a formula for its calculation in 1729.
Motivation
Is there a "closed-form expression" for the product 1·2·3···n? To be in closed form, the number of arithmetic operations should not depend on the size of n. Such an expression would have several uses; first of all, we could calculate n! in a less tedious manner than by performing (n-1) multiplications. As a famous anecdote tells, Carl Friedrich Gauss found as a child that the sum can be written as — and was thereby able to quickly sum all the integers between 1 and 100, to the astonishment of his teacher. But a closed-form expression has more benefits than just computational convenience. If a formula does not depend on the size of n, it is also irrelevant whether the n is precisely an integer, and the formula should work for fractional numbers. Gauss's formula for sums of consecutive integers (such sums are now called triangular numbers) is obviously valid for non-integer values of n — in fact, when plotted for a continuously changing variable n, it describes a parabola.
Does it at all make sense to define the factorial of a fraction? Whether or not such numbers are useful, it is easy to see that they could at least be defined. By plotting the factorial of a few small integers, it becomes apparent that the dots can be connected with a smooth curve. We could, very roughly, calculate fractional factorials by just inspecting the graph. The problem is that it is not so easy to find a formula that exactly describes the curve. In fact, we now know that no simple such formula exists — "simple" meaning that no finite combination of elementary functions such as the usual arithmetic operations and the exponential function will do. Considering the simple solution for triangular numbers, it may come as surprise that changing "+" to "·" makes such a difference. But it is possible to find a general formula for factorials, if we deploy tools from calculus. As it turns out, the idea of a fractional factorial makes a lot of sense.
Defining the gamma function
The problem of extending the factorial to non-integer arguments was apparently first considered by Daniel Bernoulli and Christian Goldbach in the 1720s, and was solved at the end of the same decade by the Swiss mathematician Leonhard Euler.[1] The gamma function is commonly defined by a definite integral due to Euler,
where is interpreted as if is not an integer.[2] Using standard theorems from mathematical analysis, it can be shown that Euler's integral defines to be a continuous function if is positive, or indeed any complex number with positive real part. To see that it corresponds to the factorial at integers, we can insert instead of and perform an integration by parts to obtain
This relation is called the recurrence formula or recurrence relation of the gamma function. The equation is an example of a functional equation — an equation to be solved for the function for all values of . It is analogous to the recurrence satisfied by factorials, , the only difference being that the function argument has been shifted by 1. A repeated application of the gamma function's recurrence formula gives
which together with the initial value establishes that
for positive integers . We can of course equivalently write . We may use these formulas to explicitly calculate or, conversely, to define for non-integers in terms of the gamma function.
Uniqueness
This establishes that it is possible to define a continuous extension of the factorial, but an important question needs to be addressed: is the gamma function as we have defined it the unique such extension? The answer is no: there are infinitely many ways to connect any discrete set of points with a smooth curve. Infinitely many solutions remain if we demand that must hold for all numbers z, not just integers, so this extra criterion is not strong enough.
The pragmatic reason for using Euler's particular extension of the factorial is that his integral often turns up in applications, whereas other extensions do not.
There is a complication, however: although Euler's function is arguably the most natural extension of the factorial, his integral is not the only formula that can be used to represent it. Other mathematicians who studied the gamma function have used different formulas as definitions, and although those formulas describe the same function, it is not entirely straightforward to prove the equivalence. Euler himself gave two different definitions: the first was not his integral but an infinite product,
of which he informed Goldbach in a letter dated October 13, 1729. He wrote to Goldbach again on January 8, 1730, to announce his discovery of the integral representation
which is valid for . By the change of varibles , this becomes the familiar Euler integral. Euler published his results in the paper "De progressionibus transcendentibus seu quarum termini generales algebraice dari nequeunt" ("On transcendental progressions, that is, those whose general terms cannot be given algebraically"), submitted to the St. Petersburg Academy on November 28, 1729.[3]
A contemporary of Euler, James Stirling, also attempted to find a continuous expression for the factorial, using an entirely different approach. In his Methodus Differentialis (1730), he published the famous Stirling's formula
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 Euler's gamma function. A proof was first given by Charles Hermite in 1900.[4]
A definite and generally applicable characterization of the gamma function was not given until 1922. Harald Bohr and Johannes Mollerup then proved what is known as the Bohr-Mollerup theorem: that the gamma function is the unique solution to the factorial recurrence relation that is also logarithmically convex for positive z. That is, if a function interpolates the factorial, and its logarithm is a convex function for positive , it must be the gamma function. The gamma function is also uniquely defined for negative numbers, and everywhere else in the complex plane, since it can be shown to be an analytic function and analytic functions are uniquely defined by analytic continuation from any region of the complex plane.
The Bohr-Mollerup theorem is useful because it is relatively easy to prove logarithmic convexity for any of the different formulas used to define the gamma function. Taking things further, instead of defining the gamma function by any particular formula, we can choose the conditions of the Bohr-Mollerup theorem as the definition, and then pick any formula we like that satisfies the conditions as a starting point for studying the gamma function. This approach was used by the Bourbaki group.
Notation
The name gamma function and the symbol were introduced by Adrien-Marie Legendre around 1811; Legendre also rewrote Euler's integral definition in its modern form. Although the symbol is an upper-case Greek Gamma, there is no accepted standard for whether the function name should be written "Gamma function" or "gamma function" (some authors simply write "-function"). The alternative "Pi function" notation due to Gauss is sometimes encountered in older literature, but Legendre's notation is dominant in modern works.
It is justified to ask why we distinguish between the "ordinary factorial" and the gamma function by using distinct symbols, and particularly why the gamma function should be normalized to instead of simply using "". Legendre's motivation for the normalization does not appear to be known, and has been criticized as cumbersome by some (the 20th-century mathematician Cornelius Lanczos, for example, called it "void of any rationality" and would instead use [5]). The normalization does simplify some formulas, but complicates others.
Main properties
Real and complex numbers
The behavior of for an increasing positive variable is simple: it grows quickly — faster than an exponential function, asymptotically as in Stirling's formula as .
The behavior for nonpositive is more intricate. Euler's integral is the most common form encountered for the gamma function in applications, but it does not converge for , so a product representation is more convenient in this case. One way is to use Euler's integral for positive arguments and extend the domain to negative numbers by repeated application of the recurrence formula,
choosing such that is positive. Alternatively, we can start directly from either of the formulas
and
where is Euler's constant. Both representations can be derived from Euler's product representation by algebraic manipulation; the first was used by Gauss in 1811 and the second by Karl Weierstrass.
Whichever product we choose, we find that it contains a factor that blows up due to division by zero as approaches any of the integers . Thus, the gamma function must be undefined at those points; it is a meromorphic function with poles at the nonpositive integers. The following image shows the graph of the gamma function along the real line:
The gamma function is nonzero everywhere along the real line, although it comes arbitrarily close as . There is in fact no complex number z for which , and hence the reciprocal gamma function is an entire function, with zeros at . We see that the gamma function has a local minimum at where it attains the value . The gamma function must alternate sign between the poles because the product in the forward recurrence contains an odd number of negative factors if the number of poles between z and z+n is odd, and an even number if the number of poles is even.
Weierstrass originally wrote his product as one for , in which case it is taken over the function's zeros rather than its poles. Inspired by this result, he proved what is known as the Weierstrass factorization theorem — that any entire function can be written as a product over its zeros; a generalization of the Fundamental Theorem of Algebra.
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 |
Although Euler was a pioneer in the theory of complex variables, he does not appear to have considered the factorial of a complex numbers, as instead Gauss first did.[6] Plotting the gamma function in the complex plane yields beautiful graphs:
Reflection, multiplication and rational arguments
The recurrence relation is not the only functional equation satisfied by the gamma function. Another important property is the reflection formula
which gives a concise relation between the gamma function of positive and negative numbers. The division by a sine, which is periodically zero, again indicates the existence of the gamma function's periodically occurring poles. Further, inserting z = 1/2 reveals the surprising fact that
Hence, by the recurrence formula, the gamma function or factorial of any half-integer is a rational multiple of . Both results were discovered by Euler, and are most easily derived by comparing his product representation with his product formula for the sine function. The value of can also be calculated from Euler's integral, by changing variables to obtain a Gaussian integral.
A third functional equation is given by Gauss's multiplication theorem
of which Legendre's duplication formula
is a special case.
It follows from the recurrence relation that is a rational function of whenever is an integer, and a rational number whenever is rational.[7] From the multiplication formula, it is also possible to derive exotic-looking results such as
Given the curious appearance of in the formula for the gamma function of half an integer, it may be tempting to look for a formula for other individual values where is rational. However, these numbers are not known to be expressible in any simple way in terms of the elementary mathematical constants and . It has been proved that is algebraically independent of and itself a transcendental number for any integer and each of the fractions = 1/6, 1/4, 1/3, 2/3, 3/4, and 5/6; many more esoteric transcendence results are also known.[8] Values of the gamma function at rational points have geometrical significance similar to that of : they correspond to special values of elliptic integrals, which are used to calculate the circumference of ellipses (, of course, comes from the special case of an ellipse with equal axes).
Derivatives
It is useful to think of the gamma function as the solution to its functional equations, particularly the recurrence relation. Most important special functions in applied mathematics arise as solutions to the continuous counterpart of recurrence relations: differential equations, which relate a function to its derivatives, but the gamma function does not appear to satisfy any simple differential equation. Otto Hölder proved in 1887 that the gamma function at least does not satisfy any algebraic differential equation by showing that a solution to such an equation could not satisfy the gamma function's recurrence formula. This result is known as Hölder's theorem.
Although the derivatives of the gamma function do not pop out of any simple differential equation, they exist and are analytic functions since the gamma function is analytic; they have been named polygamma functions.[9] Polygamma functions at integers can be evaluated in terms of the Riemann zeta function, and hence the gamma function can be given a Taylor series expansion involving the zeta function around any integer.
Applications
Products involving the gamma function
Products and quotients of successive integers are commonly encountered in combinatorics. Such products can often be written in terms of factorials, the most important example perhaps being that of the binomial coefficient
We can replace the factorial by a gamma function to extend any such formula to the complex numbers; more generally, any product where each factor is a rational function of the index variable is susceptible to the same treatment. If and are monic polynomials of degree and with respective roots and , we have
If we have a way to calculate the gamma function numerically, it is a breeze to calculate numerical values of such products. The number of gamma functions in the right-hand side depends only on the degree of the polynomials, so it does not matter whether equals 5 or .
By taking limits, infinite products of rational functions can be evaluated in terms of the gamma function as well. Due to the Weierstrass factorization theorem, many simple analytic functions can be written as infinite products of rational factors, and hence represented as finite products or quotients of the gamma function. We have already seen one striking example: the reflection formula essentially represents the sine function as the product of two gamma functions. More functions yet, including the hypergeometric function and special cases thereof, can be represented by means of complex contour integrals of products and quotients of the gamma function, called Mellin-Barnes integrals.
Use in integration
Frequently encountered generalizations of the gamma function include the incomplete gamma functions
and the beta function
A variety of definite and indefinite integrals whose solutions are nonelementary can be expressed in terms of some combination of gamma functions and incomplete gamma functions. An example is that the Laplace transform of the power function xc reduces to the Euler integral and hence the gamma function.
Integrands involving powers are particularly often susceptible to evaluation in terms of gamma functions, as it may be possible to consider the exponent an integer, eliminate it by repeated integration by parts to obtain a factorial times a solvable integral, and generalizing the result to arbitrary complex exponents by replacing the factorial with a gamma function. At other times, it is possible to directly transform an integral into an Euler integral by an appropriate change of variables.
Viewed as a non-elementary integral of an elementary function, the gamma function belongs to the same category of special functions as the error function, the exponential integral, the logarithmic integral, and the sine integral. There are many known interrelations between these functions and the gamma function.
The gamma function is also used in statistics to define the gamma distribution, the inverse-gamma distribution, and the beta distribution.
Analytic number theory
The fact that the gamma function can be expanded in power series using the Riemann zeta function can be useful in the study of the gamma function, but a more important fact is that the gamma function can be used in the study of the zeta function. A fundamental property of the Riemann zeta function is its functional equation:
Among other things, this provides an explicit form for the analytic continuation of the zeta function to a meromorphic function in the complex plane and leads to an immediate proof that the zeta function has infinitely many so-called "trivial" zeros on the real line. Borwein et al. call this formula "one of the most beautiful findings in mathematics".[10] Another champion for that title might be
Both formulas were derived by Bernhard Riemann in his seminal 1859 paper "Über die Anzahl der Primzahlen unter einer gegebenen Grösse" ("On the Number of Prime Numbers less than a Given Quantity"), one of the milestones in the development of analytic number theory — the branch of mathematics that studies prime numbers using the tools of mathematical analysis. Factorial numbers, considered as discrete objects, are an important concept in classical number theory due to their compositeness properties, but Riemann found a use for their continuous extension that arguably turned out to be even more important.
Numerical calculation
Algorithms
It is a relatively convenient business to numerically calculate the gamma function for small arguments: given an approximation that holds on some interval of unit width, say for , or a complex strip with real part in such an interval, the value anywhere else can be computed easily via the recurrence and reflection formulas, using only a few multiplications or an evaluation of the sine in the reflection formula. In advanced numerical software that computes the gamma function with double precision (16 digits), the unit-interval approximation is usually an optimally chosen rational function, but for moderate precision an approximating polynomial works just as well. The gamma function can also be computed from any of several series representation, or even by direct numerical integration of Euler's integral, but either approach is generally less efficient than using a pre-computed approximation if a fixed precision is used.
For large arguments, say , it is best to use an asymptotic expansion; the most popular is Stirling's series
This is Stirling's formula multiplied by a series that corrects the error. The series coefficients can be calculated in terms of Bernoulli numbers. The "" sign denotes an asymptotic equality: the series diverges for every z, but yields arbitrarily accurate approximations of the gamma function as if the series is truncated at the smallest term. We can use Stirling's series to calculate the gamma function for small numbers as well, using the recurrence relation. Taking and calculating from , using the three first terms in Stirling's series, we obtain ≈ 1.000003 and ≈ 1.000002; this particular approximation is good to five decimal places on the interval . With larger and more terms, Stirling's series permits calculating the gamma function with arbitrary precision.
Other practical methods for high-precision calculation include the Lanczos approximation and Spouge's approximation, which are both similar in form to Stirling's series but have different convergence characteristics.
It should be noted that it may be convenient to work with the logarithm of the gamma function instead of the gamma function itself, since the raw gamma function grows quickly and can cause overflow in computer arithmetic. It is common to encounter a quotient of two large gamma function values, which is most safely computed by subtracting two logarithms. Stirling's, Lanczos's and Spouge's approximations can all be calculated directly in logarithmic form.
Available software and tables
Double-precision floating-point implementations of the gamma function and its logarithm are available in 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 is not implemented by all C compilers. Arbitrary-precision implementations are available in most computer algebra systems, such as Mathematica and Maple. Pari/GP, MPFR and MPFUN contain free arbitrary-precision implementations.
Although the gamma function can be calculated virtually as easily as any mathematically simpler function with a modern computer — even with a programmable pocket calculator — this was of course not always the case. Until the mid-20th century, mathematicians relied on hand-made tables, notably a table computed by Gauss in 1813 and another by Legendre from 1825. Tables as well as hand-drawn graphs of the complex gamma function can be found in Tables of Higher Functions by Jahnke and Emde, first published in Germany in 1909.
There was in fact little practical need for anything but real values of the gamma function until the 1930s, when applications for the complex gamma function were discovered in theoretical physics. As electronic computers became available for the production of tables in the 1950s, several extensive tables for the complex gamma function were published to meet the demand, including a table accurate to 12 decimal places from the U.S. National Bureau of Standards.[11]
Concluding remarks
The theory of the gamma function and its applications is rich enough to fill books — indeed, such books have been written. A recommended reading, although the book is now out of print, is Emil Artin's 38-page exposition The Gamma Function from 1931 (English translation from 1964).[12] Artin, who argues that "the gamma function can be thought of as one of the elementary functions", develops the theory of the gamma function of a real variable in a thorough way using only elementary methods. Numerous books on the general topic of complex analysis devote a chapter to the gamma function, as does virtually every book on special functions.
The gamma function has caught the interest of some of the most prominent mathematicians of all time. Its history, researched for instance by P. J. Davis[1], reflects many of the major developments within mathematics since the 18th century. In the words of Davis, "each generation has found something of interest to say about the gamma function. Perhaps the next generation will also." The Nobel Prize-winning physicist Gerard 't Hooft, mentioning the gamma function, urges prospective students of physics to "enjoy studying its properties".[13]
References and notes
- ↑ 1.0 1.1 Davis, P. J. (1959). "Leonhard Euler's Integral: A Historical Profile of the Gamma Function", The American Mathematical Monthly, Vol. 66, No. 10 (Dec., 1959), pp. 849-869
- ↑ Here, "log" denotes the natural logarithm. For complex arguments, it should be interpreted as the principal value.
- ↑ Euler's paper was published in Commentarii academiae scientiarum Petropolitanae 5, 1738, 36—57. See E19 -- De progressionibus transcendentibus seu quarum termini generales algebraice dari nequeunt, from The Euler Archive, which includes a scanned copy of the original article. An English translation by S. Langton is also available.
- ↑ Knuth, D. E. (1997). The Art of Computer Programming, volume 1 (Fundamental Algorithms). Addison-Wesley.
- ↑ Lanczos, C. (1964). "A precision approximation of the gamma function." J. SIAM Numer. Anal. Ser. B, Vol. 1.
- ↑ Remmert, R., Kay, L. D. (translator) (2006). Classical Topics in Complex Function Theory. Springer. ISBN 0387982213.
- ↑ Assuming that no poles are encountered
- ↑ Waldschmidt, M. (2006). "Transcendence of Periods: The State of the Art". Pure and Applied Mathematics Quarterly, Volume 2, Number 2, 435—463 (PDF copy published by the author)
- ↑ More accurately, the polygamma functions are the logarithmic derivatives of the gamma function
- ↑ Borwein, J., Bailey, D. H. & Girgensohn, R. (2003). Experimentation in Mathematics. A. K. Peters, 133. ISBN 1-56881-136-5.
- ↑ Davis
- ↑ Artin, E. (1964). The Gamma Function. Rinehart and Winston.
- ↑ Gerard 't Hooft (2007). "Theoretical Physics as a Challenge". Retrieved April 24, 2007