[Math] How to evaluate $\int_0^1\frac{\log^2(1+x)}x\mathrm dx$

definite integralsintegrationsequences-and-series

The definite integral

$$\int_0^1\frac{\log^2(1+x)}x\mathrm dx=\frac{\zeta(3)}4$$

arose in my answer to this question. I couldn't find it treated anywhere online. I eventually found two ways to evaluate the integral, and I'm posting them as answers, but they both seem like a complicated detour for a simple result, so I'm posting this question not only to record my answers but also to ask whether there's a more elegant derivation of the result.

Note that either using the method described in this blog post or substituting the power series for $\log(1+x)$ and using

$$\frac1k\frac1{s-k}=\frac1s\left(\frac1k+\frac1{s-k}\right)\;$$

yields

$$
\int_0^1\frac{\log^2(1+x)}x\mathrm dx=2\sum_{n=1}^\infty\frac{(-1)^{n+1}H_n}{(n+1)^2}\;.
$$

However, since the corresponding identity without the alternating sign is used to obtain the sum by evaluating the integral and not vice versa, I'm not sure that this constitutes progress.

Best Answer

The similar integral

$$ \int_0^1\frac{\log^2(1-x)}x\mathrm dx=2\zeta(3) $$

is evaluated in this blog post using the substitution $u=-\log(1-x)$:

$$ \begin{align} \int_0^1\frac{\log^2(1-x)}x\mathrm dx &= \int_0^\infty\frac{u^2}{1-\mathrm e^{-u}}\mathrm e^{-u}\,\mathrm du \\ &= \int_0^\infty u^2\sum_{n=1}^\infty\mathrm e^{-nu}\mathrm du \\ &= \sum_{n=1}^\infty\int_0^\infty u^2\mathrm e^{-nu}\mathrm du \\ &= \sum_{n=1}^\infty\frac2{n^3} \\ &= 2\zeta(3)\;. \end{align} $$

Analogously substituting $u=\log(1+x)$ in the present integral leads to an integral up to $\log2$ that can be evaluated in terms of polylogarithms evaluated at $\frac12$:

$$ \begin{align} &\int_0^{\log2}\frac{\log^2(1+x)}x\mathrm dx \\ =& \int_0^{\log2}\frac{u^2}{\mathrm e^u-1}\mathrm e^u\,\mathrm du \\ =& \int_0^{\log2}\frac{u^2}{1-\mathrm e^{-u}}\mathrm du \\ =& \int_0^{\log2} u^2\sum_{n=0}^\infty\mathrm e^{-nu}\mathrm du \\ =& \sum_{n=0}^\infty\int_0^{\log2} u^2\mathrm e^{-nu}\mathrm du \\ =& \sum_{n=0}^\infty\int_0^{\log2} u^2\mathrm e^{-nu}\mathrm du \\ =& \frac13\log^32+\sum_{n=1}^\infty\frac1n\left(-2^{-n}\log^22+2\int_0^{\log2} u\mathrm e^{-nu}\mathrm du\right) \\ =& \frac13\log^32+\sum_{n=1}^\infty\left(-\frac1n2^{-n}\log^22+\frac2{n^2}\left(-2^{-n}\log2+\int_0^{\log2}\mathrm e^{-nu}\mathrm du\right)\right) \\ =& \frac13\log^32+\sum_{n=1}^\infty\left(-\frac1n2^{-n}\log^22-\frac2{n^2}2^{-n}\log2-\frac2{n^3}\left(2^{-n}-1\right)\right) \\ =& \def\Li{\operatorname{Li}} \frac13\log^32-\Li_1\left(\frac12\right)\log^22-2\Li_2\left(\frac12\right)\log2-2\Li_3\left(\frac12\right)+2\zeta(3) \\ =& \frac13\log^32-\log2\log^22-2\left(\frac{\pi^2}{12}-\frac12\log^22\right)\log2-2\left(\frac16\log^32-\frac{\pi^2}{12}\log2+\frac78\zeta(3)\right)+2\zeta(3) \\ =& \frac{\zeta(3)}4\;. \end{align} $$

Not only is this a rather complicated derivation of a much simpler result; it also looks as if the polylogarithm values may have been obtained using the present integral in the first place.