9.8. STIRLING’S FORMULA 211

=12

n−1

∑k=1

(ln(

k+12

)− ln(k)

)− 1

2

n−1

∑k=1

(ln(k+1)− ln

(k+

12

))

≤ 12

n−1

∑k=1

(ln(k)− ln

(k− 1

2

))− 1

2

n−1

∑k=1

(ln(k+1)− ln

(k+

12

))

=12

n−1

∑k=1

(ln(k)− ln

(k− 1

2

))− 1

2

n

∑k=2

(ln(k)− ln

(k− 1

2

))

=12

ln2−(

12

ln(n)− ln(

n− 12

))≤ ln2

2

(∫ n+1

1ln(t)dt−Tn+1

)−(∫ n

1ln(t)dt−Tn

)=

∫ n+1

nln(t)dt−

(12(ln(n)+ ln(n+1))

)≥ 0

Thus {∫ n

1 ln(t)dt−Tn} increases to some α ≤ ln22 . Compute the integral and then conclude

that (n lnn−n)−Tn → α . and so taking the exponential, nn

enn!n−1/2 → eα This has provedthe following lemma.

Lemma 9.8.2 limn→∞n!en

nn+1/2 = c for some positive number c.

In many applications, the above is enough. However, the constant can be found. Thereare various ways to show that this constant c equals

√2π . The version given here also

includes a formula which is interesting for its own sake.Using integration by parts, it follows that whenever n is a positive integer larger than 1,

∫π/2

0sinn (x)dx =

n−1n

∫π/2

0sinn−2 (x)dx (9.10)

Lemma 9.8.3 For m≥ 1,∫π/2

0sin2m (x)dx =

(2m−1)(2m−3) · · ·12m(2m−2) · · ·2

π

2,∫

π/2

0sin2m+1 (x)dx =

(2m)(2m−2) · · ·2(2m+1)(2m−1) · · ·3

.

Proof: Consider the first formula in the case where m = 1. From beginning calculus,∫ π/20 sin2 (x)dx = π

4 = 12

π

2 so the formula holds in this case. Suppose it holds for m. Thenfrom the above reduction identity and induction,

∫π/2

0sin2m+2 (x)dx =

2m+12(m+1)

∫π/2

0sin2m (x)dx =

2m+12(m+1)

(2m−1) · · ·12m(2m−2) · · ·2

π

2.

The second claim is proved similarly.

9.8. STIRLING’S FORMULA 21115 (i(k $) mn) -=1)-$8o0--8)= 32~ (Finn) in (n~5)) <>(°° nears) _ ( [mann_ [mwa (5 (in(a) +1m(n-41))) =0Thus {f;'In(t) dt — T,} increases to some a < 32. Compute the integral and then concludethat (nInn—n) —T,, > a. and so taking the exponential "the following lemma."5 — e This has provedn> e"nInLemma 9.8.2 lim,_... ae =c for some positive number c.In many applications, the above is enough. However, the constant can be found. Thereare various ways to show that this constant c equals /2. The version given here alsoincludes a formula which is interesting for its own sake.Using integration by parts, it follows that whenever n is a positive integer larger than 1,n/2 ; n—1 2/2 2| sin” (x) dx = [ sin” “ (x) dx (9.10)0 n JOLemma 9.8.3 Form > 1,H/2 (2m —1)(2m—3)---1 a2m _ _—i sin) de m2) 2"(2m) (2m —2)---2(2m+1)(2m—1)---3°Proof: Consider the first formula in the case where m = |. From beginning calculus,Ie’ ° sin? (x)dx = % = 5% so the formula holds in this case. Suppose it holds for m. Thenfrom the above reduction identity and induction,n/2 2. 1 m/2 2. 1 2m—1)---1i sin2”"*? (x) dx = —" + i sin?” (x)dx = +1 _Qm=1) m0 02(m+1). 2(m+1) 2m(2m—2)---2 2°The second claim is proved similarly. §j