How to prove that $ -n \int _0 ^1 x^{n-1} \log(1-x)dx$ equals the $n$-th harmonic number?

1.3k Views Asked by At

From (Almost) Impossible Integrals, Sums, and Series section 1.3:

$$H_n = -n\int _0 ^1 x^{n-1} \log(1-x)dx$$

The proof of which was appetizingly difficult. I was unable to answer the follow-up challenge question, and do not have access to the given solution. It asks:

Is it possible to [prove this equality] with high school knowledge only (supposing we know and use the notation of the harmonic numbers)?

I've been fiddling with the integral on the right for an hour, but that $\log$ really throws a wrench in my plans.

4

There are 4 best solutions below

0
On BEST ANSWER

If you call the RHS $I_n$, then \begin{align}I_n-I_{n-1}&=\int_0^1((n-1)x^{n-2}-nx^{n-1})\log(1-x)\,dx\\ &=\left[(x^{n-1}-x^n)\log(1-x)\right]_{x=0}^1 +\int_0^1\frac{x^{n-1}-x^n}{1-x}\,dx \end{align} on integration by parts. Then $$\lim_{x\to1}(x^{n-1}-x^n)\log(1-x)=\lim_{x\to1}(1-x)\log(1-x)= \lim_{y\to0}y\log y=-\lim_{t\to\infty}te^{-t}=0$$ and the integral reduces to $\int_0^1x^{n-1}\,dx=1/n$. Therefore $I_n-I_{n-1}=1/n$. Similarly $I_1=1$, using integration by parts. I'd count all of this as A-level level maths.

5
On

My usual naive plug in and assume everything converges.

$\begin{array}\\ -n\int _0 ^1 x^{n-1} \log(1-x)dx &=n\int _0 ^1 x^{n-1} \sum_{m=1}^{\infty}\dfrac{x^m}{m}dx\\ &=n\sum_{m=1}^{\infty}\dfrac{1}{m}\int _0 ^1 x^{n-1} x^mdx\\ &=n\sum_{m=1}^{\infty}\dfrac{1}{m}\int _0 ^1 x^{n+m-1}dx\\ &=n\sum_{m=1}^{\infty}\dfrac{1}{m}\dfrac1{n+m}\\ &=n\sum_{m=1}^{\infty}\dfrac{1}{m(n+m)}\\ &=n\sum_{m=1}^{\infty}\dfrac1{n}(\dfrac1{m}-\dfrac1{n+m})\\ &=\sum_{m=1}^{\infty}(\dfrac1{m}-\dfrac1{n+m})\\ &=\sum_{m=1}^{\infty}\dfrac1{m}-\sum_{m=1}^{\infty}\dfrac1{n+m}\\ &=\sum_{m=1}^{\infty}\dfrac1{m}-\sum_{m=n+1}^{\infty}\dfrac1{m}\\ &=\sum_{m=1}^{\infty}\dfrac1{m}-\sum_{m=n+1}^{\infty}\dfrac1{m}\\ &=\sum_{m=1}^{n}\dfrac1{m}\\ &=H_n\\ \end{array} $

If you do the same thing with $\log(1+x)$, you get a similar result but it cancels out only for even $n$ - I got $-n\int _0 ^1 x^{n-1} \log(1+x)dx\\ =\sum_{m=1}^{\infty}\dfrac{(-1)^{m+1}}{m}-(-1)^n\sum_{m=n+1}^{\infty}\dfrac{(-1)^{m+1}}{m} $.

In any case, $-n\int _0 ^1 x^{n-1} \log(1+x)dx \to \ln(2) $.

2
On

$$H_n=\sum_{k=1}^n\frac1k=\sum_{k=1}^n\int_0^1 x^{k-1}dx=\int_0^1\sum_{k=1}^nx^{k-1}dx\\=\int_0^1\frac{1-x^n}{1-x}dx\overset{IBP}{=}\underbrace{-\ln(1-x)(1-x^n)|_0^1}_{0}-n\int_0^1x^{n-1}\ln(1-x)dx$$

0
On

This is not a solution but an extended comment, as the reasoning is probably not suited for high school students, as requested in the OP.

This proof starts with the observation that $\log(1-x) = \frac{d}{da} (1-x)^{a-1} |_{a\to 1}$ with which the integral in question can be written thus

$$-n \int_0^1 \log(1-x) x^{n-1}\,dx=- n\frac{d}{da}\left( \int_0^1 (1-x)^{a-1} x^{n-1}\,dx \right)|_{a\to 1} \\=- \frac{d}{da}\left( B(a,n) \right)|_{a\to 1}=- \frac{d}{da}\left( \frac{\Gamma(a) \Gamma[n+1]}{\Gamma(a+n)}\right)|_{a\to 1}\\= \left(\frac{\Gamma (a) \Gamma (n+1) \psi ^{(0)}(a+n)}{\Gamma (a+n)}-\frac{\Gamma (a) \psi ^{(0)}(a) \Gamma (n+1)}{\Gamma (a+n)}\right)|_{a\to 1}\\=\psi ^{(0)}(n+1)+\gamma= H_n$$

Remark: this method is easily adapted to integrals of the type $\int_0^1 \log^k (1-x) x^{n-1}\,dx$.