# Evaluating $\int_0^{1/2} \log(1-x) \log(1-2x) \ dx$.

While messing around with Wolfram Alpha, I discovered that

$$\int_0^{\frac{1}2} \log(1-x) \log(1-2x) \ dx = 1 - \frac{\pi^2}{24} - \frac{\log(2)}2.$$

I've tried all sorts of standard tricks, but I cannot seem to prove it. Can someone prove this beautiful identity?

• The integral has a singularity at the upper limit. – Rene Schipperus Dec 28 '16 at 22:55
• However it converges there. – Rene Schipperus Dec 28 '16 at 23:00
• @ReneSchipperus: Yes, it converges there. Would it be better if I rephrased the question as a limit ? – Sandeep Silwal Dec 28 '16 at 23:04
• I think most of us looking at this can understand how to deal with it fine. – Simply Beautiful Art Dec 28 '16 at 23:06

With the substitution $u = 1-2x$, $x = (1+u)/2$, $dx = -du/2$, we get \begin{align*} \int_{x=0}^{1/2} \log (1-x) \log (1-2x) \, dx &= -\frac{1}{2} \int_{u=1}^0 \log \left(\frac{1+u}{2}\right) \log u \, du \\ &= \frac{1}{2} \int_{u=0}^1 \log u \,(\log (1+u) - \log 2) \, du \\ &= \frac{1}{2} \left( -\log 2 \int_{u=0}^1 \log u \, du + \int_{u=0}^1 \log u \, \log (1+u) \, du \right) \\ &= \frac{\log 2}{2} + \frac{1}{2} I,\end{align*} where \begin{align*} I &= \int_{u=0}^1 \log u \sum_{k=1}^\infty \frac{(-1)^{k+1}}{k} u^k \, du \\ &= \sum_{k=1}^\infty \frac{(-1)^{k+1}}{k} \int_{u=0}^1 u^k \log u \, du \\ &= \sum_{k=1}^\infty \frac{(-1)^k}{k(k+1)^2}, \end{align*} with the evaluation of the last step being accomplished by a trivial integration by parts. Partial fraction decomposition gives $$\frac{1}{k(k+1)^2} = \frac{1}{k} - \frac{1}{k+1} - \frac{1}{(k+1)^2},$$ and using the fact that $$\sum_{k=1}^\infty \frac{(-1)^k}{k} = -\log 2,$$ and $$\sum_{k=1}^\infty \frac{1}{k^2} = \frac{\pi^2}{6},$$ it is relatively straightforward to obtain the desired result.

• This is very clean, like it. – Rene Schipperus Dec 28 '16 at 23:23
• Nice application of switching sums and integrals! – Sandeep Silwal Dec 28 '16 at 23:28
• (+1) Very nice and way more elementary than my approach. – Jack D'Aurizio Dec 28 '16 at 23:29
• Clear and concise. (+1) – Mark Viola Dec 28 '16 at 23:31

It is not difficult to check that $$\int_{0}^{1/2} x^n \log(1-2x)\,dx = -\frac{H_{n+1}}{2^{n+1}(n+1)} \tag{1}$$ hence the value of our integral is given by the series $$-\sum_{n\geq 1}\frac{H_{n+1}}{2^{n+1}}\left(\frac{1}{n}-\frac{1}{n+1}\right)\tag{2}$$ that is a variation of the series given by applying Euler's transform to $\sum_{n\geq 1}\frac{1}{n^2}$: $$\zeta(2) = \sum_{n\geq 1}\frac{1}{n^2} = 2\sum_{n\geq 1}\frac{H_n}{n 2^n}.\tag{3}$$ Given $(3)$, simple manipulations leads to $$\int_{0}^{1/2}\log(1-x)\log(1-2x)\,dx = 1-\frac{\zeta(2)}{4}-\frac{\log 2}{2}\tag{4}$$ as wanted.

• Hm, what is $H_n$? – Simply Beautiful Art Dec 28 '16 at 23:10
• @SimpleArt $H_n$ is the Harmonic number. – Mark Viola Dec 28 '16 at 23:11
• @SandeepSilwal: apply differentiation under the integral sign to $$\int_{0}^{1/2} x^n(1-2x)^a\,dx$$ – Jack D'Aurizio Dec 28 '16 at 23:14
• Impressive, specially since you did this in under 18 minutes. – Rene Schipperus Dec 28 '16 at 23:15
• @SandeepSilwal: no typo, $\log(1-2x) = \left.\frac{d}{da}(1-2x)^a\right|_{a=0^+}$. – Jack D'Aurizio Dec 28 '16 at 23:30

More generally, $\ln(1-x) \ln(1-tx)$ has a rather messy antiderivative involving logarithms and dilog, leading to (for $t > 1$)

$$\int_0^{1/t} \ln(1-x) \ln(1-t x)\; dx = \frac{2}{t} + \frac{1-t}{t} \left(\ln \left(\frac{t}{t-1}\right) - \text{dilog}\left(\frac{t}{t-1}\right)\right)$$

Yours is the case $t=2$, where $\text{dilog}(2) = -\pi^2/12$.