[...] 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)
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.
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).
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
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).
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:
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)
(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!
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.
(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
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
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).
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).
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)
n! ~ (n/e)n
Ö
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:
n! ~ C (n/e)n
Ö
n
Then, solve for C the asymptotic equivalent
of the Wallis integral:
(2017-05-01) Asymptotic Expansion: The Stirling series diverges.
An important example of a divergentasymptotic expansion.
Asymptotic series for the Gamma function
( A001163 / A001164 )
G(z) ~
zz-½
(2p)½
[
1 +
1
+
1
-
139
-
571
ez
12 z
288 z2
51840 z3
2488320 z4
+
163879
+
5246819
-
534703531
209018880 z5
75246796800 z6
902961561600 z7
-
4483131259
+
432261921612371
86684309913600 z8
514904800886784000 z9
+
6232523202521089
-
25834629665134204969
86504006548979712000 z10
13494625021640835072000 z11
-
1579029138854919086429
+ ...
]
9716130015581401251840000 z12
The bracketed series is called Stirling's series.
It is a properasymptotic 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)
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.
(2021-07-12) Wallis integrals (Wallis, 1655)
A remarkable precursor to Euler's Beta function.
p! q!
=
ó 1 õ0
( 1 - t1/p ) q dt
(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.
(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.