228 CHAPTER 10. IMPROPER INTEGRALS, STIRLING’S FORMULA
=n−1
∑k=1
12
(ln(
k+12
)− ln(k)
)−
n−1
∑k=1
12
(ln(k+1)− ln
(k+
12
))≤
n−1
∑k=1
12
(ln(k)− ln
(k− 1
2
))−
n−1
∑k=1
12
(ln(k+1)− ln
(k+
12
))=
n−2
∑k=0
12
(ln(k+1)− ln
(k+
12
))−
n−1
∑k=1
12
(ln(k+1)− ln
(k+
12
))
=12
(ln(1)− ln
(12
))− 1
2
(ln(n)− ln
(n− 1
2
))≤ ln(2)
2
Now this shows that {∫ n
1 ln(t)dt −Tn}∞
n=1 is an increasing sequence bounded above and soit must converge to some real number α .
exp(Tn) =n−1
∏k=1
exp(
12(ln(k)+ ln(k+1))
)=
n−1
∏k=1
(k (k+1))1/2
= (1 ·2)1/2 (2 ·3)1/2 · · ·((n−1) ·n)1/2 = (n−1)!√
n = n!n−1/2
Therefore, doing the integral∫ n
1 ln(t)dt and taking the exponential of the expression,
limn→∞
exp((n ln(n)−n)−Tn) = limn→∞
e(n ln(n)−n)
n−1/2n!= lim
n→∞
nn+ 12 e−n
n!= eα
This has proved the following lemma.
Lemma 10.1.2 There exists a positive number c such that
limn→∞
n!nn+(1/2)e−nc
= 1.
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
Lemma 10.1.3 For m ≥ 1,∫π/2
0sin2m (x)dx =
(2m−1) · · ·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,∫π/2
0sin2 (x)dx =
π
4=
12
π
2