TAOCP 1.2.7 Exercise 23

For positive integers $n$, H_n=\sum_{k=1}^n \frac1k.

Section 1.2.7: Harmonic Numbers

Exercise 23. [HM20] By considering the function $\Gamma'(x)/\Gamma(x)$, generalize $H_n$ to noninteger values of $n$. You may use the fact that $\Gamma'(1)=-\gamma$, anticipating the next exercise.

Verified: no
Solve time: -


Solution

For positive integers $n$,

$$ H_n=\sum_{k=1}^n \frac1k. $$

The exercise asks for a continuation of this function to noninteger values by means of the logarithmic derivative of the gamma function,

$$ \psi(x)=\frac{\Gamma'(x)}{\Gamma(x)}. $$

Since $\Gamma(x+1)=x\Gamma(x)$, differentiation gives

$$ \Gamma'(x+1)=\Gamma(x)+x\Gamma'(x). $$

Dividing by $\Gamma(x+1)=x\Gamma(x)$ yields

$$ \frac{\Gamma'(x+1)}{\Gamma(x+1)} = \frac1x+\frac{\Gamma'(x)}{\Gamma(x)}. $$

Hence

$$ \psi(x+1)=\psi(x)+\frac1x. \tag{1} $$

Now define

$$ H_x=\psi(x+1)+\gamma, $$

where $\gamma$ is Euler's constant, determined by the condition

$$ \Gamma'(1)=-\gamma. $$

Since $\Gamma(1)=1$, this condition implies

$$ \psi(1)=\frac{\Gamma'(1)}{\Gamma(1)}=-\gamma. $$

Therefore

$$ H_0=\psi(1)+\gamma=0. $$

Applying (1) repeatedly,

$$ H_n-H_{n-1} = \psi(n+1)-\psi(n) = \frac1n, $$

for $n\ge1$. Since $H_0=0$,

$$ H_n = \sum_{k=1}^n (H_k-H_{k-1}) = \sum_{k=1}^n \frac1k. $$

Thus the definition agrees with the ordinary harmonic numbers when $n$ is an integer.

The required generalization is therefore

$$ \boxed{H_x=\frac{\Gamma'(x+1)}{\Gamma(x+1)}+\gamma}. $$

This completes the proof.