taocp

This site has no text of the book. Keep your own copy of TAOCP next to it. See what is checked.

Exercise · Volume 1 · 1.2.11.2-5

Exercise 1.2.11.2-5

not stated yet in Lean solution written

RatingHM30
MarkersHM (needs higher mathematics)
KindK1, prove: show that a stated fact is true from the written solution
SectionSection 1.2.11.2 of Volume 1. Companion chapter: Euler's summation formula

The task

Use Wallis's product to show that the constant in Stirling's formula is κ=2π\kappa=\sqrt{2\pi}.

The exact wording is in your copy of the book.

Hints

Open one hint at a time. Try the exercise again after each.

Hint 1

Express (2nn)\binom{2n}n with n!n! and (2n)!(2n)!, and insert the given form.

Hint 2

Find a formula for (2nn)4−n\binom{2n}n4^{-n} from the integral ∫0π/2sin⁡kx dx\int_0^{\pi/2}\sin^kx\,dx.

Solution

Show the solution

Step 1. Insert n!=κn(n/e)n(1+O(1/n))n!=\kappa\sqrt n(n/e)^n(1+O(1/n)) and (2n)!=κ2n(2n/e)2n(1+O(1/n))(2n)!=\kappa\sqrt{2n}(2n/e)^{2n}(1+O(1/n)) into (2nn)=(2n)!n!2\binom{2n}n=\frac{(2n)!}{n!^2}:

(2nn)=2κ⋅4nn(1+O(1/n)).\binom{2n}n=\frac{\sqrt2}{\kappa}\cdot\frac{4^n}{\sqrt n}\bigl(1+O(1/n)\bigr).

So (4n/(2nn))2=κ2n2(1+O(1/n))\bigl(4^n/\binom{2n}n\bigr)^2=\frac{\kappa^2n}2\bigl(1+O(1/n)\bigr), and dividing by 2n+12n+1 gives the limit κ2/4\kappa^2/4.

Step 2 (Wallis). Let Ik=∫0π/2sin⁡kx dxI_k=\int_0^{\pi/2}\sin^kx\,dx. Integration by parts gives Ik=k−1kIk−2I_k=\frac{k-1}kI_{k-2}. With I0=π2I_0=\frac\pi2 and I1=1I_1=1 this gives I2n=π2(2nn)4−nI_{2n}=\frac\pi2\binom{2n}n4^{-n} and I2n+1=4n(2n+1)(2nn)I_{2n+1}=\frac{4^n}{(2n+1)\binom{2n}n}. Since 0≤sin⁡x≤10\le\sin x\le1, I2n+1≤I2n≤I2n−1=2n+12nI2n+1I_{2n+1}\le I_{2n}\le I_{2n-1}=\frac{2n+1}{2n}I_{2n+1}, so I2n/I2n+1→1I_{2n}/I_{2n+1}\to1. This ratio is π2⋅(2n+1)(2nn)216n\frac\pi2\cdot\frac{(2n+1)\binom{2n}n^2}{16^n}, so

12n+1(4n(2nn))2→π2.\frac1{2n+1}\Bigl(\frac{4^n}{\binom{2n}n}\Bigr)^2\to\frac\pi2.

Step 3. Compare: κ2/4=π2\kappa^2/4=\frac\pi2, so κ=2π\kappa=\sqrt{2\pi} (positive).

Check

Python gives 12n+1(4n/(2nn))2=1.5339, 1.56689, 1.57040\frac1{2n+1}\bigl(4^n/\binom{2n}n\bigr)^2=1.5339,\ 1.56689,\ 1.57040 for n=10,100,1000n=10,100,1000, tending to π2=1.5708\frac\pi2=1.5708. The form 2πn(n/e)n\sqrt{2\pi n}(n/e)^n gives 10!≈3 598 69610!\approx3\,598\,696 against 3 628 8003\,628\,800, a relative error of 0.83%0.83\%, close to 112n\frac1{12n}.

Remarks

The product ∏k≥14k24k2−1=π2\prod_{k\ge1}\frac{4k^2}{4k^2-1}=\frac\pi2 is the form of Wallis's result in Step 2. Another proof of the value of κ\kappa uses Γ(12)=π\Gamma(\frac12)=\sqrt\pi.

This solution is drafted, and a person has not reviewed it yet. The source.

In Lean

not stated yet The exercise is not stated in Lean yet.

The status is computed from the Lean build. The node of the map.

Something is wrong? Report it.