Steven R. Dunbar
Department of Mathematics
203 Avery Hall
University of Nebraska-Lincoln
Lincoln, NE 68588-0130
http://www.math.unl.edu
Voice: 402-472-3731
Fax: 402-472-8466

Topics in
Probability Theory and Stochastic Processes
Steven R. Dunbar

__________________________________________________________________________

Stirling’s Formula Derived from Elementary Sequences and Series

_______________________________________________________________________

Note: These pages are prepared with MathJax. MathJax is an open source JavaScript display engine for mathematics that works in all browsers. See http://mathjax.org for details on supported browsers, accessibility, copy-and-paste, and other features. The applets use JavaScript which you need to have enabled in order to display and use the applets.

_______________________________________________________________________________________________

Rating

Rating

Mathematicians Only: prolonged scenes of intense rigor.

_______________________________________________________________________________________________

Section Starter Question

Section Starter Question

What is the geometric summation formula? How can you use the geometric sum formula to derive the series expansion for log(1 + x) ? What do you need to know about the geometric sum formula in order to justify its use to derive the series expansion for log(1 + x) ?

_______________________________________________________________________________________________

Key Concepts

Key Concepts

  1. Stirling’s Formula, also called Stirling’s Approximation, is the asymptotic relation
    n! 2πnn+12en.

  2. The formula is useful in estimating large factorial values, but its main mathematical value is in limits involving factorials.

__________________________________________________________________________

Vocabulary

Vocabulary

  1. Stirling’s Formula, also called Stirling’s Approximation, is the asymptotic relation
    n! 2πnn+12en.

__________________________________________________________________________

Mathematical Ideas

Mathematical Ideas

Stirling’s Formula, also called Stirling’s Approximation, is the asymptotic relation

n! 2πnn+12en.

The formula is useful in estimating large factorial values, but its main mathematical value is in limits involving factorials. Another attractive form of Stirling’s Formula is:

n! 2π n n e n.

An improved inequality version of Stirling’s Formula is

2πnn+12en+1(12n+1) < n! < 2πnn+12en+1(12n). (1)

See Stirling’s Formula. in MathWorld.com.

Here we rigorously derive Stirling’s Formula using elementary sequences and series expansions of the logarithm function, based on the sketch in Kazarinoff [2] which is in turn based on the note by Nanjundiah [3].

A weak form of Stirling’s Formula

Theorem 1.

n!n n e

Remark. This form of Stirling’s Formula is weaker than the usual form since it does not give direct estimates on n!. On the other hand,it avoids the determination of the asymptotic constant 2π which usually requires Wallis’s Formula or equivalent. For many purposes of estimation or limit taking this version of Stirling’s Formula is sufficient, and the proof is elementary. The proof is taken from [5, pages314-315].

Proof. Start from the series expansion for the exponential function and then estimate:

en = 1 + n 1! + + nn1 (n 1)! + nn n! 1 + n n + 1 + n2 (n + 1)(n + 2) + < nnn n! + nn n! j=0 n n + 1 j = (2n + 1)nn n!

On the other hand, en > nnn! by dropping all but the nnn! term from the series expansion for the exponential. Rearranging these two inequalities

nn en < n! < (2n + 1)nn en .

Now take the nth root of each term, and use the fact that 2n + 1n 1 as n . □

Stirling’s Formula from sequences and series

Let an = n! nn+12en . Then an an+1 = n+1 n n+12e1 and log an an+1 = (n + 12) log(1 + 1n) 1 .

Lemma 2. For |x| < 1,

log 1 + x 1 x = 2 k=0 1 (2k + 1)x2k+1.

Proof. Left as an exercise. □

Note then that

log 1 + 1 n = log 1 + 1 2n+1 1 1 2n+1 = 2 k=0 1 (2k + 1)(2n + 1)2k+1.

Then

log an an+1 = 2n + 1 2 2 k=0 1 (2k + 1)(2n + 1)2k+1 1 = k=1 1 (2k + 1)(2n + 1)2k+1 = k=0 1 (2k + 3)(2n + 1)2k+2.

Now coarsely estimating the denominators

log an an+1 1 2(2n + 1)2 k=0 1 (2n + 1)2k.

Lemma 3.

log(an+1) < log an < 1 12n 1 12(n + 1) + log(an+1)

Proof.

Let f(x) = (x + 12) log(1 + 1x) 1, so log an an+1 = f(n). Observe that f(x) 0 as x and f(x) = log(1 + 1x) 2x+1 2x2+2. Because f(x) < 0 for x > 1 (proof left as an exercise) f(x) is decreasing from (32) log(2) 1 0.0397 to 0 as x increases. Hence 0 < log an an+1.

By Lemma 2

log an an+1 = 1 3(2n + 1)2 k=0 1 (2n + 1)2k.

The sum is a geometric sum, so

0 < log an an+1 < 1 3(2n + 1)2 1 1 (1(2n + 1)2) = 1 12n(n + 1)

Expand 1(12n(n + 1)) in partial fractions and add log(an+1) throughout to obtain

log(an+1) < log(an) < 1 12n 1 12(n + 1) + log(an+1)

Define xn = log(an) 1 12n, so Lemma 3 shows that xn is an increasing sequence, xn < xn+1. That is,

xn = log(an) 1 12n < log(an+1) 1 12(n + 1) = xn+1. (2)

Define yn = log(an), and then the left-side inequality in Lemma 3 shows that yn is a decreasing sequence that is, yn+1 < yn. By the definition of xn and yn, xn < yn and |xn yn| = 1(12n), so |xn yn| 0 as n . Therefore sup xn = inf yn and call the common value λ. By continuity, lim nan = eλ.

Using elementary properties of limits

eλ = lim nan = lim nan 2 lim na2n = lim nan 2 a2n . (3)

However,

an 2 a2n = 2 n 2 4(2n 2) 2n 1 3(2n 3) (2n 1). (4)

The easy demonstration is left as an exercise.

Lemma 4 (Wallis’ Formula).

lim n (2n) (2n)2 2 (2n + 1) (2n 1) (2n 1)3 3 1 = π 2.

Proof. See the proofs in Wallis Formula.. □

Using the continuity of the square root function

lim n 1 2n + 1 (2n) (2n 2)4 2 (2n 1) (2n 3)5 3 1 = π 2.

Now multiplying both sides by 2 and rewriting the leading square root sequence, obtain

lim n 2 n 2n 2n + 1 (2n) (2n 2)4 2 (2n 1) (2n 3)5 3 1 = 2π.

Then since

lim n 2n 2n + 1 = 1

equation 4 is

eλ = lim nan = 2 n 2 4(2n 2) 2n 1 3(2n 3) (2n 1) = 2π.

Equivalently, unwrapping the definition of an = n! nn+12en this is exactly Stirling’s Formula

n! 2πnn+12en.

Using the definitions xn = log(an) 1 12n and yn = log(an), the inequality xn < yn, and the least upper bound and greatest lower bound limit in equation (3) we can express Stirling’s Formula in inequality form

2πnn+12en < n! < 2πnn+12en+1(12n).

This is almost as good as the inequality (1).

Remark. This proof of Stirling’s Formula and the inequality (1) is the easiest, the shortest and the most elementary of the proofs that I present. These are all definite advantages. The main disadvantage of this proof is that it requires the form of Stirling’s Formula before starting, in order to create the sequence an which is the main object of the proof.

Stirling’s Formula from Wallis’ Formula

Lemma 5. If α , then the sequence

aα(n) = 1 + 1 nn+α

is decreasing if α [1 2,), and increasing for n N(α) if α (, 1 2).


PIC

Figure 1: Example of the lemma with α = 1 (green) and α = 0 (red).

Remark. This lemma is based on a remark due to I. Schur, see [4], problem 168, on page 38 with solution on page 215

Proof. The derivative of the function f(x) = 1 + 1 x x+α (defined on [1,)) is

f(x) = 1 + 1 xx+α ln 1 + 1 x x + α x(x + 1) .

Let

g(x) = ln 1 + 1 x x + α x(x + 1)

then

g(x) = (2α 1)x + α x2(x + 1)2

and lim xg(x) = 0. It follows that g(x) < 0 and so f(x) < 0 when α 12 and x 1, and f(x) > 0 when α < 12 and x max(1, α 12α). The monotonicity of aα(n) follows. □

From the lemma, for every α (0, 12) there is a positive integer N(α) such that

1 + 1 kk+α < e < 1 + 1 kk+12

for all k N(α). As a consequence, we obtain

k=n2n1 1 + 1 kk+α < en < k=n2n1 1 + 1 kk+12.

Rearrange the products with telescoping cancelations, using the upper bound on the right as an example.

k=n2n1 1 + 1 kk+12 = 1 + 1 nn+12 1 + 1 n + 1 n+1+12 1 + 1 2n 1 2n1+12 = n + 1 n n+12 n + 2 n + 1 n+1+12 2n 2n 1 2n1+12 = n + 1 n 12 n + 2 n + 1 12 2n 2n 1 12 n + 1 n n n + 2 n + 1 n+1 2n 2n 1 2n1 = 2n n 12 (2n)2n1 nn (n + 1)(2n 1) = 212 (2n)2n1 nn (n + 1)(2n 1) = 212 22n1 nn1 (n + 1)(2n 1).

Multiply by the last fraction by n!nn and Write more compactly,

n! nn 212 22n1 nn1 (n + 1)(2n 1) . = 212 2n1 2n n! n (n + 1)(2n 1) = 212 (2n)!! (2n 1)!!

This uses the “double factorial” notation n!! = n (n 2)4 2 if n is even, and n!! = n (n 2)3 1 if n is odd. The lower bound product on the left is similar.

That is, after multiplying through by n!nn+12,

2α n (2n)!! (2n 1)!! < n!en nn+12 < 212 n (2n)!! (2n 1)!!

for all n N(α). Using the Wallis Formula,

2απ liminf n n!en nn+12 limsup n n!en nn+12 2π.

Stirling’s formula follows by passing to the limit as α 12.

Remark. This proof can be extended to an asymptotic formula for the Gamma function using log-convexity of the Gamma function. See [1].

Sources

The weak form of Stirling’s Formula is taken from [5]. The first sequence proof is mostly adapted from the sketch in Kazarinoff [2] which is in turn based on the note Nanjundiah [3]. The second sequence proof using derivatives and monotonicity is adapted from [1].

_______________________________________________________________________________________________

Problems to Work

Problems to Work for Understanding

  1. Show that 2n + 1n 1 as n .
  2. Show that for |x| < 1,
    log 1 + x 1 x = 2 k=0 1 (2k + 1)x2k+1.

  3. Let f(x) = (x + 12) log(1 + 1x) 1. Show that f(x) decreases to 0 as x .
  4. Show that
    an 2 a2n = 2 n 2 4(2n 2) 2n 1 3(2n 3) (2n 1).

  5. Show that the derivative of the function f(x) = 1 + 1 x x+α (defined on [1,) ) is
    f(x) = 1 + 1 xx+α ln 1 + 1 x x + α x(x + 1) .

__________________________________________________________________________

Books

Reading Suggestion:

References

[1]   Dorin Ervin Dutkay, Constantin P. Niculescu, and Florin Popvici. Stirling’s formula and its extension for the Gamma function. American Mathematical Monthly, 120:737–740, October 2013. available as http:dx.doi.org/10.4169/amer.math.monthly.120.08.737.

[2]   Nicholaus D. Kazarinoff. Analytic Inequalities. Holt, Rinehart and Winston, 1961.

[3]   T. S. Nanjundiah. Note on Stirling’s formula. American Mathematical Monthly, 66:701–703, 1959.

[4]   G. Pólya and G. Szegö. Problems and Theorems in Analysis I: Series, Integrals, Theory of Functions. Classics in Mathematics. Springer Verlag, 1998. Repring of the 1978 version.

[5]   S. Saks and A. Zygmund. Analytic Functions. Elsevier Publishing, 1971.

__________________________________________________________________________

Links

Outside Readings and Links:

__________________________________________________________________________

I check all the information on each page for correctness and typographical errors. Nevertheless, some errors may occur and I would be grateful if you would alert me to such errors. I make every reasonable effort to present current and accurate information for public use, however I do not guarantee the accuracy or timeliness of information on this website. Your use of the information from this website is strictly voluntary and at your risk.

I have checked the links to external sites for usefulness. Links to external websites are provided as a convenience. I do not endorse, control, monitor, or guarantee the information contained in any external website. I don’t guarantee that the links are active at all times. Use the links here with the same caution as you would all information on the Internet. This website reflects the thoughts, interests and opinions of its author. They do not explicitly represent official positions or policies of my employer.

Information on this website is subject to change without notice.

Steve Dunbar’s Home Page, http://www.math.unl.edu/~sdunbar1

Email to Steve Dunbar, sdunbar1 at unl dot edu

Last modified: Processed from LATEX source on January 5, 2014