I computed this the following way.
Consider the integral $\int_0^\infty \frac{\log^2}{(x+1)^2 x}$.
Consider a keyhole complex contour $C$ with the slit in the positive real axis:
![]()
Then the integrals on the inner and outer circles vanish in the limit (is this correct?).
Indeed, if $\Gamma$ is the outer circle of radii $R$: $$ |\int_{\Gamma}|\le \sup_{\frac{\log^2 x}{(x+1)^2x}}\cdot long(\Gamma) \sim \frac{\log^2 R}{R^3}\cdot 2\pi R \to 0 $$
I can't figure out how to ceil the inner circle integral though.
Furthermore, in the limit where the slit width goes to $0$, if the integrals of the straight lines are $l_1$ and $l_2$: $$ \int_{l_2} \frac{\log^2 x}{(x+1)^2x} = - \int_{l_1} \frac{(\log x + 2\pi i)^2}{(x+1)^2x} = -\int_{l_1} \frac{\log^2 x}{(x+1)^2x} - 2\pi i \int{l_1}\frac{\log x}{(x+1)^2x} + 4\pi^2 \int{l_1}\frac{1}{(x+1)^2x} $$
And thus we have that in the limit: $$ \int_C = \int_{l_1} + \int_{l_2} + \int_\gamma + \int_\Gamma =\\ =- 2\pi i \int_0^\infty \frac{\log x}{(x+1)^2x} + 4\pi^2 \int{l_1}\frac{1}{(x+1)^2x} =2\pi i (Res(i) + Res(-i)) = -2\pi i \frac{\pi}{2} \implies \\ \int_0^\infty \frac{\log x}{(x+1)^2x} = \frac{\pi}{2} $$
Is this correct? How can I prove that the integral in the inner circle goes to $0$?