The Gamma Function (Factorial Function)williamsgj.people.cofc.edu/Gamma Function.pdf · 524 Chapter...

29
Chapter 10 The Gamma Function (Factorial Function) The gamma function appears in physical problems of all kinds, such as the normalization of Coulomb wave functions and the computation of probabilities in statistical mechanics. Its importance stems from its usefulness in developing other functions that have direct physical application. The gamma function, therefore, is included here. A discussion of the numerical evaluation of the gamma function appears in Section 10.3. Closely related functions, such as the error integral, are presented in Section 10.4. 10.1 Definitions and Simple Properties At least three different, convenient definitions of the gamma function are in common use. Our first task is to state these definitions, to develop some simple, direct consequences, and to show the equivalence of the three forms. Infinite Limit (Euler) The first definition, due to Euler, is (z ) lim n→∞ 1 · 2 · 3 ··· n z(z + 1)(z + 2) ··· (z + n ) n z , z = 0, 1, 2, 3, .... (10.1) This definition of (z ) is useful in developing the Weierstrass infinite-product form of (z (z ) (Sec- tion 10.2). Here and elsewhere in this chapter, z may be either real or complex. 523

Transcript of The Gamma Function (Factorial Function)williamsgj.people.cofc.edu/Gamma Function.pdf · 524 Chapter...

Page 1: The Gamma Function (Factorial Function)williamsgj.people.cofc.edu/Gamma Function.pdf · 524 Chapter 10 The Gamma Function (Factorial Function) Replacing zwith z+1, we have (z+1) =

Chapter 10

The Gamma Function(Factorial Function)

The gamma function appears in physical problems of all kinds, such as thenormalization of Coulomb wave functions and the computation of probabilitiesin statistical mechanics. Its importance stems from its usefulness in developingother functions that have direct physical application. The gamma function,therefore, is included here. A discussion of the numerical evaluation of thegamma function appears in Section 10.3. Closely related functions, such as theerror integral, are presented in Section 10.4.

10.1 Definitions and Simple Properties

At least three different, convenient definitions of the gamma function are incommon use. Our first task is to state these definitions, to develop some simple,direct consequences, and to show the equivalence of the three forms.

Infinite Limit (Euler)

The first definition, due to Euler, is

�(z) ≡ limn→∞

1 · 2 · 3 · · · n

z(z + 1)(z + 2) · · · (z + n)nz, z �= 0, −1, −2, −3, . . . . (10.1)

This definition of �(z) is useful in developing the Weierstrass infinite-productform of �(z) [Eq. (10.17)] and in obtaining the derivative of ln �(z) (Sec-tion 10.2). Here and elsewhere in this chapter, z may be either real or complex.

523

Page 2: The Gamma Function (Factorial Function)williamsgj.people.cofc.edu/Gamma Function.pdf · 524 Chapter 10 The Gamma Function (Factorial Function) Replacing zwith z+1, we have (z+1) =

524 Chapter 10 The Gamma Function (Factorial Function)

Replacing z with z + 1, we have

�(z + 1) = limn→∞

1 · 2 · 3 · · · n

(z + 1)(z + 2)(z + 3) · · · (z + n + 1)nz+1

= limn→∞

nz

z + n + 1· 1 · 2 · 3 · · · n

z(z + 1)(z + 2) · · · (z + n)nz

= z�(z). (10.2)

This is the basic functional relation for the gamma function. It should be notedthat it is a difference equation. The gamma function is one of a general classof functions that do not satisfy any differential equation with rational coef-ficients. Specifically, the gamma function is one of the very few functions ofmathematical physics that does not satisfy any of the ordinary differentialequations (ODEs) common to physics. In fact, it does not satisfy any useful orpractical differential equation.

Also, from the definition

�(1) = limn→∞

1 · 2 · 3 · · · n

1 · 2 · 3 · · · n(n + 1)n = 1. (10.3)

Now, application of Eq. (10.2) gives

�(2) = 1,

�(3) = 2�(2) = 2, . . . (10.4)

�(n) = 1 · 2 · 3 · · · (n − 1) = (n − 1)!

We see that the gamma function interpolates the factorials by a continuousfunction that returns the factorials at integer arguments.

Definite Integral (Euler)

A second definition, also frequently called the Euler integral, is

�(z) ≡∫ ∞

0e−ttz−1dt, (z) > 0. (10.5)

The restriction on z is necessary to avoid divergence of the integral at t = 0.

When the gamma function does appear in physical problems, it is often in thisform or some variation, such as

�(z) = 2∫ ∞

0e−t2

t2z−1dt, (z) > 0 (10.6)

or

�(z) =∫ 1

0

[ln

(1t

)]z−1

dt, (z) > 0.

Page 3: The Gamma Function (Factorial Function)williamsgj.people.cofc.edu/Gamma Function.pdf · 524 Chapter 10 The Gamma Function (Factorial Function) Replacing zwith z+1, we have (z+1) =

10.1 Definitions and Simple Properties 525

EXAMPLE 10.1.1 The Euler Integral Interpolates the Factorials The Euler integral forpositive integer argument, z = n + 1 with n > 0, yields the factorials. Usingintegration by parts repeatedly we find

∫ ∞

0e−ttndt = −tne−t

∣∣∣∣∞

0+ n

∫ ∞

0e−ttn−1dt = n

∫ ∞

0e−ttn−1dt

= n

[−tn−1e−t

∣∣∣∣∞

0+ (n − 1)

∫ ∞

0e−ttn−2dt

]

= n(n − 1)∫ ∞

0e−ttn−2dt = · · · = n!

because∫ ∞

0 e−tdt = 1. Thus, the Euler integral also interpolates the factorials.■

When z = 12 , Eq. (10.6) contains the Gauss error integral, and we have the

interesting result

�(

12

) = √π. (10.7)

The value �(12 ) can be derived directly from the square of Eq. (10.6) for z = 1

2by introducing plane polar coordinates (x2 + y2 = ρ2, dx dy = ρ dρ dϕ) in theproduct of integrals

(12

)2

= 4∫ ∞

0

∫ ∞

0e−x2−y2

dx dy

= 4∫ π/2

ϕ=0

∫ ∞

ρ=0e−ρ2

ρ dρ dϕ = −πe−ρ2

∣∣∣∣∞

0= π.

Generalizations of Eq. (10.7), the Gaussian integrals, are∫ ∞

0x2s+1 exp(−ax2) dx = s!

2as+1, (10.8)

∫ ∞

0x2s exp(−ax2) dx = (s − 1

2 )!

2as+1/2= (2s − 1)!!

2s+1as

√π

a, (10.9)

which are of major importance in statistical mechanics. A proof is left to thereader in Exercise 10.1.11. The double factorial notation is explained in Exer-cise 5.2.12 and Eq. (10.33b).

To show the equivalence of the two definitions, Eqs. (10.1) and (10.5),consider the function of two variables

F(z, n) =∫ n

0

(1 − t

n

)n

tz−1 dt, (z) > 0, (10.10)

with n a positive integer. Since

limn→∞

(1 − t

n

)n

≡ e−t, (10.11)

Page 4: The Gamma Function (Factorial Function)williamsgj.people.cofc.edu/Gamma Function.pdf · 524 Chapter 10 The Gamma Function (Factorial Function) Replacing zwith z+1, we have (z+1) =

526 Chapter 10 The Gamma Function (Factorial Function)

from the definition of the exponential

limn→∞ F(z, n) = F(z, ∞) =

∫ ∞

0e−ttz−1dt ≡ �(z) (10.12)

by Eq. (10.5).Returning to F(z, n), we evaluate it in successive integrations by parts. For

convenience let u = t/n. Then

F(z, n) = nz

∫ 1

0(1 − u)nuz−1du. (10.13)

Integrating by parts, we obtain for (z) > 0,

F(z, n)nz

= (1 − u)n uz

z

∣∣∣∣1

0+ n

z

∫ 1

0(1 − u)n−1uzdu. (10.14)

Repeating this, with the integrated part vanishing at both end points eachtime, we finally get

F(z, n) = nz n(n − 1) · · · 1z(z + 1) · · · (z + n − 1)

∫ 1

0uz+n−1du

= 1 · 2 · 3 · · · n

z(z + 1)(z + 2) · · · (z + n)nz. (10.15)

This is identical to the expression on the right side of Eq. (10.1). Hence,

limn→∞ F(z, n) = F(z, ∞) ≡ �(z) (10.16)

by Eq. (10.1), completing the proof.Using the functional equation (10.2) we can extend �(z) from positive to

negative arguments. For example, starting with Eq. (10.2) we define

(−1

2

)= − 1

0.5�

(12

)= −2

√π ,

and Eq. (10.2) for z → 0 implies that �(z → 0) → ∞. Moreover, z�(z) → 1 forz → 0 [Eq. (10.2)] shows that �(z) has a simple pole at the origin. Similarly,we find simple poles of �(z) at all negative integers.

Infinite Product (Weierstrass)

The third definition (Weierstrass’s form) is

1�(z)

≡ zeγ z∞∏

n=1

(1 + z

n

)e−z/n, (10.17)

where γ is the Euler–Mascheroni constant [Eq. (5.27)]

γ = limn→∞

(n∑

m=1

1m

− ln n

)= 0.5772156 · · · . (10.18)

Page 5: The Gamma Function (Factorial Function)williamsgj.people.cofc.edu/Gamma Function.pdf · 524 Chapter 10 The Gamma Function (Factorial Function) Replacing zwith z+1, we have (z+1) =

10.1 Definitions and Simple Properties 527

This infinite product form may be used to develop the reflection identity,Eq. (10.24a), and applied in the exercises, such as Exercise 10.1.17. This formcan be derived from the original definition [Eq. (10.1)] by rewriting it as

�(z) = limn→∞

1 · 2 · 3 · · · n

z(z + 1) · · · (z + n)nz = lim

n→∞1z

n∏m=1

(1 + z

m

)−1

nz. (10.19)

Inverting Eq. (10.19) and using

n−z = e−z ln n, (10.20)

we obtain

1�(z)

= z limn→∞ e(− ln n)z

n∏m=1

(1 + z

m

). (10.21)

Multiplying and dividing by

exp[(

1 + 12

+ 13

+ · · · + 1n

)z

]=

n∏m=1

ez/m, (10.22)

we get

1�(z)

= z

{lim

n→∞ exp[(

1 + 12

+ 13

+ · · · + 1n

− ln n

)z

]}

×[

limn→∞

n∏m=1

(1 + z

m

)e−z/m

]. (10.23)

As shown in Section 5.2, the infinite series in the exponent converges anddefines γ , the Euler–Mascheroni constant. Hence, Eq. (10.17) follows.

The Weierstrass infinite product definition of �(z) leads directly to animportant identity,

�(z)�(1 − z) = π

sin zπ, (10.24a)

using the infinite product formulas for �(z), �(1 − z), and sin z [Eq. (7.60)].Alternatively, we can start from the product of Euler integrals

�(z + 1)�(1 − z) =∫ ∞

0sze−sds

∫ ∞

0t−ze−tdt

=∫ ∞

0vz dv

(v + 1)2

∫ ∞

0e−uudu = πz

sin πz,

transforming from the variables s, t to u = s + t, v = s/t, as suggested bycombining the exponentials and the powers in the integrands. The Jacobian is

J = −∣∣∣∣ 1 1

1t

− s

t2

∣∣∣∣ = s + t

t2= (v + 1)2

u,

where (v + 1)t = u. The integral∫ ∞

0 e−uudu = 1, whereas that over v maybe derived by contour integration, giving πz

sin πz. Similarly, one can establish

Page 6: The Gamma Function (Factorial Function)williamsgj.people.cofc.edu/Gamma Function.pdf · 524 Chapter 10 The Gamma Function (Factorial Function) Replacing zwith z+1, we have (z+1) =

528 Chapter 10 The Gamma Function (Factorial Function)

Legendre’s duplication formula

�(1 + z)�(z + 1

2

) = 2−2z√

π�(2z + 1).

Setting z = 12 in Eq. (10.24a), we obtain

�(

12

) = √π , (10.24b)

(taking the positive square root) in agreement with Eqs. (10.7) and (10.9).The Weierstrass definition shows immediately that �(z) has simple poles

at z = 0, −1, −2, −3, . . ., and that [�(z)]−1 has no poles in the finite complexplane, which means that �(z) has no zeros. This behavior may also be seen inEq. (10.24a), in which we note that π/(sin πz) is never equal to zero.

Actually, the infinite product definition of �(z) may be derived from theWeierstrass factorization theorem with the specification that [�(z)]−1 havesimple zeros at z = 0, −1, −2, −3, . . . . The Euler–Mascheroni constant is fixedby requiring �(1) = 1. See also the product expansions of entire functions inChapter 7.

In mathematical probability theory the gamma distribution (probabilitydensity) is given by

f (x) =

1βα�(α)

xα−1e−x/β , x > 0

0, x ≤ 0.

(10.25a)

The constant [βα�(α)]−1 is included so that the total (integrated) probabilitywill be unity. For x → E, kinetic energy, α → 3

2 and β → kT , Eq. (10.25a)yields the classical Maxwell–Boltzmann statistics.

Biographical Data

Weierstrass, Karl Theodor Wilhelm. Weierstrass, a German mathemati-cian, was born in 1815 in Ostenfelde, Germany, and died in 1897 in Berlin.He obtained a degree in mathematics in 1841 and studied Abel’s and Jacobi’swork on elliptical functions and extended their work on analytic functionswhile living as a schoolteacher. After being recognized as the father of mod-ern analysis, he became a professor at the University of Berlin and a memberof the Academy of Sciences in 1856.

Factorial Notation

So far, this discussion has been presented in terms of the classical notation.As pointed out by Jeffreys and others, the −1 of the z − 1 exponent in oursecond definition [Eq. (10.5)] is a continual nuisance. Accordingly, Eq. (10.5)is rewritten as ∫ ∞

0e−ttzdt ≡ z!, (z) > 1, (10.25b)

Page 7: The Gamma Function (Factorial Function)williamsgj.people.cofc.edu/Gamma Function.pdf · 524 Chapter 10 The Gamma Function (Factorial Function) Replacing zwith z+1, we have (z+1) =

10.1 Definitions and Simple Properties 529

to define a factorial function z!. Occasionally, we may even encounter Gauss’snotation,

∏(z), for the factorial function∏

(z) = z!. (10.26)

The � notation is due to Legendre. The factorial function of Eq. (10.25a) is,of course, related to the gamma function by

�(z) = (z − 1)!, or �(z + 1) = z!. (10.27)

If z = n, a positive integer [Eq. (10.4)] shows that

z! = n! = 1 · 2 · 3 · · · n, (10.28)

the familiar factorial. However, it should be noted that since z! is now definedby Eq. (10.25b) [or equivalently by Eq. (10.27)] the factorial function is no

longer limited to positive integral values of the argument (Fig. 10.1).The difference relation [Eq. (10.2)] becomes

(z − 1)! = z!z

. (10.29)

This shows immediately that

0! = 1 (10.30)

x !

5

4

3

2

1

–1

–2

–3

–4

–5

x

–1 1 2 3 4 5–3–5

Figure 10.1

The FactorialFunction---Extensionto NegativeArguments

Page 8: The Gamma Function (Factorial Function)williamsgj.people.cofc.edu/Gamma Function.pdf · 524 Chapter 10 The Gamma Function (Factorial Function) Replacing zwith z+1, we have (z+1) =

530 Chapter 10 The Gamma Function (Factorial Function)

6

5

4

3

2

1

0

–1.0

4.03.02.01.00–1.0

x!

x!d2

dx 2 ln (x!)

d2

dx 2 ln (x!)

d

dxln (x!)

d

dxln (x!)

x

Figure 10.2

The FactorialFunction and theFirst TwoDerivatives of ln(x!)

and

n! = ±∞ for n, a negative integer. (10.31)

In terms of the factorial, Eq. (10.24a) becomes

z!(−z)! = πz

sin πz(10.32)

because

�(z)�(1 − z) = (z − 1)!(1 − z − 1)! = (z − 1)!(−z)! = 1z

z!(−z)!.

By restricting ourselves to the real values of the argument, we find that x!defines the curve shown in Fig. 10.2. The minimum of the curve in Fig. 10.1 is

x! = (0.46163 · · ·)! = 0.88560 · · · . (10.33a)

Double Factorial Notation

In many problems of mathematical physics, particularly in connection withLegendre polynomials (Chapter 11), we encounter products of the odd positiveintegers and products of the even positive integers. For convenience, these aregiven special labels as double factorials:

1 · 3 · 5 · · · (2n + 1) = (2n + 1)!!

2 · 4 · 6 · · · (2n) = (2n)!!.(10.33b)

Clearly, these are related to the regular factorial functions by

(2n)!! = 2nn! and (2n + 1)!! = (2n + 1)!2nn!

. (10.33c)

Page 9: The Gamma Function (Factorial Function)williamsgj.people.cofc.edu/Gamma Function.pdf · 524 Chapter 10 The Gamma Function (Factorial Function) Replacing zwith z+1, we have (z+1) =

10.1 Definitions and Simple Properties 531

Integral Representation

An integral representation that is useful in developing asymptotic series forthe Bessel functions is ∫

C

e−zzνdz = (e2πiν − 1)ν!, (10.34)

where C is the contour shown in Fig. 10.3. This contour integral representationis only useful when ν is not an integer, z = 0 then being a branch point.Equation (10.34) may be verified for ν > −1 by deforming the contour asshown in Fig. 10.4. The integral from ∞ to ε > 0 in Fig. 10.4 yields −(ν!),placing the phase of z at 0. The integral from ε to ∞ (in the fourth quadrant)then yields e2πiνν!, the phase of z having increased to 2π . Since the circleof radius ε around the origin contributes nothing as ε → 0, when ν > −1,Eq. (10.34) follows.

It is often convenient to put this result into a more symmetrical form∫

C

e−z(−z)νdz = 2i sin(νπ)ν!, (10.35)

multiplying both sides of Eq. (10.34) by (−1)ν = e−πiν .

This analysis establishes Eqs. (10.34) and (10.35) for ν > −1. It is relativelysimple to extend the range to include all nonintegral ν. First, we note that theintegral exists for ν < −1, as long as we stay away from the origin. Second,integrating by parts we find that Eq. (10.35) yields the familiar difference re-lation [Eq. (10.29)]. If we take the difference relation to define the factorial

y

C

+∞x

Figure 10.3

Factorial FunctionContour

y

0

Cut line

+∞x

e

Figure 10.4

The Contour ofFig. 10.3 Deformed

Page 10: The Gamma Function (Factorial Function)williamsgj.people.cofc.edu/Gamma Function.pdf · 524 Chapter 10 The Gamma Function (Factorial Function) Replacing zwith z+1, we have (z+1) =

532 Chapter 10 The Gamma Function (Factorial Function)

function of ν < −1, then Eqs. (10.34) and (10.35) are verified for all ν (exceptnegative integers).

EXERCISES

10.1.1 Derive the recurrence relations

�(z + 1) = z�(z)

from the Euler integral [Eq. (10.5)]

�(z) =∫ ∞

0e−ttz−1dt.

10.1.2 In a power series solution for the Legendre functions of the secondkind, we encounter the expression

(n + 1)(n + 2)(n + 3) · · · (n + 2s − 1)(n + 2s)2 · 4 · 6 · 8 · · · (2s − 2)(2s) · (2n + 3)(2n + 5)(2n + 7) · · · (2n + 2s + 1)

,

in which s is a positive integer. Rewrite this expression in terms offactorials.

10.1.3 Show that

(s − n)!(2s − 2n)!

= (−1)n−s(2n − 2s)!(n − s)!

,

where s and nare integers with s < n. This result can be used to avoidnegative factorials such as in the series representations of the spher-ical Neumann functions and the Legendre functions of the secondkind.

10.1.4 Show that �(z) may be written

�(z) = 2∫ ∞

0e−t2

t2z−1dz, (z) > 0,

�(z) =∫ 1

0

[ln

(1t

)]z−1

dt, (z) > 0.

10.1.5 In a Maxwellian distribution the fraction of particles with speedbetween v and v + dv is

dN

N= 4π

(m

2πkT

)3/2

exp(

− mv2

2kT

)v2dv,

where N is the total number of particles. The average or expectationvalue of vn is defined as 〈vn〉 = N−1

∫vndN. Show that

〈vn〉 =(

2kT

m

)n/2 (n + 1

2

)!/

12

!.

Page 11: The Gamma Function (Factorial Function)williamsgj.people.cofc.edu/Gamma Function.pdf · 524 Chapter 10 The Gamma Function (Factorial Function) Replacing zwith z+1, we have (z+1) =

10.1 Definitions and Simple Properties 533

10.1.6 By transforming the integral into a gamma function, show that

−∫ 1

0xk ln x dx = 1

(k + 1)2, k > −1.

10.1.7 Show that ∫ ∞

0e−x4

dx =(

14

)!.

10.1.8 Show that

limx→0

(ax − 1)!(x − 1)!

= 1a

.

10.1.9 Locate the poles of �(z). Show that they are simple poles and deter-mine the residues.

10.1.10 Show that the equation x! = k, k �= 0, has an infinite number of realroots.

10.1.11 Show that

(a)∫ ∞

0x2s+1 exp(−ax2) dx = s!

2as+1.

(b)∫ ∞

0x2s exp(−ax2) dx = (s − 1

2 )!

2as+1/2= (2s − 1)!!

2s+1as

√π

a.

These Gaussian integrals are of major importance in statisticalmechanics.

10.1.12 (a) Develop recurrence relations for (2n)!! and for (2n + 1)!!.(b) Use these recurrence relations to calculate (or define) 0!! and

(−1)!!.

ANS. 0!! = 1, (−1)!! = 1.

10.1.13 For s a nonnegative integer, show that

(−2s − 1)!! = (−1)s

(2s − 1)!!= (−1)s2ss!

(2s)!.

10.1.14 Express the coefficient of the nth term of the expansion of (1 + x)1/2

(a) in terms of factorials of integers; and(b) in terms of the double factorial (!!) functions.

ANS. an = (−1)n+1 (2n − 3)!22n−2n!(n − 2)!

= (−1)n+1 (2n − 3)!!(2n)!!

, n = 2, 3, · · ·.

10.1.15 Express the coefficient of the nth term of the expansion of (1 + x)1/2

(a) in terms of the factorials of integers; and(b) in terms of the double factorial (!!) functions.

ANS. an = (−1)n (2n)!22n(n!)2

= (−1)n (2n − 1)!!(2n)!!

, n = 1, 2, 3 · · ·.

Page 12: The Gamma Function (Factorial Function)williamsgj.people.cofc.edu/Gamma Function.pdf · 524 Chapter 10 The Gamma Function (Factorial Function) Replacing zwith z+1, we have (z+1) =

534 Chapter 10 The Gamma Function (Factorial Function)

10.1.16 The Legendre polynomial may be written as

Pn(cos θ) = 2(2n − 1)!!

(2n)!!

{cos nθ + 1

1· n

2n − 1cos(n − 2)θ

+ 1 · 31 · 2

n(n − 1)(2n − 1)(2n − 3)

cos(n − 4)θ

+ 1 · 3 · 51 · 2 · 3

n(n − 1)(n − 2)(2n − 1)(2n − 3)(2n − 5)

cos(n − 6)θ + · · ·}

.

Let n = 2s + 1. Then

Pn(cos θ) = P2s+1(cos θ) =s∑

m=0

am cos(2m+ 1)θ.

Find am in terms of factorials and double factorials.

10.1.17 (a) Show that

(12

− n

)�

(12

+ n

)= (−1)nπ,

where n is an integer.(b) Express �(1

2 + n) and �(12 − n) separately in terms of π1/2 and a

!! function.

ANS. �

(12

+ n

)= (2n − 1)!!

2nπ1/2.

10.1.18 From one of the definitions of the factorial or gamma function, showthat

|(ix)!|2 = πx

sinh πx.

10.1.19 Prove that

|�(α + iβ)| = |�(α)|∞∏

n=0

[1 + β2

(α + n)2

]−1/2

.

This equation has been useful in calculations of beta decay theory.

10.1.20 Show that

|(n + ib)!| =(

πb

sinh πb

)1/2 n∏s=1

(s2 + b2)1/2

for n, a positive integer.

10.1.21 Show that

|x!| ≥ |(x + iy)!|for all x. The variables x and y are real.

10.1.22 Show that ∣∣∣∣(

− 12

+ iy

)!

∣∣∣∣2

= π

cosh πy.

Page 13: The Gamma Function (Factorial Function)williamsgj.people.cofc.edu/Gamma Function.pdf · 524 Chapter 10 The Gamma Function (Factorial Function) Replacing zwith z+1, we have (z+1) =

10.2 Digamma and Polygamma Functions 535

10.1.23 The probability density associated with the normal distribution ofstatistics is given by

f (x) = 1σ (2π)1/2

exp[

− (x − µ)2

2σ 2

]

with (−∞, ∞) for the range of x. Show that(a) the mean value of x, 〈x〉 is equal to µ; and(b) the standard deviation (〈x2〉 − 〈x〉2)1/2 is given by σ .

10.1.24 From the gamma distribution

f (x) =

1βα�(α)

xα−1e−x/β , x > 0

0, x ≤ 0,

show that(a) 〈x〉 (mean) = αβ, (b) σ 2 (variance) ≡ 〈x2〉 − 〈x〉2 = αβ2.

10.1.25 The wave function of a particle scattered by a Coulomb potential isψ(r, θ). At the origin the wave function becomes

ψ(0) = e−πγ/2�(1 + iγ ),

where γ = Z1 Z2e2/hv. Show that

|ψ(0)|2 = 2πγ

e2πγ − 1.

10.1.26 Derive the contour integral representation of Eq. (10.34)

(2i)ν! sin νπ =∫

C

e−z(−z)νdz.

10.2 Digamma and Polygamma Functions

Digamma Function

As may be noted from the definitions in Section 10.1, it is inconvenient to dealwith the derivatives of the gamma or factorial function directly. Instead, it iscustomary to take the natural logarithm of the factorial function [Eq. (10.1)],convert the product to a sum, and then differentiate; that is, we start from

z! = z�(z) = limn→∞

n!(z + 1)(z + 2) · · · (z + n)

nz. (10.36)

Then, because the logarithm of the limit is equal to the limit of the logarithm,we have

ln(z!) = limn→∞[ln(n!) + z ln n − ln(z + 1)

− ln(z + 2) − · · · − ln(z + n)]. (10.37)

Page 14: The Gamma Function (Factorial Function)williamsgj.people.cofc.edu/Gamma Function.pdf · 524 Chapter 10 The Gamma Function (Factorial Function) Replacing zwith z+1, we have (z+1) =

536 Chapter 10 The Gamma Function (Factorial Function)

Differentiating with respect to z, we obtain and define

d

dzln(z!) ≡ ψ(z + 1) = lim

n→∞

(ln n − 1

z + 1− 1

z + 2− · · · − 1

z + n

), (10.38)

which defines ψ(z + 1), the digamma function. From the definition of theEuler–Mascheroni constant,1 Eq. (10.38) may be rewritten as

ψ(z + 1) = −γ −∞∑

n=1

(1

z + n− 1

n

)

= −γ +∞∑

n=1

z

n(n + z). (10.39)

Clearly,

ψ(1) = −γ = −0.577 215 664 901 · · · .2 (10.40)

Another, even more useful, expression for ψ(z) is derived in Section 10.3.

Polygamma Function

The digamma function may be differentiated repeatedly, giving rise to thepolygamma function:

ψ (m)(z + 1) ≡ dm+1

dzm+1ln(z!)

= (−1)m+1m!∞∑

n=1

1(z + n)m+1

, m = 1, 2, 3, . . . . (10.41)

A plot of ψ(x + 1) and ψ ′(x + 1) is included in Fig. 10.2. Since the series inEq. (10.41) defines the Riemann zeta function,3 when z is set to zero,

ζ(m) ≡∞∑

n=1

1nm

, (10.42)

we have

ψ (m)(1) = (−1)m+1m!ζ(m+ 1), m = 1, 2, 3, . . . . (10.43)

The values of the polygamma functions of positive integral argument, ψ (m)(n),may be calculated using Exercise 10.2.6.

In terms of the more common � notation,

d n+1

dzn+1ln �(z) = d n

dznψ(z) = ψ (n)(z). (10.44a)

1Compare Section 5.2, Eq. (5.27). We add and subtract∑n

s=1 s−1.2γ has been computed to 1271 places by D. E. Knuth, Math. Comput. 16, 275 (1962) and to 3566decimal places by D. W. Sweeney, Math. Comput. 17, 170 (1963). It may be of interest that thefraction 228/395 gives γ accurate to six places.3See Chapter 5. For z �= 0 this series may be used to define a generalized zeta function.

Page 15: The Gamma Function (Factorial Function)williamsgj.people.cofc.edu/Gamma Function.pdf · 524 Chapter 10 The Gamma Function (Factorial Function) Replacing zwith z+1, we have (z+1) =

10.2 Digamma and Polygamma Functions 537

Maclaurin Expansion, Computation

It is now possible to write a Maclaurin expansion for ln(z!):

ln(z!) =∞∑

n=1

zn

n!ψ (n−1)(1) = −γ z +

∞∑n=2

(−1)n zn

nζ(n) (10.44b)

convergent for |z| < 1; for z = x, the range is −1 < x ≤ 1. Equation (10.44b)is a possible means of computing z! for real or complex z, but Stirling’s series(Section 10.3) is usually better. In addition, an excellent table of values of thegamma function for complex arguments based on the use of Stirling’s seriesand the recurrence relation [Eq. (10.29)] is available4 and can be accessed bysymbolic software, such as Mathematica, Maple, Mathcad, and Reduce.

Series Summation

The digamma and polygamma functions may also be used in summing series.If the general term of the series has the form of a rational fraction (with thehighest power of the index in the numerator at least two less than the highestpower of the index in the denominator), it may be transformed by the methodof partial fractions. The infinite series may then be expressed as a finite sum ofdigamma and polygamma functions. The usefulness of this method dependson the availability of tables of digamma and polygamma functions. Such tablesand examples of series summation are given in AMS-55, Chapter 6.

EXAMPLE 10.2.1 Catalan’s Constant Catalan’s constant, Exercise 5.2.13, or β(2), is given by

K = β(2) =∞∑

k=0

(−1)k

(2k + 1)2. (10.44c)

Grouping the positive and negative terms separately and starting with unitindex [to match the form of ψ (2); Eq. (10.41)], we obtain

K = 1 +∞∑

n=1

1(4n + 1)2

− 19

−∞∑

n=1

1(4n + 3)2

.

Now, quoting Eq. (10.41), we get

K = 89 + 1

16ψ (1)(1 + 1

4

) − 116ψ (1)

(1 + 3

4

). (10.44d)

Using the values of ψ (1) from Table 6.1 of AMS-55, we obtain

K = 0.91596559 . . . .

Compare this calculation of Catalan’s constant with the calculations ofChapter 5, using either direct summation by computer or a modification usingRiemann zeta functions and then a (shorter) computer code. ■

4Table of the Gamma Function for Complex Arguments, Applied Mathematics Series No. 34.National Bureau of Standards, Washington, DC (1954).

Page 16: The Gamma Function (Factorial Function)williamsgj.people.cofc.edu/Gamma Function.pdf · 524 Chapter 10 The Gamma Function (Factorial Function) Replacing zwith z+1, we have (z+1) =

538 Chapter 10 The Gamma Function (Factorial Function)

EXERCISES

10.2.1 Verify that the following two forms of the digamma function,

ψ(x + 1) =x∑

r=1

1r

− γ

and

ψ(x + 1) =∞∑

r=1

x

r(r + x)− γ ,

are equal to each other (for x a positive integer).

10.2.2 Show that ψ(z + 1) has the series expansion

ψ(z + 1) = −γ +∞∑

n=2

(−1)nζ(n)zn−1.

10.2.3 For a power series expansion of ln(z!), AMS-55 lists

ln(z!) = − ln(1 + z) + z(1 − γ ) +∞∑

n=2

(−1)n[ζ(n) − 1]zn/n.

(a) Show that this agrees with Eq. (10.44b) for |z| < 1.(b) What is the range of convergence of this new expression?

10.2.4 Show that

12

ln(

πz

sin πz

)=

∞∑n=1

ζ(2n)2n

z2n, |z| < 1.

Hint. Try Eq. (10.32).

10.2.5 Write out a Weierstrass infinite product definition of z!. Without dif-ferentiating, show that this leads directly to the Maclaurin expansionof ln(z!) [Eq. (10.44b)].

10.2.6 Derive the difference relation for the polygamma function

ψ (m)(z + 2) = ψ (m)(z + 1) + (−1)m m!(z + 1)m+1

, m = 0, 1, 2, . . . .

10.2.7 Show that if

�(x + iy) = u + iv

then

�(x − iy) = u − iv.

This is a special case of the Schwarz reflection principle (Section 6.5).

10.2.8 The Pochhammer symbol (a)n is defined as

(a)n = a(a + 1) · · · (a + n − 1), (a)0 = 1

(for integral n).

Page 17: The Gamma Function (Factorial Function)williamsgj.people.cofc.edu/Gamma Function.pdf · 524 Chapter 10 The Gamma Function (Factorial Function) Replacing zwith z+1, we have (z+1) =

10.2 Digamma and Polygamma Functions 539

(a) Express (a)n in terms of factorials.(b) Find (d/da)(a)n in terms of (a)n and digamma functions.

ANS.d

da(a)n = (a)n[4(a + n) − 4(a)].

(c) Show that

(a)n+k = (a + n)k · (a)n.

10.2.9 Verify the following special values of the ψ form of the di- and poly-gamma functions:

ψ(1) = −γ , ψ (1)(1) = ζ(2), ψ (2)(1) = −2ζ(3).

10.2.10 Derive the polygamma function recurrence relation

ψ (m)(1 + z) = ψ (m)(z) + (−1)mm!/zm+1, m = 0, 1, 2, . . . .

10.2.11 Verify

(a)∫ ∞

0e−r ln r dr = −γ .

(b)∫ ∞

0re−r ln r dr = 1 − γ .

(c)∫ ∞

0rne−r ln r dr = (n−1)! + n

∫ ∞

0r n−1e−r ln r dr, n = 1, 2, 3, . . . .

Hint. These may be verified by integration by parts, three parts, ordifferentiating the integral form of n! with respect to n.

10.2.12 Dirac relativistic wave functions for hydrogen involve factors such as[2(1 − α2 Z2)1/2]!, where α, the fine structure constant, is 1

137 , and Z isthe atomic number. Expand [2(1 − α2 Z2)1/2]! in a series of powers ofα2 Z2.

10.2.13 The quantum mechanical description of a particle in a Coulomb fieldrequires a knowledge of the phase of the complex factorial function.Determine the phase of (1 + ib)! for small b.

10.2.14 The total energy radiated by a black body is given by

u = 8πk4T4

c3h3

∫ ∞

0

x3

ex − 1dx.

Show that the integral in this expression is equal to 3!ζ(4) [ζ(4) =π4/90 = 1.0823 . . .]. The final result is the Stefan–Boltzmann law.

10.2.15 As a generalization of the result in Exercise 10.2.14, show that∫ ∞

0

xsdx

ex − 1= s!ζ(s + 1), (s) > 0.

10.2.16 The neutrino energy density (Fermi distribution) in the early historyof the universe is given by

ρν = 4π

h3

∫ ∞

0

x3

exp(x/kT) + 1dx.

Page 18: The Gamma Function (Factorial Function)williamsgj.people.cofc.edu/Gamma Function.pdf · 524 Chapter 10 The Gamma Function (Factorial Function) Replacing zwith z+1, we have (z+1) =

540 Chapter 10 The Gamma Function (Factorial Function)

Show that

ρν = 7π5

30h3(kT)4.

10.2.17 Prove that ∫ ∞

0

xsdx

ex + 1= s!(1 − 2−s)ζ(s + 1), (s) > 0.

Exercises 10.2.15 and 10.2.17 actually constitute Mellin integral trans-forms.

10.2.18 Prove that

ψ (n)(z) = (−1)n+1∫ ∞

0

tne−zt

1 − e−tdt, (z) > 0.

10.2.19 Using di- and polygamma functions sum the series

(a)∞∑

n=1

1n(n + 1)

, (b)∞∑

n= 2

1n2 − 1

.

Note. You can use Exercise 10.2.6 to calculate the needed digammafunctions.

10.2.20 Show that∞∑

n=1

1(n + a)(n + b)

= 1(b − a)

{ψ(a + 1) − ψ(a + 1)},

a �= b, and neither a nor b is a negative integer. It is of interest tocompare this summation with the corresponding integral∫ ∞

1

dx

(x + a)(x + b)= 1

b − a{ln(1 + b) − ln(1 + a)}.

10.3 Stirling’s Series

For computation of ln(z!) for very large z (statistical mechanics) and fornumerical computations at nonintegral values of z, a series expansion of ln(z!)in negative powers of z is desirable. Perhaps the most elegant way of deriv-ing such an expansion is by the method of steepest descents (Section 7.3).The following method, starting with a numerical integration formula, does notrequire knowledge of contour integration and is particularly direct.

Derivation from Euler--Maclaurin Integration Formula

The Euler–Maclaurin formula (Section 5.9) for evaluating a definite integral5

is ∫ n

0f (x) dx = 1

2 f (0) + f (1) + f (2) + · · · + 12 f (n)

− b2[ f ′(n) − f ′(0)] − b4[ f ′′′(n) − f ′′′(0)] − · · · , (10.45)

5This is obtained by repeated integration by parts.

Page 19: The Gamma Function (Factorial Function)williamsgj.people.cofc.edu/Gamma Function.pdf · 524 Chapter 10 The Gamma Function (Factorial Function) Replacing zwith z+1, we have (z+1) =

10.3 Stirling’s Series 541

in which the b2n are related to the Bernoulli numbers B2n by

(2n)!b2n = B2n, (10.46)

B0 = 1, B6 = 142 ,

B2 = 16 , B8 = − 1

30 ,

B4 = − 130 , B10 = 5

66 , and so on.

(10.47)

By applying Eq. (10.45) to the elementary definite integral∫ ∞

0

dx

(z + x)2= 1

z, f (x) = 1

(z + x)2, (10.48)

(for z not on the negative real axis), we obtain for n → ∞,

1z

= 12z2

+ ψ (1)(z + 1) − 2!b2

z3− 4!b4

z5− · · · . (10.49)

This is the reason for using Eq. (10.48). The Euler–Maclaurin evaluation yieldsψ ′(z + 1), which is d2 ln(z!)/dz2 = ∑∞

n=11

(z+n)2 from Eq. (10.41).Using Eq. (10.46) and solving for ψ (1)(z + 1), we have

ψ ′(z + 1) = d

dzψ(z + 1) = 1

z− 1

2z2+ B2

z3+ B4

z5+ · · ·

= 1z

− 12z2

+∞∑

n=1

B2n

z2n+1. (10.50)

Since the Bernoulli numbers diverge strongly, this series does not converge.It is a semiconvergent or asymptotic series (Section 5.10), in which the sumalways has a finite number of terms (compare Section 5.10).

Integrating once, we get the digamma function

ψ(z + 1) = C1 + ln z + 12z

− B2

2z2− B4

4z4− · · ·

= C1 + ln z + 12z

−∞∑

n=1

B2n

2nz2n. (10.51)

Integrating Eq. (10.51) with respect to z from z − 1 to z and then letting z

approach infinity, C1, the constant of integration may be shown to vanish. Thisgives us a second expression for the digamma function, often more useful thanEq. (10.39).

Stirling’s Series

The indefinite integral of the digamma function [Eq. (10.51)] is

ln(z!) = C2 +(

z + 12

)ln z − z + B2

2z+ · · · + B2n

2n(2n − 1)z2n−1+ · · · , (10.52)

Page 20: The Gamma Function (Factorial Function)williamsgj.people.cofc.edu/Gamma Function.pdf · 524 Chapter 10 The Gamma Function (Factorial Function) Replacing zwith z+1, we have (z+1) =

542 Chapter 10 The Gamma Function (Factorial Function)

1.02

1.00

0.99

0.98

0.97

0.96

0.95

0.94

0.93

0.929

s87654321

0.83%low

2p ss+1/2 e–s

s!

s!

2p ss+1/2 e–s 1 + 112s

Figure 10.5

Accuracy ofStirling’s Formula

in which C2 is another constant of integration. To fix C2, we start from theasymptotic formula [Eq. (7.89) from Example 7.3.2]

z! ∼√

2πzz+1/2e−z.

This gives for large enough |z|ln(z!) ∼ 1

2 ln 2π + (z + 1/2) ln z − z, (10.53)

and comparing with Eq. (10.52), we find that C2 is

C2 = 12 ln 2π, (10.54)

giving for |z| → ∞

ln(z!) = 12

ln 2π +(

z + 12

)ln z − z + 1

12z− 1

360z3+ 1

1260z5− · · · . (10.55)

This is Stirling’s series, an asymptotic expansion. The absolute value of theerror is less than the absolute value of the first term neglected. For largeenough |z|, the simplest approximation ln(z!) ∼ z ln z − z may be sufficient.

To help convey a sense of the remarkable precision of Stirling’s series for s!,the ratio of the first term of Stirling’s approximation to s! is plotted in Fig. 10.5.A tabulation gives the ratio of the first term in the expansion to s! and the ratioof the first two terms in the expansion to s! (Table 10.1). The derivation ofthese forms is Exercise 10.3.1.

Numerical Computation

The possibility of using the Maclaurin expansion [Eq. (10.44b)] for the numer-ical evaluation of the factorial function is mentioned in Section 10.2. How-ever, for large x, Stirling’s series [Eq. (10.55)] gives much more accuracy. The

Page 21: The Gamma Function (Factorial Function)williamsgj.people.cofc.edu/Gamma Function.pdf · 524 Chapter 10 The Gamma Function (Factorial Function) Replacing zwith z+1, we have (z+1) =

10.3 Stirling’s Series 543

Table 10.1

Stirling’s FormulaCompared with Stirling’sSeries for n = 2

s1

s!

√2πss+1/2e−s 1

s!

√2πss+1/2e−s

(1 +

1

12s

)

1 0.92213 0.998982 0.95950 0.999493 0.97270 0.999724 0.97942 0.999835 0.98349 0.999886 0.98621 0.999927 0.98817 0.999948 0.98964 0.999959 0.99078 0.9999610 0.99170 0.99998

Table of the Gamma Function for Complex Arguments, Applied MathematicsSeries No. 34, National Bureau of Standards, is based on the use of Stirling’sseries for z = x+ iy, 9 ≤ x ≤ 10. Lower values of x are reached with the recur-rence relation [Eq. (10.29)]. Now suppose the numerical value of x! is neededfor some particular value of x in a computer code. How shall we instruct thecomputer to do x!? Stirling’s series followed by the recurrence relation is agood possibility. An even better possibility is to fit x!, 0 ≤ x ≤ 1, by a shortpower series (polynomial) and then calculate x! directly from this empiricalfit. Presumably, the computer has been told the values of the coefficients ofthe polynomial. Such polynomial fits have been made by Hastings6 for variousaccuracy requirements. For example,

x! = 1 +8∑

n=1

bnxn + ε(x), (10.56a)

withb1 = −0.57719 1652 b5 = −0.75670 4078

b2 = 0.98820 5891 b6 = 0.48219 9394

b3 = −0.89705 6937 b7 = −0.19352 7818

b4 = 0.91820 6857 b8 = 0.03586 8343

(10.56b)

with the magnitude of the error |ε(x)| < 3 × 10−7, 0 ≤ x ≤ 1.This is not a least-squares fit. Hastings employed a Chebyshev polynomial

technique to minimize the maximum value of |ε(x)| in Eq. (10.56a).

SUMMARY The Euler integral

n! =∫ ∞

0e−ttndt = �(n + 1), n = 0, 1, . . .

gives the most direct entry to the gamma function. The functional equation�(z+ 1) = z�(z) is its characteristic property that leads to the infinite productrepresentation of its inverse, an entire function, and to the pole expansion

6Hastings, C., Jr. (1955). Approximations for Digital Computers. Princeton Univ. Press, Prince-ton, NJ.

Page 22: The Gamma Function (Factorial Function)williamsgj.people.cofc.edu/Gamma Function.pdf · 524 Chapter 10 The Gamma Function (Factorial Function) Replacing zwith z+1, we have (z+1) =

544 Chapter 10 The Gamma Function (Factorial Function)

of its logarithmic derivative, a meromorphic function. The asymptotic expan-sion, known as Stirling’s series, is widely applied in statistical mechanics andleads to similar asymptotic expansions for the error integral and other relatedfunctions.

EXERCISES

10.3.1 Rewrite Stirling’s series to give z! instead of ln(z!).

ANS. z! =√

2πzz+1/2e−z

(1 + 1

12z+ 1

288z2− 139

51840z3+ · · ·

).

10.3.2 Use Stirling’s formula to estimate 52!, the number of possible rear-rangements of cards in a standard deck of playing cards.

10.3.3 By integrating Eq. (10.51) from z − 1 to z and then letting z → ∞,evaluate the constant C1 in the asymptotic series for the digammafunction ψ(z + 1).

10.3.4 Show that the constant C2 in Stirling’s formula Eq. (10.52) equals12 ln 2π by using the logarithm of the doubling formula.

10.3.5 By direct expansion verify the doubling formula for z = n+ 12 ; n is an

integer.

10.3.6 Without using Stirling’s series show that

(a) ln(n!) <

∫ n+1

1ln x dx, (b) ln(n!) >

∫ n

1ln x dx; n is an integer ≥ 2.

Notice that the arithmetic mean of these two integrals gives a goodapproximation for Stirling’s series.

10.3.7 Test for convergence

∞∑p=0

[(p − 1

2 )!

p!

]2

· 2p + 12p + 2

= π

∞∑p=0

(2p − 1)!!(2p + 1)!!(2p)!!(2p + 2)!!

.

This series arises in an attempt to describe the magnetic field createdby and enclosed by a current loop.

10.3.8 Show that

limx→∞ xb−a (x + a)!

(x + b)!= 1.

10.3.9 Show that

limn→∞

(2n − 1)!!(2n)!!

n1/2 = π−1/2.

10.3.10 Calculate the binomial coefficient (2n

n) = (2n)!

n!n! (see Chapter 5) to sixsignificant figures for n = 10, 20, and 30. Check your values by(a) a Stirling series approximation through terms in n−1; and(b) a double precision calculation.

Page 23: The Gamma Function (Factorial Function)williamsgj.people.cofc.edu/Gamma Function.pdf · 524 Chapter 10 The Gamma Function (Factorial Function) Replacing zwith z+1, we have (z+1) =

10.4 The Incomplete Gamma Functions and Related Functions 545

ANS . (2010 ) = 1.84756 ×105, (40

20 ) = 1.37846 ×1011, (6030 ) = 1.18264 ×1017.

10.3.11 Truncate the Stirling formula for ln n! so that the error is less than 10%for n > 1, <1% for n > 10, and <0.1% for n > 100.

10.3.12 Derive d

dzln �(z) ∼ ln z − 1

2zfrom Stirling’s formula.

10.4 The Incomplete Gamma Functions and Related Functions

Generalizing the Euler definition of the gamma function [Eq. (10.5)], we definethe incomplete gamma functions by the variable limit integrals

γ (a, x) =∫ x

0e−tta−1dt, (a) > 0 (10.57)

and

�(a, x) =∫ ∞

x

e−tta−1dt. (10.58)

Clearly, the two functions are related because

γ (a, x) + �(a, x) = �(a). (10.59)

These functions are useful for the error integrals discussed later. The choice ofemploying γ (a, x) or �(a, x) is purely a matter of convenience. If the parametera is a positive integer, Eq. (10.58) may be integrated completely to yield

γ (n, x) = (n − 1)!

(1 − e−x

n−1∑s=0

xs

s!

)

�(n, x) = (n − 1)!e−xn−1∑s=0

xs

s!, n = 1, 2, . . . .

(10.60)

For nonintegral a, a power series expansion of γ (a, x) for small x and anasymptotic expansion of �(a, x) are developed in terms of the error functionin Section 5.10 [see also Eq. (10.70b)]:

γ (a, x) = xa∞∑

n= 0

(−1)n xn

n!(a + n),

�(a, x) = xa−1e−x∞∑

n= 0

(a − 1)!(a − 1 − n)!

· 1xn

(10.61)

= xa−1e−x∞∑

n= 0

(−1)n (n − a)!(−a)!

· 1xn

.

These incomplete gamma functions may also be expressed elegantly in termsof confluent hypergeometric functions.

Page 24: The Gamma Function (Factorial Function)williamsgj.people.cofc.edu/Gamma Function.pdf · 524 Chapter 10 The Gamma Function (Factorial Function) Replacing zwith z+1, we have (z+1) =

546 Chapter 10 The Gamma Function (Factorial Function)

E1(x)

x0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6

3

2

1

Figure 10.6

The ExponentialIntegral,E1(x) = −Ei(−x)

Exponential Integral

Although the incomplete gamma function �(a, x) in its general form [Eq.(10.61)] is only infrequently encountered in physical problems, a special caseis very useful. We define the exponential integral by7

−Ei(−x) ≡∫ ∞

x

e−t

tdt = E1(x) (10.62)

(Fig. 10.6). To obtain a series expansion for small x, we start from

E1(x) = �(0, x) = lima→0

[�(a) − γ (a, x)]. (10.63)

Caution is needed here because the integral in Eq. (10.62) diverges logarith-mically as x → 0. We may split the divergent term in the series expansion forγ (a, x),

E1(x) = lima→0

[a�(a) − xa

a

]−

∞∑n=1

(−1)nxn

n · n!. (10.64a)

Using l’Hopital’s rule (Exercise 5.6.7) and

d

da{a�(a)} = d

daa! = d

daeln(a!) = a!ψ(a + 1), (10.64b)

and then Eq. (10.39),8 we obtain the rapidly converging series

E1(x) = −γ − ln x −∞∑

n=1

(−1)nxn

n · n!(10.65)

(Fig. 10.6). An asymptotic expansion is given in Section 5.10.

7The appearance of the two minus signs in −Ei(−x) is an historical monstrosity. This integral isgenerally referred to as E1(x).8dxa/da = xa ln x.

Page 25: The Gamma Function (Factorial Function)williamsgj.people.cofc.edu/Gamma Function.pdf · 524 Chapter 10 The Gamma Function (Factorial Function) Replacing zwith z+1, we have (z+1) =

10.4 The Incomplete Gamma Functions and Related Functions 547

x

1.0

–1.0

Ci(x)

si(x)

10

Figure 10.7

Sine and CosineIntegrals

Further special forms related to the exponential integral are the sine inte-gral, cosine integral (Fig. 10.7), and logarithmic integral defined by9

si(x) = −∫ ∞

x

sin t

tdt

Ci(x) = −∫ ∞

x

cos t

tdt (10.66)

li(x) =∫ x

0

du

ln u= Ei(ln x).

By transforming from real to imaginary argument, we can show that

si(x) = 12i

[Ei(ix) − Ei(−ix)] = 12i

[E1(ix) − E1(−ix)], (10.67)

whereas

Ci(x) = 12

[Ei(ix) + Ei(−ix)] = −12

[E1(ix) + E1(−ix)], |arg x| <π

2.

(10.68)

Adding these two relations, we obtain

Ei(ix) = Ci(x) + i si(x) (10.69)

to show that the relation among these integrals is exactly analogous to thatamong eix, cos x, and sin x. In terms of E1,

E1(ix) = −Ci(x) + i si(x).

Asymptotic expansions of Ci(x) and si(x) may be developed similar to thosefor the error functions in Section 5.10. Power series expansions about the ori-gin for Ci(x), si(x), and li(x) may be obtained from those for the exponential

9Another sine integral is given by Si(x) = si(x) + π/2.

Page 26: The Gamma Function (Factorial Function)williamsgj.people.cofc.edu/Gamma Function.pdf · 524 Chapter 10 The Gamma Function (Factorial Function) Replacing zwith z+1, we have (z+1) =

548 Chapter 10 The Gamma Function (Factorial Function)

erf x

–1

1

–1–2 21x

Figure 10.8

Error Function erf x

integral, E1(x), or by direct integration. The exponential, sine, and cosine inte-grals are tabulated in AMS-55, Chapter 5, and can also be accessed by symbolicpackages such as Mathematica, Maple, Mathcad, and Reduce.

Error Integrals

The error integrals

erf z = 2√π

∫ z

0e−t2

dt, erfc z = 1 − erf z = 2√π

∫ ∞

z

e−t2dt (10.70a)

(normalized so that erf ∞ = 1) are introduced in Section 5.10 (Fig. 10.8).Asymptotic forms are developed there. From the general form of the integrandsand Eq. (10.6) we expect that erf z and erfc z may be written as incompletegamma functions with a = 1

2 . The relations are

erf z = π−1/2γ(

12 , z2

), erfc z = π−1/2�

(12 , z2

). (10.70b)

The power series expansion of erf z follows directly from Eq. (10.61).

EXERCISES

10.4.1 Show that

γ (a, x) = e−x∞∑

n= 0

(a − 1)!(a + n)!

xa+n,

(a) by repeatedly integrating by parts; and(b) demonstrate this relation by transforming it into Eq. (10.61).

10.4.2 Show that

(a)dm

dxm[x−aγ (a, x)] = (−1)mx−a−mγ (a + m, x),

(b)dm

dxm[e xγ (a, x)] = e x �(a)

�(a − m)γ (a − m, x).

Page 27: The Gamma Function (Factorial Function)williamsgj.people.cofc.edu/Gamma Function.pdf · 524 Chapter 10 The Gamma Function (Factorial Function) Replacing zwith z+1, we have (z+1) =

10.4 The Incomplete Gamma Functions and Related Functions 549

10.4.3 Show that γ (a, x) and �(a, x) satisfy the recurrence relations(a) γ (a + 1, x) = aγ (a, x) − xae−x,(b) �(a − 1, x) = a�(a, x) + xae−x.

10.4.4 The potential produced by a 1s hydrogen electron (Exercise 10.4.11)is given by

V (r) = q

4πε0a0

{12r

γ (3, 2r) + �(2, 2r)}

.

(a) For r � 1, show that

V (r) = q

4πε0a0

{1 − 2

3r2 + · · ·

}.

(b) For r � 1, show that

V (r) = q

4πε0a0· 1

r.

Here, r is a pure number, the number of Bohr radii, a0.Note. For computation at intermediate values of r, Eqs. (10.60) areconvenient.

10.4.5 The potential of a 2p hydrogen electron is found to be

V (r) = 14πε0

· q

24a0

{1rγ (5, r) + �(4, r)

}

− 14πε0

· q

120a0

{1r 3

γ (7, r) + r2�(2, r)}

P2(cos θ).

Here, r is expressed in units of a0, the Bohr radius. P2(cos θ) is aLegendre polynomial (Section 11.1).(a) For r � 1, show that

V (r) = 14πε0

· q

a0

{14

− 1120

r2 P2(cos θ) + · · ·}

.

(b) For r � 1, show that

V (r) = 14πε0

· q

a0r

{1 − 6

r2P2(cos θ) + · · ·

}.

10.4.6 Prove the expansion∫ ∞

x

e−t

tdt = −γ − ln x −

∞∑n=1

(−1)nxn

n · n!

for the exponential integral. Here, γ is the Euler–Mascheroni constant.

10.4.7 Show that E1(z) may be written as

E1(z) = e−z

∫ ∞

0

e−zt

1 + tdt.

Show also that we must impose the condition |arg z| ≤ π/2.

Page 28: The Gamma Function (Factorial Function)williamsgj.people.cofc.edu/Gamma Function.pdf · 524 Chapter 10 The Gamma Function (Factorial Function) Replacing zwith z+1, we have (z+1) =

550 Chapter 10 The Gamma Function (Factorial Function)

10.4.8 Related to the exponential integral [Eq. (10.62)] is the function

En(x) =∫ ∞

1

e−xt

tndt.

Show that En(x) satisfies the recurrence relation

En+1(x) = 1n

e−x − x

nEn(x), n = 1, 2, 3, . . . .

10.4.9 With En(x) defined in Exercise 10.4.8, show that En(0) = 1/(n − 1),n > 1.

10.4.10 Using the relation

�(a) = γ (a, x) + �(a, x),

show that if γ (a, x) satisfies the relations of Exercise 10.4.2, then�(a, x) must satisfy the same relations.

10.4.11 Calculate the potential produced by a 1s hydrogen electron (Exercise10.4.4) (Fig. 10.9). Tabulate V (r)/(q/4πε0a0) for 0.0 ≤ x ≤ 4.0, x insteps of 0.1. Check your calculations for r � 1 and for r � 1 bycalculating the limiting forms given in Exercise 10.4.4.

Point charge potential1/r

Distributedcharge

potential

r

Figure 10.9

Distributed ChargePotential Producedby a 1s HydrogenElectron (Exercise10.4.11)

Additional Reading

Abramowitz, M., and Stegun, I. A. (Eds.) (1972). Handbook of Mathematical

Functions with Formulas, Graphs, and Mathematical Tables (AMS-55).National Bureau of Standards, Washington, DC. Reprinted, Dover (1974).Contains a wealth of information about gamma functions, incompletegamma functions, exponential integrals, error functions, and related func-tions (Chapters 4–6).

Artin, E. (1964). The Gamma Function (M. Butler, Trans.). Holt, Rinehart &Winston, New York. Demonstrates that if a function f (x) is smooth (logconvex) and equal to (n − 1)! when x = n = integer, it is the gammafunction.

Page 29: The Gamma Function (Factorial Function)williamsgj.people.cofc.edu/Gamma Function.pdf · 524 Chapter 10 The Gamma Function (Factorial Function) Replacing zwith z+1, we have (z+1) =

10.4 The Incomplete Gamma Functions and Related Functions 551

Davis, H. T. (1933). Tables of the Higher Mathematical Functions. Principia,Bloomington, IN. Volume 1 contains extensive information on the gammafunction and the polygamma functions.

Gradshteyn, I. S., and Ryzhik, I. M. (2000). Table of Integrals, Series, and

Products, 6th ed. Academic Press, New York.Luke, Y. L. (1969). The Special Functions and Their Approximations, Vol. 1.

Academic Press, New York.Luke, Y. L. (1975). Mathematical Functions and Their Approximations. Aca-

demic Press, New York. This is an updated supplement to Handbook

of Mathematical Functions with Formulas, Graphs, and Mathematical

Tables (AMS-55). Chapter 1 deals with the gamma function. Chapter 4treats the incomplete gamma function and a host of related functions.