home | index | units | counting | geometry | algebra | trigonometry | calculus | functions
analysis | sets & logic | number theory | recreational | misc | nomenclature & history | physics
 border
 border

Final Answers
© 2000-2021   Gérard P. Michon, Ph.D.

The Gamma Function
n!   =   G (n+1)

[...]  the Gamma function can be thought of
  as one of the elementary functions.

 "Einführung in die Theorie der Gammafunktion"
(preface, 1931)  by  Emil Artin (1898-1962)
 Michon
 
 

Related articles on this site:

Related Links (Outside this Site)

Introduction to the Gamma Function  by  Pascal Sebah  and  Xavier Gourdon.
 
Notes on the historical bibliography of the Gamma function
by  Ricardo Pérez-Marco  (arXiv, 2020-11-22).
 
Stirling's Formula  by  James Sethna  (Cornell University).
 
Viète's formula, Knar's formula, and the geometry of the Gamma function
by  John Pearson  (Pace Academy).

Wikipedia :   Gamma function   |   Particular values of the Gamma function

Bibliography :

The Gamma Function  by  Emil Artin  (38 pages, 1931.  Translation by Michael Butler, 1964.)

 
border
border

The Gamma Function

 Gamma Function

(Mark Barnes, UK.  2000-10-24)   What  is  the Gamma function?

When  n  is a nonnegative integer,  the  factorial  of  n  (denoted n!)  is defined as the product of all positive integers not exceeding  n  (incidentally,  this defines the factorial of zero as an  empty product,  which implies that it's equal to the neutral element for multiplication; that's to say  0! = 1).

Motivated by the  Platonic belief  that there ought to be an  analytic function  having value  n!  at  point  n  when  n  is an integer,  we may look for an analytic function  G  such that  G(1) = 1  and verifying the following relation  (almost everywhere):

G (z+1)   =   z G (z)

An induction on n then implies that  n! = G(n+1)  for any positive integer  n.

Now,  the idea is to show that the above expression fixes the values of  G  over a  continuum,  from which it can be extended by  analytic continuation  to all real  (or complex)  values of  z,  except zero and negative integers.

 Come back later, we're
 still working on this one...

G(z)   =   limn®¥   nz n! / (z(z+1)...(z+n))

This definition  (often called  Euler's definition)  was proposed in 1729 by  Leonhard Euler (1707-1783)  in a letter to  Christian Goldbach (1690-1764).  The symbol  G  and the name  Gamma function  would only be introduced much later  (by  Legendre,  in 1814).  Gauss  used  P(z)  for  G(z+1).

Other definitions :

 Leonhard Euler 
 (1707-1783)
  • Euler integral of the second kind (valid only if Re(z)>0):
    G(z) = ò0¥e-t tz-1 dt
    G(z) = ò1¥e-t tz-1 dt + å (-1)n/(n!(n+z))
    Euler's reflection formula  yields values of  G(z)  when  Re(z) ≤ 0  :
    G (z)  G (1-z)   =    p
    Vinculum
    sin pz
  • Weierstrass's definition:  (g being the Euler-Mascheroni constant, namely 0.5772156649015328606065120900824024310421593359399235988... ):
    G(z) = e-g z / z Õ ez/n/(1+z/n)
  • Bourbaki turned the Bohr-Mollerup theorem (1922) into a definition:  They define  G  as the only  logarithmically convex  function such that:
    • G(1)   =   1
    • G(x+1)   =   x G(x)   for any positive x.

Basic Properties :

G(z) has an elementary expression only when z is either a positive integer n, or a positive or negative half-integer  (½+n  or  ½-n):

 
G(n)
 
=
 
(n-1)!         G(1/2 + n)
 
=
Öp  
 (2n-1)!!          G(1/2 - n)
 
=
(-2)n Öp
vinculum vinculum

=

=
2n
=
(2n-1)!!

In this, k! ("k factorial") is the product of all positive integers less than or equal to k, whereas k!! ("k double-factorial") is the product of all such integers which have the same parity as k, namely k(k-2)(k-4)... Note that k!, is undefined (¥) when k is a negative integer (the G function is undefined at z = 0,-1,-2,-3,... as it has a simple pole at z = -n with a residue of (-1)n/n! , for any natural integer n). However, the double factorial k!! may also be defined for negative odd values of k:  The expression (-2n-1)!! = -(-1)n / (2n-1)!! ) may be obtained through the recurrence relation  (k-2)!! = k!! / k , starting with k=1.  In particular (-1)!! = 1, so that either of the above formulas does give G(1/2) = Öp , with n=0. (You may also notice that either relation holds for positive or negative values of n.)

G(x)  can't be expressed in terms of elementary constants unless  2x  is an integer  (or unless 4x is an integer, if  Gauss's constant  is allowed).

G(7/8) = 1.08965235742289695125237675510289297114787006776756...
G(6/7) = 1.10576707232956732661984929424733752923154697682003...
G(5/6) = 1.12878702990812596126090109025884201332678744166475...
G(4/5) = 1.16422971372530337363632093826845869314196176889118...
G(3/4) = 1.22541670246517764512909830336289052685123924810807...
G(5/7) = 1.27599267549344405848530560778987494845458899291105...
G(2/3) = 1.35411793942640041694528802815451378551932726605679...
G(5/8) = 1.43451884809055677563601973945642313663220777220666...
G(3/5) = 1.48919224881281710239433338832134228132059903875992...
G(4/7) = 1.55858103290247500827500929124597392252085047209453...
G(1/2) = 1.77245385090551602729816748334114518279754945612238...
G(3/7) = 2.06751172656022935302461240630882694355921421149238...
G(2/5) = 2.21815954375768822305905402190767945077056650177146...
G(3/8) = 2.37043618441660090864647350417665250988740080335892...
G(1/3) = 2.67893853470774763365569294097467764412868937795730...
G(2/7) = 3.14911511775993659097011366468076889222977861176625...
G(1/4) = 3.62560990822190831193068515586767200299516768288006...
G(1/5) = 4.59084371199880305320475827592915200343410999829340...
G(1/6) = 5.56631600178023520425009689520772611139879911487285...
G(1/7) = 6.54806294024782443771409334942899626262113518738413...
G(1/8) = 7.53394159879761190469922984121513362461041958814907...
G(1/9) = 8.52268813921947595051439221443955975475883146932202...
G(1/10) = 9.51350769866873183629248717726540219255057862608837...
G(1/11) = 10.50587485607868519189500282084781068437501927672900...

The real [little known] gem which I have to offer about numerical values of the Gamma function is the so-called "Lanczos approximation formula" [pronounced "LAHN-tsosh" and named after the Hungarian mathematician Cornelius Lanczos (1893-1974), who published it in 1964]. Its form is quite specific to the Gamma function whose values it gives with superb precision, even for complex numbers. The formula is valid as long as Re(z) [the real part of z] is positive. The nominal accuracy, as I recall, is stated for  Re(z) > ½, but it's a simple application of the "reflection formula" (given below) to obtain the value for the rest of the complex plane with a similar accuracy. The Lanczos formula makes the Gamma function almost as straightforward to compute as a sine or a cosine.  Here it is:

G(z) = [1+C1/(z)+C2/(z+1)+ ... +Cn/(z+n-1) + e(z)] ´ Ö(2p) (z+p-1/2)z-1/2 / ez+p-1/2

e(z) is a small error term whose value is bounded over the half-plane described above. The values of the coefficients Ci depend on the choice of the integers p and n. For p=5 and n=6, the formula gives a relative error less than 2.2´10-10 with the following choice of coefficients: C1=76.18009173, C2= -86.50532033, C3=24.01409822, C4= -1.231739516, C5=0.00120858003, and C6= -0.00000536382.

I used this particular set of coefficients extensively for years (other sources may be used for confirmation) and stated so in my original article here.  This prompted Paul Godfrey of Intersil Corp. to share a more precise set and his own method to compute any such sets (without the fear of uncontrolled rounding errors). Paul has kindly agreed to let us post his (copyrighted) notes on the subject here.

Some of the fundamental properties of the Gamma function are:

  • Reflection formula: G(z)G(1-z) = p/sin(pz)
     
  • Recursion formula: G(1+z) = zG(z)
     
  • Exact values (when n is an integer; see above when n is negative):
    G(n) = (n-1)! and G(n+1/2) = Öp (2n)! / (n!4n)
     
  • Gauss multiplication formula:
    G(nz) = (2p)(1/2-n/2) n(nz-½)  G(z)  G(z+1/n)  ...  G(z+(n-1)/n)
     
  • Legendre duplication formula  (i.e., multiplication formula  with  n = 2 ):
    G(2z) = (2p) 2(2z-½)  G(z)  G(z+½)

Incidentally,  G(1/4)  can be expressed in terms of Gauss' constant  (G).  So can  G(3/4)  (using the  reflection formula):

G(1/4)   =   (8 p3 G2 ) ¼           G(3/4)   =   (p / 2G2 ) ¼

Other interesting remarks about the Gamma function include:

  • | G(ix) | 2   =   p / (x sinh px )     for x real

Gamma-function  in  Encyclopedia of Mathematics  (European Mathematical Society).
 
Casio's Gamma-function calculator


(2021-07-07)   Euler Integral of the second kind.
Its value is obtained by induction when the exponent  n  is an integer.

The result to prove is:   n!   =    ó ¥
õ0
   tn e-t  dt

That's true for  n = 0  (0! = 1)  as the integrand's  primtive  is then just  -e-t.  To complete the  induction,  we assume that the formula holds for a given  n  and compute the unknown expression for  n+1,  using  integration by parts:

ó ¥
õ0
  tn+1 e-t  dt   =    é
ë
 - tn+1 e-t  ù ¥
û 0
 +  (n+1)  ó ¥
õ0
  tn e-t  dt   =   (n+1) n!   QED

Now,  this improper integral makes perfect sense  even when n isn't an integer  and it's an analytic function of  n  because the integrand is.  Therefore,  it makes sense to use it as a  definition  of  G(n+1)  whenever it converges.  With a trivial change of variable, this amounts to:

    G(z)   =    ó ¥
õ0
   tz-1 e-t  dt       when Re(z) > 0    

The  reflection formula  can then provide the value of G(z)  when Re(z) ≤ 0.

How exciting is this integral? (9:28)  by  Michael Penn  (2021-07-07).


(2021-06-19)   Euler's Reflection Formula  (formule des compléments)
Fundamental property of the  Gamma function,  when  z  isn't an integer.

G (z)  G (1-z)   =    p
Vinculum
sin pz

In this,  integer values of  z  are not allowed.  To remove this restriction,  it's more satisfying to express the above reflection relation in terms of the  reciprocal Gamma function  g (z) = 1/G (z).

g (z)  g (1-z)   =    sin pz
Vinculum
p

The function  g  was favored by  Karl Weierstrass (1815-1897)  who called it  factorielle  (French word for  factorial)  and defined it with the following relation.  This function is an  entire function  (i.e., it's  holomorphic  over the entire complex plane; without any singularities).

g(z)   =   z eg z Õn  ez/n / (1+z/n)

In this,  the  number  g  is the Euler-Mascheroni constant  (0.5772156649...).

 Come back later, we're
 still working on this one...

Reciprocal Gamma function   |   Reflection formulas   |   Proof
 
Two very elegant Proofs (13:54)  by  Jens Fehlau  (Flammable Maths, 2019-07-02).


 James Stirling (the Venetian) 
 1692-1770 (2012-08-01)   Stirling's Approximation
A useful approximation to  factorials.

In 1733,  Abraham de Moivre (1667-1754)  stated that:

Log n!   =   n Log n  -  n  +  O( Log n )

Proof :   The left-hand side is the discrete sum of  n  logarithms.  As such,  it can be approximated by the  integral  of  Log x,  which is  x Log x - x  (that's obtained by  integration by parts;  check it by differentiating).

This amounts to estimating the area under the   y = Log x   curve by the area under a staircase curve obtained by replacing  x  by its floor  (i.e,  the highest integer not exceeding  x).  This entails an error no greater than  Log n  (since the height of a staircase is the sum of the heights of all its steps).  QED

The approximation of  n!  obtained by raising  e  to the power of either side of the above formula isn't precise enough to yield an  asymptotic equivalent  of n!.  Actually,  n!  is  asymptotically equivalent  to  nn+½ / en  multiplied into  some constant  which  James Strirling (1692-1770)  identified to be:

(2p)½   =   2.5066282746310005...

He thus obtained the formula which now bears his name:

Stirling's Asymptotic Formula  (1730)
 Vinculum
n!   ~   (n/e) Ö 2pn

Proof :   The approach is again to compare a discrete sum with the integral of  Log x.  However, instead of using a staircase directly as before,  we'll estimate the integral with the more refined  trapezoidal method.

The method replaces the logarithmic curve by an inscribed polygonal line whose vertices are at integral values of the abscissa.  This add to the previous staircase a number of small triangles whose total area is  ½ Log n:

Log n!   =   n Log n  -  n  +  ½ Log n  +  O(1)

Take the exponential of both sides to obtain an asymptotic equivalence involving some unknown constant C:

 Vinculum
n!   ~   C (n/e) Ö n

Then,  solve for  C  the asymptotic equivalent of the  Wallis integral:

( p/4n )1/2   ~   I2n   =   (2n)! p   ~   C (2n/e)2n (2n)1/2 p   ~   (2n)1/2 p     QED
Vinculum Vinculum Vinculum
22n+1 n!2 22n+1 C2 (n/e)2n n 2 C n

Stirling approximation   |   Lanczos approximation   |   Implementation of the Gamma function


(2017-05-01)   Asymptotic Expansion:  The  Stirling series  diverges.
An important example of a  divergent  asymptotic expansion.

Asymptotic series for the Gamma function   ( A001163 / A001164 )
G(z)   ~     zz-½   (2p)½   1   +   1    +  1   -  139   -  571
 Vinculum  Vinculum  Vinculum  Vinculum  Vinculum
ez 12  z 288 z2 51840 z3 2488320 z4
  +   163879    +  5246819   -  534703531
 Vinculum  Vinculum  Vinculum
209018880 z5 75246796800 z6 902961561600 z7
  -   4483131259    +  432261921612371
 Vinculum  Vinculum
86684309913600 z8 514904800886784000 z9
  +   6232523202521089    -  25834629665134204969
 Vinculum  Vinculum
86504006548979712000 z10 13494625021640835072000 z11
  -  1579029138854919086429   +  ...  ]
 Vinculum
9716130015581401251840000 z12

The bracketed series is called  Stirling's series.  It is a  proper  asymptotic series,  which is to say that it  doesn't  converge for a fixed  z.

The above is sometimes known as the Bender/Orszag formula, because it was discussed to unprecedented precision in a 1978 textbook by Carl M. Bender (1943-) and Steven A. Orszag (1943-2011):
"Advanced Mathematical Methods for Scientists and Engineers" (McGraw-Hill, 1978.  Springer, 1999)

A097301  &  A097302.

On 2004-08-13,  the physicist  Wolfdieter Lang  (ITP of KIT)  posted as A097303  (in the OEIS)  a sequence of denominators which,  he says,  starts differing from the aforementioned  A001164  at index 32.

 Come back later, we're
 still working on this one...

Wolfram   |   Coefficients of Stirling Series  by  Herman Jaramillo  (MathStackexchange, 2016-03-26).
On the coefficients of the asymptotic expansion of n!  by  Gergö Nemes  (2010-03-31).


(2019-12-04)   Hölder's theorem     (Hölder, 1887)
G  doesn't satisfy any  algebraic  differential equation.

 Come back later, we're
 still working on this one...

Hölder's theorem   |   Otto Hölder (1859-1937)


(2020-05-13)   Knar's formula

 Come back later, we're
 still working on this one...

Knar's formula   |   Joseph_Knar (1800-1864)


(2019-12-04)   Kummer's series   for   Log G (x)   (Kummer, 1847)
Edouard Kummer (1810-1893)  proved this formula for   0 < x < 1 :
Log G (x)   = ¥
å
m = 1
Log 2m   sin 2mp x
Vinculum
m p
  (1 - x)  Log p  +  (½ - x)  g  -  ½  Log sin px  +  

 Come back later, we're
 still working on this one...

"On Kummer's series for Log  G(a)"  by  G.H. HardyQuarterly J. Math. 37, pp. 49-53  (1906).
 
"Kummer's Formula for Multiple Gamma Functions"  by  Shin-ya Koyama & Nobushige Kurokawa  (Nov. 2002).

 John Wallis
(2021-07-12)   Wallis integrals   (Wallis, 1655)
A remarkable precursor to Euler's  Beta function.

p! q!    =    ó 1
õ0
   ( 1 - t1/p ) q  dt
Vinculum
(p+q)!

Wallis could only work out this integral for integer values of p and q,  except when  p = q = ½  for which the integral on the right-hand-side is simply  p/4  (one fourth the area of a unit circle).  From this,  he ventured that:

(½)!   =   ½ Öp

Nobody had ever proposed to define the  factorial  of a non-integer before.

 Come back later, we're
 still working on this one...

Numericana :   Wallis integrals   |   Wallis product   |   John Wallis (1616-1703)
 
Amazing formula for pi: the Wallis product (11:56)  by  Presh Talwalkar  (MindYourDecisions, 2016-10-12).


(2021-07-05)   Euler Beta Function   (Euler, 1730)
Euler integral of the first kind:    B(x,y)  =  G(x) G (y) / G (x+y)

B(x.y)   =    ó 1
õ0
   tx-1 (1-t)y-1  dt

 Come back later, we're
 still working on this one...

Beta function   |   Veneziano amplitude (1968)


(2017-05-02)   Logarithmic Derivative  of the Gamma Function
It's known as the  Digamma function.  Symbol:  y  (Gauss' psi-function).

The name comes from the fact that the archaic letter  digamma  has been proposed as a symbol for it.  The symbol  y  (psi)  originally proposed by Gauss is now a  de facto  standard.

 Come back later, we're
 still working on this one...

The logarithmic derivative of the Gamma function   by   Howard E. Haber   (UCSC, Physics 116A, Winter 2011).
 
Wikipedia :   Digamma function   |   Trigamma function   |   Polygamma functions

border
border
visits since December 2, 2019
 (c) Copyright 2000-2021, Gerard P. Michon, Ph.D.