TITLE: prove $\int_0^\infty \frac{\log^2(x)}{x^2+1}\mathrm dx=\frac{\pi^3}{8}$ with real methods
QUESTION [12 upvotes]: Context: I looked up "complex residue" on google images, and saw this integral. I, being unfamiliar with the use of contour integration, decided to try proving the result without complex analysis. Seeing as I was stuck, I decided to ask you for help.
I am attempting to prove that 
$$J=\int_0^\infty\frac{\log^2(x)}{x^2+1}\mathrm dx=\frac{\pi^3}8$$
With real methods because I do not know complex analysis.
I have started with the substitution $x=\tan u$:
$$J=\int_0^{\pi/2}\log^2(\tan x)\mathrm dx$$
$$J=\int_0^{\pi/2}\log^2(\cos x)\mathrm dx-2\int_{0}^{\pi/2}\log(\cos x)\log(\sin x)\mathrm dx+\int_0^{\pi/2}\log^2(\sin x)\mathrm dx$$
But frankly, this is basically worse.
Could I have some help? Thanks.

Update: Wait I think I actually found a viable method
$$F(\alpha)=\int_0^\infty \frac{x^{\alpha}}{x^2+1}\mathrm dx$$
As I have shown in other posts of mine,
$$\int_0^\infty\frac{x^{2b-1}}{(1+x^2)^{a+b}}\mathrm dx=\frac12\mathrm{B}(a,b)=\frac{\Gamma(a)\Gamma(b)}{2\Gamma(a+b)}$$
so 
$$F(\alpha)=\frac12\Gamma\left(\frac{1+\alpha}2\right)\Gamma\left(\frac{1-\alpha}2\right)$$
And from 
$$\Gamma(1-s)\Gamma(s)=\frac\pi{\sin \pi s}$$
we see that
$$F(\alpha)=\frac\pi{2\cos\frac{\pi \alpha}{2}}$$
So $$J=F''(0)=\frac{\pi^3}8$$
Okay while I have just found a proof, I would like to see which ways you did it.

REPLY [6 votes]: \begin{align}
J&=\int_0^\infty\frac{\ln^2 x}{x^2+1}\mathrm dx\\
K&=\int_0^\infty\frac{\ln(x)}{x^2+1}\mathrm dx\\
K^2&=\int_0^\infty\frac{\ln x}{x^2+1}\mathrm dx\int_0^\infty\frac{\ln y}{y^2+1}\mathrm dy\\ 
&=\int_0^\infty \int_0^\infty\frac{\ln x\ln y}{(x^2+1)(y^2+1)}\mathrm dx\mathrm dy\\
&=\frac{1}{2}\int_0^\infty \int_0^\infty\frac{\ln(xy)^2-\ln^2 x-\ln^2 y}{(x^2+1)(y^2+1)}\mathrm dx\mathrm dy\\
&=\frac{1}{2}\int_0^\infty \int_0^\infty\frac{\ln(xy)^2}{(x^2+1)(y^2+1)}\mathrm dx\mathrm dy-\int_0^\infty \int_0^\infty\frac{\ln^2 x}{(x^2+1)(y^2+1)}\mathrm dx\mathrm dy\\
&=\frac{1}{2}\int_0^\infty \frac{1}{y^2+1}\left(\int_0^\infty\frac{\ln(xy)^2}{x^2+1}\mathrm dx\right)\mathrm dy-\frac{\pi}{2}J
\end{align}
Perform the change of variable $u=xy$ ($x$ is the variable)
\begin{align}K^2&=\frac{1}{2}\int_0^\infty \int_0^\infty\frac{y\ln^2 u}{(y^2+1)(y^2+u^2)}\mathrm du\mathrm dy-\frac{\pi}{2}J\\
&=\frac{1}{4}\int_0^\infty\frac{\ln^2 u}{1-u^2}\left[\ln\left(\frac{u^2+y^2}{1+y^2}\right)\right]_{y=0}^{y=\infty}\mathrm du-\frac{\pi}{2}J\\
&=-\frac{1}{2}\int_0^\infty\frac{\ln^3 u}{1-u^2}\mathrm du\\
&=-\frac{1}{2}\left(\int_0^1\frac{\ln^3 u}{1-u^2}\mathrm du+\int_1^\infty\frac{\ln^3 u}{1-u^2}\mathrm du\right)-\frac{\pi}{2}J\\
\end{align}
In the second integral perform the change of variable $v=\dfrac{1}{u}$
\begin{align}K^2&=-\int_0^1\frac{\ln^3 u}{1-u^2}\mathrm du-\frac{\pi}{2}J\\
&=\frac{1}{2}\int_0^1\frac{2u\ln^3 u}{1-u^2}\mathrm du-\int_0^1\frac{\ln^3 u}{1-u}\mathrm du-\frac{\pi}{2}J
\\\end{align}
In the first integral perform the change of variable $v=u^2$,
\begin{align}K^2&=\frac{1}{16}\int_0^1\frac{\ln^3 u}{1-u}\mathrm du-\int_0^1\frac{\ln^3 u}{1-u}\mathrm du-\frac{\pi}{2}J\\
&=-\frac{15}{16}\int_0^1\frac{\ln^3 u}{1-u}\mathrm du-\frac{\pi}{2}J\\
&=-\frac{15}{16}\times -6\zeta(4)-\frac{\pi}{2}J\\
&=\frac{45}{8}\zeta(4)-\frac{\pi}{2}J\\
\end{align}
Moreover, $K=0$ (perform the change of variable $v=\frac{1}{x}$)
Therefore,
\begin{align}J&=\frac{45}{4\pi}\zeta(4)\\
&=\frac{45}{4\pi}\times \frac{\pi^4}{90}\\
&=\boxed{\frac{\pi^3}{8}}
\end{align}