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-6

Exercise 1.2.11.2-6

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

Show that Stirling's formula holds for Γ(x+1)\Gamma(x+1) with real x≥a>0x\ge a>0.

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

Apply Euler's formula to f(t)=ln⁡(c+t)f(t)=\ln(c+t) on 0≤t≤n0\le t\le n and compare with Gauss's formula for Γ(c)\Gamma(c).

Hint 2

Bound the remainder with ∣B2({t})∣≤16|B_2(\{t\})|\le\frac16.

Solution

Show the solution

Plan. Write ln⁡Γ(c)\ln\Gamma(c) as a limit with Gauss's formula, evaluate the product with Euler's formula, and bound the remainder uniformly in c≥ac\ge a.

Step 1. For c>0c>0 Gauss's formula is Γ(c)=lim⁡n→∞(n−1)! ncc(c+1)⋯(c+n−1)\Gamma(c)=\lim_{n\to\infty}\frac{(n-1)!\,n^c}{c(c+1)\cdots(c+n-1)}.

Step 2. Euler's formula (10) holds over any interval [0,n][0,n] with integer ends (the proof is the same). Take f(t)=ln⁡(c+t)f(t)=\ln(c+t), m=2m=2. Then f′=1c+tf'=\frac1{c+t}, f′′=−1(c+t)2f''=-\frac1{(c+t)^2} and

ln⁡∏k=0n−1(c+k)=(n+c)ln⁡(n+c)−cln⁡c−n−12ln⁡(n+c)+12ln⁡c+112(1n+c−1c)+12∫0nB2({t})(c+t)2dt.\ln\prod_{k=0}^{n-1}(c+k)=(n+c)\ln(n+c)-c\ln c-n-\tfrac12\ln(n+c)+\tfrac12\ln c+\tfrac1{12}\Bigl(\frac1{n+c}-\frac1c\Bigr)+\frac12\int_0^n\frac{B_2(\{t\})}{(c+t)^2}dt.

Step 3. From (18), ln⁡(n−1)!=(n−12)ln⁡n−n+σ+O(1/n)\ln(n-1)!=(n-\frac12)\ln n-n+\sigma+O(1/n). Put both into Step 1. The terms combine into (n+c−12)ln⁡nn+c(n+c-\frac12)\ln\frac n{n+c}, which tends to −c-c. The terms 112(n+c)\frac1{12(n+c)} and O(1/n)O(1/n) tend to 00. So

ln⁡Γ(c)=−c+(c−12)ln⁡c+σ+112c−12∫0∞B2({t})(c+t)2dt.\ln\Gamma(c)=-c+(c-\tfrac12)\ln c+\sigma+\frac1{12c}-\frac12\int_0^\infty\frac{B_2(\{t\})}{(c+t)^2}dt.

Step 4. Multiply Γ(c)\Gamma(c) by cc and use eσ=2πe^\sigma=\sqrt{2\pi} (Exercise 1.2.11.2-5): ln⁡Γ(c+1)=(c+12)ln⁡c−c+ln⁡2π+δ(c)\ln\Gamma(c+1)=(c+\frac12)\ln c-c+\ln\sqrt{2\pi}+\delta(c), where δ(c)=112c−12∫0∞B2({t})(c+t)2dt\delta(c)=\frac1{12c}-\frac12\int_0^\infty\frac{B_2(\{t\})}{(c+t)^2}dt. Since ∣B2({t})∣≤16|B_2(\{t\})|\le\frac16 and ∫0∞(c+t)−2dt=1c\int_0^\infty(c+t)^{-2}dt=\frac1c, we get 0≤δ(c)≤16c0\le\delta(c)\le\frac1{6c}.

Step 5. Put c=xc=x. Then Γ(x+1)=2πx(x/e)xeδ(x)\Gamma(x+1)=\sqrt{2\pi x}(x/e)^xe^{\delta(x)} and 1≤eδ≤1+δeδ≤1+16xe1/(6a)1\le e^\delta\le1+\delta e^\delta\le1+\frac1{6x}e^{1/(6a)} for x≥ax\ge a. So Γ(x+1)=2πx(x/e)x(1+O(1/x))\Gamma(x+1)=\sqrt{2\pi x}(x/e)^x\bigl(1+O(1/x)\bigr) for x≥a>0x\ge a>0, with a constant that depends only on aa.

Check

For c=0.5c=0.5: Γ(1.5)/(π(0.5/e)0.5)=1.16582\Gamma(1.5)/\bigl(\sqrt{\pi}(0.5/e)^{0.5}\bigr)=1.16582 and 1+112c=1.166671+\frac1{12c}=1.16667. For c=10c=10: the ratio is 1.0083651.008365 against 1.0083331.008333. The formula of Step 3 for ln⁡Γ(c+1)\ln\Gamma(c+1) with the integral summed numerically gives −0.120782238-0.120782238 at c=0.5c=0.5, equal to ln⁡Γ(1.5)=−0.120782238\ln\Gamma(1.5)=-0.120782238.

Remarks

The proof gives the inequality 0≤δ(c)≤16c0\le\delta(c)\le\frac1{6c} at the same time. The first term 112c\frac1{12c} of the Stirling series is already visible in the formula for δ\delta.

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.