TITLE: Evaluate $\int_0^1\left(\frac{1}{\ln x} + \frac{1}{1-x}\right)^2 \mathrm dx$
QUESTION [57 upvotes]: Evaluate
$$\int_0^1\left(\frac{1}{\ln x} + \frac{1}{1-x}\right)^2 \mathrm dx$$

REPLY [7 votes]: A bit late to the party, but here is a slightly different approach that doesn't use any series, Stirling's approximations or anything, though does make use of some values of the zeta function.
First substitute $x=e^{-y}$ to get
$$\int_0^\infty \left(\frac{1}{1-e^{-y}}-\frac{1}{y}\right)^2 e^{-y}dy$$
The integrand is awkward because when you multiply it out, the pieces separately diverge. Multiplying it by $y^z$ regulates the singularity at 0 but also gives standard integrals. So for $Re(z)>1$ we have (by parts)
$$\int_0^\infty \frac{1}{(1-e^{-y})^2}e^{-y}y^zdy=z\int_0^\infty \frac{e^{-y}}{1-e^{-y}}y^{z-1}dy=z\zeta(z)\Gamma(z)$$
and
$$\int_0^\infty \frac{1}{y(1-e^{-y})}e^{-y}y^zdy=\zeta(z)\Gamma(z)$$
$$\int_0^\infty \frac{1}{y^2}e^{-y}y^zdy=\Gamma(z-1)$$
Putting the bits together:
$$\int_0^\infty \left(\frac{1}{1-e^{-y}}-\frac{1}{y}\right)^2 e^{-y}y^zdy = \Gamma(z)\left(\frac{1}{z-1}+(z-2)\zeta(z)\right)$$
The derivation was valid for $Re(z)>1$, but both sides of the above equation are analytic for $Re(z)>-1$ (RHS has a removable singularity at $z=0$), so by analytic continuation we may take the limit $z\to0$. Near $z=0$, $\Gamma(z)=1/z+O(1)$, and the final answer is the derivative of $1/(z-1)+(z-2)\zeta(z)$ at 0, i.e.,
$$-1+\zeta(0)-2\zeta'(0)=\log(2\pi)-\frac{3}{2}$$