Show $\int_0^\infty \frac{\ln^2x}{(x+1)^2+1} \, dx=\frac{5\pi^3}{64}+\frac\pi{16}\ln^22$ Tried to evaluate the integral
$$I=\int_0^\infty \frac{\ln^2x}{(x+1)^2+1} \, dx$$
and managed to show that
\begin{align}
I &= \int_0^1 \frac{\ln^2x}{(x+1)^2+1} \, dx + \int_0^1 \frac{\ln^2x}{(x+1)^2+x^2} \, dx\\
&= \int_0^1 \frac{\ln^2x}{(x+1+i)(x+1-i)} \, dx 
 + \int_0^1 \frac{\ln^2x}{(x+1+ix )(x+1-ix )} \, dx\\ 
 &= -2\operatorname{Im}\operatorname{Li}_3\left(-\frac{1+i}2\right)
 -2\operatorname{Im} \operatorname{Li}_3(-1-i)
\end{align}
which is equal to $ \frac{5\pi^3}{64}+\frac\pi{16}\ln^22$.
It is perhaps unnecessary, though, to resort to evaluation in complex space. I would like to work out an elementary derivation of this integral result.

It is not bad if you write
$$(x+1)^2+1=(x-a)(x-b)$$
$$\frac 1{(x+1)^2+1}=\frac 1{a-b}\left(\frac 1{x-a}-\frac 1{x-b} \right)$$ making that you face two integrals
$$I_c=\int \frac {\log^2(x)}{x-c}\,dx=\log ^2(x) \log (x-c)-2\int \frac{ \log (x) \log (x-c)}{x}\,dx$$
$$I_c=-2 \text{Li}_3\left(\frac{x}{c}\right)+2 \log (x)
   \text{Li}_2\left(\frac{x}{c}\right)+\log ^2(x) \log \left(1-\frac{x}{c}\right)$$
