Gammafunction PDF
Gammafunction PDF
Abstract
An elementary introduction to the celebrated gamma function (x)
and its various representations. Some of its most important properties
are described.
1 Introduction
The gamma function was rst introduced by the Swiss mathematician Leon-
hard Euler (1707-1783) in his goal to generalize the factorial to non integer
values. Later, because of its great importance, it was studied by other eminent
mathematicians like Adrien-Marie Legendre (1752-1833), Carl Friedrich Gauss
(1777-1855), Christoph Gudermann (1798-1852), Joseph Liouville (1809-1882),
Karl Weierstrass (1815-1897), Charles Hermite (1822-1901), ... as well as many
others.
The gamma function belongs to the category of the special transcendental
functions and we will see that some famous mathematical constants are occur-
ring in its study.
It also appears in various area as asymptotic series, denite integration,
hypergeometric series, Riemann zeta function, number theory ...
Some of the historical background is due to Godefroys beautiful essay on
this function [9] and the more modern textbook [3] is a complete study.
1
By elementary changes of variables this historical denition takes the more
usual forms :
From this theorem, we see that the gamma function (x) (or the Eulerian
integral of the second kind ) is well dened and analytic for x > 0 (and more
generally for complex numbers x with positive real part).
The notation (x) is due to Legendre in 1809 [11] while Gauss expressed it
by (x) (which represents (x + 1)).
The derivatives can be deduced by dierentiating under the integral sign of
(2)
(x) = tx1 et log(t)dt,
0
(n)
(x) = tx1 et logn (t)dt.
0
(n + 1) = n!,
and its why the gamma function can be seen as an extension of the factorial
function to real non null positive numbers.
A natural question is to determine if the gamma function is the only solution
of the functional equation ? The answer is clearly no as may be seen if we
consider, for example, the functions cos(2mx)(x), where m is any non null
integer and which satisfy both (4) and (5). But the following result states that
under an additional condition the gamma function is the only solution of this
equation.
2
Theorem 3 (Bohr-Mollerup, 1922, [6]) There is a unique function f : ]0, +[
]0, +[ such as log(f (x)) is convex and
f (1) = 1,
f (x + 1) = xf (x).
Proof. An elementary one is given in [2].
Other conditions may also work as well, see again [2].
Its also possible to extend this function to negative values by inverting the
functional equation (which becomes a denition identity for 1 < x < 0)
(x + 1)
(x) = ,
x
and for example (1/2) = 2(1/2). Reiteration of this identity allows to
dene the gamma function on the whole real axis except on the negative integers
(0, 1, 2, ...). For any non null integer n, we have
(x + n)
(x) = x + n > 0. (6)
x(x + 1)...(x + n 1)
Suppose that x = n + h with h being small, then
(1 + h) (1)n
(x) = when h 0,
h(h 1)...(h n) n!h
so (x) possesses simple poles at the negative integers n with residue (1)n /n!
(see the plot of the function 2.1.1).
In fact, also by mean of relation (6), the gamma function can be dened in
the whole complex plane.
4
4 3 2 1 0 1 2 3 4
x
1
3
(x) function
Denition 4 (Euler, 1729 and Gauss, 1811) Let x > 0 and dene
p!px px
p (x) = = , (7)
x(x + 1)...(x + p) x(1 + x/1)...(1 + x/p)
then
(x) = lim p (x). (8)
p
(Check the existence of this limit). This approach, using an innite product,
was also chosen, in 1811, by Gauss in his study of the gamma function [8].
Clearly
p! p
p (1) = p= , and
1(1 + 1)...(1 + p) p+1
p!px+1 p
p (x + 1) = = xp (x),
(x + 1)...(x + p + 1) x+p+1
hence
(1) = 1,
(x + 1) = x(x).
entails
1 1 2 p ex(log(p)11/2...1/p) ex+x/2+...+x/p
p (x) = ... px = ,
xx+1x+2 x+p x(1 + x)(1 + x/2)...(1 + x/p)
1 ex ex/2 ex/p
p (x) = ex(log(p)11/2...1/p) .
x 1 + x 1 + x/2 1 + x/p
4
Now Eulers constant is dened by
1 1
= lim 1 + + ... + log(p) = 0.5772156649015328606...,
p 2 p
and therefore follows the Weierstrass form of the gamma function.
Theorem 5 (Weierstrass) For any real number x, except on the negative inte-
gers (0, 1, 2, ...), we have the innite product
1 x x x/p
= xe 1+ e . (9)
(x) p=1
p
From this product we see that Eulers constant is deeply related to the
gamma function and the poles are clearly the negative or null integers. Ac-
cording to Godefroy [9], Eulers constant plays in the gamma function theory a
similar role as in the circular functions theory.
Its possible to show that Weierstrass form is also valid for complex numbers.
(n) = (n 1)!
5
Up to 50 digits, the numerical values of some of those constants are :
(1/2) = 1.77245385090551602729816748334114518279754945612238...
(1/3) = 2.67893853470774763365569294097467764412868937795730...
.
(1/4) = 3.62560990822190831193068515586767200299516768288006...
(1/5) = 4.59084371199880305320475827592915200343410999829340...
For example, thanks to the very fast converging formula (which is based on the
expression (34) and uses the Arithmetic-Geometric Mean AGM, [7] )
(2)3/2
2 (1/4) = ,
AGM ( 2, 1)
this constant was computed to more than 50 millions digits by P. Sebah and M.
Tommila [10]. Similar formulae are available for other fractional arguments like
(1/3) ...
1 1 2 x x x x/p x x/p
= x e e 1+ e 1 e .
(x) (x) p=1
p p
But the functional equation gives (x) = (1 x)/x and the equality writes
as
1 x2
=x 1 2 ,
(x)(1 x) p=1
p
nally gives
(x)(1 x) = . (11)
sin x
Relation (11) is the complement (or reection) formula and is valid when x
and 1 x are not negative or null integers and it was discovered by Euler.
6
For example, if we apply this formula for the values x = 1/2, x = 1/3,
x = 1/4 we nd
1
= ,
2
1 2 2 3
= ,
3 3 3
1 3
= 2.
4 4
This theorem is the special case when n = 2 of the more general result known
as Gauss multiplication formula :
Theorem 7 (Gauss)
1 2 n1
(x) x + x+ ... x + = (2)(n1)/2 n1/2nx (nx)
n n n
Corollary 8 (Euler)
1 2 n1 (2)(n1)/2
... =
n n n n
7
4.3 Stirlings formula
Its of interest to study how the gamma function behaves when the argument x
becomes large. If we restrict the argument x to integral values n, the following
result, due to James Stirling (1692-1730) and Abraham de Moivre (1667-1754)
is famous and of great importance :
Proof. See [2] for a complete proof. You may obtain a weaker approxima-
tion by observing that the area under the curve log(x) with x [1, n] is well
approximated by the trapezoidal rule, therefore
n
log(x)dx = n log(n) n + 1
1
n1
log(k) + log(k + 1) 1
= + Rn = log((n 1)!) + log(n) + Rn
2 2
k=1
8
We now compare relations (14) and (15) when n becomes large. This gives after
some simplications and classical series expansions
a1 a2 1
n+1/2
a1 a2
1
1+ + 2 + ... = 1 + e 1+ + + ...
n n n n + 1 (n + 1)2
1 13 1
a1 a2 a1 + 12 12 a1 2a2 + a3 12
=1+ + + + ...
n n2 n3
and after the identication comes
1
a1 + = 0,
12
13 1
a1 2a2 = 0,
12 12
...
For example here are some approximations of the factorial using dierent
values for n :
5 Series expansion
To estimate the gamma function near a point its possible to use some series
expansions at this point. Before doing this we need to introduce a new function
which is related to the derivative of the gamma function.
9
the Weierstrass formula (9) we nd the basic relation
x x
log((x)) = log(x) + x + log 1 + . (17)
p=1
p p
5.1.1 Denition
Denition 11 The psi or digamma function denoted (x) is dened for any
non nul or negative integer by the logarithmic derivative of (x), that is :
d
(x) = (log((x))) .
dx
By dierentiating the series (17) we nd
(x) 1 1 1
(x) = = + ,
(x) x p=1 p x + p
1 1
= + x = 0, 1, 2, ... (18)
p=1
p x+p1
x1
= + x = 0, 1, 2, ...
p=1
p(x + p 1)
and those series are slowly converging for any non negative integer x.
5.1.2 Properties
Polygamma functions Now if we go on dierentiating relation (18) several
times, we nd
(x) (x) (x)
2
1
(x) = = , (19)
2 (x) p=1
(p + x 1)2
2
(x) = ,
p=1
(p + x 1)3
(1)n+1 n!
(n) (x) = , (20)
p=1
(p + x 1)n+1
10
Recurrence relations The structure of the series expansion (18) suggests
to study
1 1
(x + 1) (x) =
p=1
x+p1 x+p
which gives, just like for the gamma function, the recurrence formulae
1
(x + 1) = (x) + ,
x
1 1 1
(x + n) = (x) + + + ... + n 1,
x x+1 x+n1
and by dierentiating the rst of those relations we deduce
(1)n n!
n (x + 1) = n (x) + . (21)
xn+1
Theorem 12
(1 x) = (x) + cot x,
1 1 1
(2x) = (x) + x + + log(2).
2 2 2
Values at integer arguments From the relations (18) and (20) comes
(1) = ,
1 (1) = (2) = 2 /6,
2 (1) = 2(3),
n (1) = (1)n+1 n!(n + 1), (22)
where (k) is the classical Riemann zeta function. Using the recurrence rela-
tions (21) allow to compute those values for any other positive integer and, for
example, we have
n1
1
(n)
(n) = = + (23)
(n) p=1
p
= + Hn1 .
11
Values at rational arguments The value (1/2) can be computed directly
from (18) or from the psi duplication formula with x = 1/2 :
1 1 1
= 2 + 2 ,
2 p=1
2p 2p + 1
= 2 + 2 (1 log(2)) = 2 log(2).
From this aesthetic relation, we see that the computation of (p/q) for any
rational argument always involves the three fundamental mathematical con-
stants : , , log(2) !
12
5.1.5 Zeros of the digamma function
The zeros of the digamma function are the extrema of the gamma function.
From the two relations
(1) = < 0
(2) = 1 > 0,
and because (x) > 0, we see that the only positive zero x0 of the digamma
function is in ]1, 2[ and its rst 50 digits are :
x0 = 1.46163214496836234126265954232572132846819620400644...
(x0 ) = 0.88560319441088870027881590058258873320795153366990...,
it was rst computed by Gauss, Legendre [11] and given in [13]. On the negative
axis, the digamma function has a single zero between each consecutive negative
integers (the poles of the gamma function), the rst one up to 50 decimal places
are
x1 = 0.504083008264455409258269304533302498955385182368579...
x2 = 1.573498473162390458778286043690434612655040859116846...
x3 = 2.610720868444144650001537715718724207951074010873480...
x4 = 3.635293366436901097839181566946017713948423861193530...
x5 = 4.653237761743142441714598151148207363719069416133868...
4 3 2 1 0 1 2 3 4
x
1
13
(x) function (digamma)
Theorem 15
(1)k (k)
log((1 + x)) = x + xk , |x| < 1, (26)
k
k=2
(1)k ((k) 1)
log((1 + x)) = log(1 + x) ( 1)x + xk , |x| < 1.
k
k=2
(27)
Proof. Use the term by term integration of the Taylor series (24) and (25).
We may observe that the Riemann zeta function at integer values appears in
the series expansion of the logarithm of the gamma function. The convergence
of the series can be accelerated by computing
1 1 1+x ((2k + 1) 1) 2k+1
(log((1 + x)) log((1 x))) = log (1)x x ,
2 2 1x 2k + 1
k=2
14
6 Eulers constant and the gamma function
For x = 1 the formula (23) for (n) yields
(1) = (1) = 1 + H1 = ,
hence
2
(1) = et log2 (t)dt = 2 + .
0 6
We may go on like this and compute the Euler-Mascheroni integrals
1
(3) (1) = 3 2 2(3),
2
3 4
(4) (1) = 4 + 2 2 + 8(3) + ,
20
5 3 10
(5) (1) = 5 2 3 20(3) 2 4 24(5) (3) 2 ,
3 4 3
...
15
therefore
4 (k)
= log +2 (1)k k .
2 k
k=2
1
1 1
((2k + 1) 1) 1
log ((3/2)) = log log (3) ( 1) .
2 2 2 2 2k + 1 22k+1
k=1
16
We have obtained the beautiful formula
x1
t
(x)(x) = dt (29)
0 et 1
and, for example, for x = 2, (29) becomes
2 t
= t
dt.
6 0 e 1
There is another celebrated and most important functional equation between
those two functions, the Riemann zeta function functional equation :
Theorem 16 (Riemann, 1859) Let
s
(s) = s/2 (s),
2
an analytic function except at poles 0 and 1, then
(s) = (1 s).
Proof. Several proofs may be found in [15]. Euler demonstrated it for
integer values of s.
This equation allows to extend the denition of the Zeta function to negative
values of the arguments.
17
Theorem 18 Let (x) > 0 and (y) > 0, then
(x)(y)
B(x, y) = = B(y, x). (32)
(x + y)
Proof. We use the denite integral (3) and form the following product
2x1 u2 2
(x)(y) = 4 u e du v 2y1 ev dv
0 0
(u2 +v 2 ) 2x1 2y1
=4 e u v dudv,
0 0
we introduce the polar variables u = r cos , v = r sin so that
/2
2
(x)(y) = 4 er r2(x+y)1 cos2x1 sin2y1 drd
0 0
/2
2(x+y)1 r 2
=2 r e dr.2 cos2x1 sin2y1 d
0 0
= (x + y)B(y, x).
1 1
B , = ,
2 2
1 2 2 3
B , = ,
3 3 3
1 3
B , = 2,
4 4
B(x, 1 x) = ,
sin(x)
1
B(x, 1) = ,
x
(n 1)!
B(x, n) = n 1,
x.(x + 1)...(x + n 1)
(m 1)!(n 1)!
B(m, n) = m 1, n 1.
(m + n 1)!
18
8.2 Walliss integrals
For example the following integrals (Walliss integrals)
/2 /2
Wn = sinn d = cosn d,
0 0
may be computed by mean of the beta and gamma functions. Thanks to the
relation (31), we have
1 n+1 1
Wn = B , ,
2 2 2
and come naturally the two cases n = 2p + 1 and n = 2p. For the odd values of
the argument n :
1 1 (p + 1)(1/2) p!(1/2)
W2p+1 = B p + 1, = =
2 2 2(p + 3/2) (2p + 1)(p + 1/2)
and using formula (10) produces the well-known result
2p p! 4p p!2
W2p+1 = = .
1.3.5...(2p + 1) (2p + 1)!
The same method permits to compute the integrals for the even values
1 1 1 (p + 1/2)(1/2)
W2p = B p + , =
2 2 2 2(p + 1)
and nally
1.3.5...(2p 1) (2p)!
W2p = = p 2 .
2p+1 p! 4 p! 2
Observe that its easy to see that
1 n+2+1 1 1 n+1 1 (n + 1)/2 n+1
Wn+2 = B , = B + 1, = Wn = Wn
2 2 2 2 2 2 n/2 + 1 n+2
thanks to the beta function functional equation (33).
Its interesting to notice that
1 +1 1
W = B ,
2 2 2
also works for any real number > 1 and therefore we may deduce using (30)
and (31) that (respectively with = 1/2 and = 1/2)
/2 1
d 2dt 2 (1/4)
= = , (34)
sin 1t 4 2 2
0 0
/2 1
2t2 dt (2)3/2
sin d = = 2 .
0 0 1 t4 (1/4)
Consequently the product of those two integrals permits to derive the relation
due to Euler 1 1
dt t2 dt
= .
1 t 4 1 t 4 4
0 0
19
References
[1] M. Abramowitz and I. Stegun, Handbook of Mathematical Functions, Dover,
New York, (1964)
[2] G.E. Andrews, R. Askey and R. Roy, Special functions, Cambridge Univer-
sity Press, Cambridge, (1999)
[3] E. Artin, The Gamma Function, New York, Holt, Rinehart and Winston,
(1964)
[4] E.W. Barnes, The theory of the gamma function, Messenger Math. (2),
(1900), vol. 29, p. 64-128.
[5] J.P.M Binet, Journal ecole polyt., (1839), vol. 16, p. 131
[7] J.M. Borwein and I.J. Zucker, Elliptic integral evaluation of the Gamma
function at rational values of small denominator, IMA J. of Numer Anal-
ysis, (1992), vol. 12, p .519-526
[15] E.C. Titchmarsh, The theory of the Riemann Zeta-function, Oxford Science
publications, second edition, revised by D.R. Heath-Brown (1986)
20