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.7-23

Exercise 1.2.7-23

proved in Lean solution written

RatingHM20
MarkersHM (needs higher mathematics)
KindK3, find a value: compute a number, a set or a closed form from the written solution
SectionSection 1.2.7 of Volume 1. Companion chapter: Harmonic numbers

The task

Use Γ′(x)/Γ(x)\Gamma'(x)/\Gamma(x) to define HxH_x for noninteger xx so that it agrees with HnH_n at the integers.

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

Take the logarithmic derivative of Γ(x+1)=xΓ(x)\Gamma(x+1) = x\Gamma(x). What does it say about the difference of two neighbouring values of Γ′/Γ\Gamma'/\Gamma?

Hint 2

Use the value Γ′(1)=−γ\Gamma'(1) = -\gamma for the start.

Solution

Show the solution

Let ψ(x)=Γ′(x)/Γ(x)\psi(x) = \Gamma'(x)/\Gamma(x) for x>0x > 0. The rule Γ(x+1)=xΓ(x)\Gamma(x+1) = x\Gamma(x) gives ln⁡Γ(x+1)=ln⁡x+ln⁡Γ(x)\ln\Gamma(x+1) = \ln x + \ln\Gamma(x). Differentiate:

ψ(x+1)=1x+ψ(x).\psi(x+1) = \frac1x + \psi(x).

So ψ(n+1)−ψ(n)=1n\psi(n+1) - \psi(n) = \frac1n for n≥1n \ge 1, and by induction ψ(n+1)=ψ(1)+Hn\psi(n+1) = \psi(1) + H_n. Since Γ(1)=1\Gamma(1) = 1, ψ(1)=Γ′(1)=−γ\psi(1) = \Gamma'(1) = -\gamma. Therefore ψ(n+1)+γ=Hn\psi(n+1) + \gamma = H_n for n≥0n \ge 0.

Definition. For real x>−1x > -1 put

Hx=Γ′(x+1)Γ(x+1)+γ=ψ(x+1)+γ.H_x = \frac{\Gamma'(x+1)}{\Gamma(x+1)} + \gamma = \psi(x+1) + \gamma.

It agrees with HnH_n at the integers n≥0n \ge 0, and it keeps the rule Hx−Hx−1=1xH_x - H_{x-1} = \frac1x of the harmonic numbers, from the relation above.

Check

Python gives ψ(n+1)+γ−Hn=0\psi(n+1) + \gamma - H_n = 0 to 10−1610^{-16} for n=1,2,5n = 1, 2, 5. At x=12x = \frac12 the value is H1/2=0.6137056388801…H_{1/2} = 0.6137056388801\ldots, and 2−2ln⁡2=0.6137056388801…2 - 2\ln 2 = 0.6137056388801\ldots. At x=0.37x = 0.37, Hx=0.48461695671…H_x = 0.48461695671\ldots, which equals the series ∑k≥1(1k−1k+x)\sum_{k \ge 1}\left(\frac1k - \frac{1}{k+x}\right) of exercise 24.

Remarks

Exercise 1.2.7-24 turns this definition into the series Hx=∑k≥1(1k−1k+x)H_x = \sum_{k \ge 1}\left(\frac1k - \frac{1}{k+x}\right). The function ψ\psi is the digamma function.

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

In Lean

proved The statement and its proof are in Lean. The kernel accepts the proof, and it uses the standard axioms only.

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

Something is wrong? Report it.