Gamma Math Homework

The Gamma function is an amazing integral:

Using integration by parts, you can show that this function satisfies the property

Using Gamma(1)=1, you can calculate Gamma(2), Gamma(3),...
Does this remind you of anything?

Surprise: the Gamma function satisfies Gamma(n) = Factorial(n-1).
(I would have used the notation "!" but you might think I was just excited!)

So you can think of the Gamma function as being a continuous form of the factorial function. It satisfies lots of cool properties; here is just one:

Calculus students might be challenged to compute Gamma(2), Gamma(3), etc. and discover the connection with the factorial function. You may wish to assign the integration by parts as a homework exercise prior to presenting this Fun Fact.

The Gamma function is an important function in analysis, complex analysis, combinatorics, and probability.

Su, Francis E., et al. "Gamma Function." Math Fun Facts. <>.


Gamma Function

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 Wolfram Language as [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 for a 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 infinite product 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 realpositive 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




the satisfy


(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,

For ,


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 multiplication formula


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:






(Berndt 1994).

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).

SEE ALSO:Bailey's Theorem, Barnes G-Function, Binet's Fibonacci Number Formula, Bohr-Mollerup Theorem, Digamma Function, Fransén-Robinson ConstantGauss Multiplication Formula, Incomplete Gamma Function, Knar's Formula, Lambda Function, Lanczos Approximation, Legendre Duplication Formula, Log Gamma Function, Mellin's Formula, Mu Function, Nu Function, Pearson's Function, Polygamma Function, Regularized Gamma Function, Stirling's Series, Superfactorial



Abramowitz, M. and Stegun, I. A. (Eds.). "Gamma (Factorial) Function" and "Incomplete Gamma Function." §6.1 and 6.5 in Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables, 9th printing. New York: Dover, pp. 255-258 and 260-263, 1972.

Arfken, G. "The Gamma Function (Factorial Function)." Ch. 10 in Mathematical Methods for Physicists, 3rd ed. Orlando, FL: Academic Press, pp. 339-341 and 539-572, 1985.

Artin, E. The Gamma Function. New York: Holt, Rinehart, and Winston, 1964.

Bailey, W. N. Generalised Hypergeometric Series. Cambridge, England: Cambridge University Press, 1935.

Berndt, B. C. Ramanujan's Notebooks, Part IV. New York: Springer-Verlag, pp. 334-342, 1994.

Beyer, W. H. CRC Standard Mathematical Tables, 28th ed. Boca Raton, FL: CRC Press, p. 218, 1987.

Borwein, J. and Bailey, D. Mathematics by Experiment: Plausible Reasoning in the 21st Century. Wellesley, MA: A K Peters, 2003.

Borwein, J. and Borwein, P. B. Pi & the AGM: A Study in Analytic Number Theory and Computational Complexity. New York: Wiley, p. 6, 1987.

Borwein, J. M. and Zucker, I. J. "Fast Evaluation of the Gamma Function for Small Rational Fractions Using Complete Elliptic Integrals of the First Kind." IMA J. Numerical Analysis12, 519-526, 1992.

Bourguet, L. "Sur les intégrales Eulériennes et quelques autres fonctions uniformes." Acta Math.2, 261-295, 1883.

Campbell, R. Les intégrales eulériennes et leurs applications. Paris: Dunod, 1966.

Davis, H. T. Tables of the Higher Mathematical Functions. Bloomington, IN: Principia Press, 1933.

Davis, P. J. "Leonhard Euler's Integral: A Historical Profile of the Gamma Function." Amer. Math. Monthly66, 849-869, 1959.

Edwards, H. M. Riemann's Zeta Function. New York: Dover, 2001.

Erdélyi, A.; Magnus, W.; Oberhettinger, F.; and Tricomi, F. G. "The Gamma Function." Ch. 1 in Higher Transcendental Functions, Vol. 1. New York: Krieger, pp. 1-55, 1981.

Finch, S. R. "Euler-Mascheroni Constant." §1.5 in Mathematical Constants. Cambridge, England: Cambridge University Press, pp. 28-40, 2003.

Gauss, C. F. "Disquisitiones Generales Circa Seriem Infinitam etc. Pars Prior." Commentationes Societiones Regiae Scientiarum Gottingensis Recentiores, Vol. II. 1812. Reprinted in Gesammelte Werke, Bd. 3, pp. 123-163 and 207-229, 1866.

Graham, R. L.; Knuth, D. E.; and Patashnik, O. Answer to Problem 9.60 in Concrete Mathematics: A Foundation for Computer Science, 2nd ed. Reading, MA: Addison-Wesley, 1994.

Hardy, G. H. "A Chapter from Ramanujan's Note-Book." Proc. Cambridge Philos. Soc.21, 492-503, 1923.

Hardy, G. H. "Some Formulae of Ramanujan." Proc. London Math. Soc. (Records of Proceedings at Meetings) 22, xii-xiii, 1924.

Hardy, G. H. Ramanujan: Twelve Lectures on Subjects Suggested by His Life and Work, 3rd ed. New York: Chelsea, 1999.

Havil, J. "The Gamma Function." Ch. 6 in Gamma: Exploring Euler's Constant. Princeton, NJ: Princeton University Press, pp. 53-60, 2003.

Isaacson, E. and Salzer, H. E. "Mathematical Tables--Errata: 19. J. P. L. Bourget, 'Sur les intégrales Eulériennes et quelques autres fonctions uniformes,' Acta Mathematica, v. 2, 1883, pp. 261-295.' " Math. Tab. Aids Comput.1, 124, 1943.

Koepf, W. "The Gamma Function." Ch. 1 in Hypergeometric Summation: An Algorithmic Approach to Summation and Special Function Identities. Braunschweig, Germany: Vieweg, pp. 4-10, 1998.

Krantz, S. G. "The Gamma and Beta Functions." §13.1 in Handbook of Complex Variables. Boston, MA: Birkhäuser, pp. 155-158, 1999.

Le Lionnais, F. Les nombres remarquables. Paris: Hermann, p. 46, 1983.

Magnus, W. and Oberhettinger, F. Formulas and Theorems for the Special Functions of Mathematical Physics. New York: Chelsea, 1949.

Nielsen, N. "Handbuch der Theorie der Gammafunktion." Part I in Die Gammafunktion. New York: Chelsea, 1965.

Press, W. H.; Flannery, B. P.; Teukolsky, S. A.; and Vetterling, W. T. "Gamma Function, Beta Function, Factorials, Binomial Coefficients" and "Incomplete Gamma Function, Error Function, Chi-Square Probability Function, Cumulative Poisson Function." §6.1 and 6.2 in Numerical Recipes in FORTRAN: The Art of Scientific Computing, 2nd ed. Cambridge, England: Cambridge University Press, pp. 206-209 and 209-214, 1992.

Sloane, N. J. A. Sequences A000079/M1129, A000142/M1675, A001147/M3002, A030169, A030170, A030171, A030172, A061549, A068466, and A143503 in "The On-Line Encyclopedia of Integer Sequences."

Spanier, J. and Oldham, K. B. "The Gamma Function " and "The Incomplete Gamma and Related Functions." Chs. 43 and 45 in An Atlas of Functions. Washington, DC: Hemisphere, pp. 411-421 and 435-443, 1987.

Watson, G. N. "Theorems Stated by Ramanujan (XI)." J. London Math. Soc.6, 59-65, 1931.

Watson, G. N. "Three Triple Integrals." Quart. J. Math., Oxford Ser. 210, 266-276, 1939.

Wells, D. The Penguin Dictionary of Curious and Interesting Numbers. Middlesex, England: Penguin Books, p. 40, 1986.

Whipple, F. J. W. "A Fundamental Relation between Generalised Hypergeometric Series." J. London Math. Soc.1, 138-145, 1926.

Whittaker, E. T. and Watson, G. N. A Course in Modern Analysis, 4th ed. Cambridge, England: Cambridge University Press, 1990.

Wrench, J. W. Jr. "Concerning Two Series for the Gamma Function." Math. Comput.22, 617-626, 1968.

Referenced on Wolfram|Alpha: Gamma FunctionCITE THIS AS:

Weisstein, Eric W. "Gamma Function." From MathWorld--A Wolfram Web Resource.

Wolfram Web Resources

Mathematica »

The #1 tool for creating Demonstrations and anything technical.

Wolfram|Alpha »

Explore anything with the first computational knowledge engine.

Wolfram Demonstrations Project »

Explore thousands of free applications across science, mathematics, engineering, technology, business, art, finance, social sciences, and more. »

Join the initiative for modernizing math education.

Online Integral Calculator »

Solve integrals with Wolfram|Alpha.

Step-by-step Solutions »

Walk through homework problems step-by-step from beginning to end. Hints help you try the next step on your own.

Wolfram Problem Generator »

Unlimited random practice problems and answers with built-in Step-by-step solutions. Practice online or make a printable study sheet.

Wolfram Education Portal »

Collection of teaching and learning tools built by Wolfram education experts: dynamic textbook, lesson plans, widgets, interactive Demonstrations, and more.

Wolfram Language »

Knowledge-based programming for everyone.


Leave a Reply

Your email address will not be published. Required fields are marked *