prove $\int_0^\infty \frac{\log^2(x)}{x^2+1}\mathrm dx=\frac{\pi^3}{8}$ with real methods 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.

Notice that$$
\int_0^{\infty} \frac{\ln ^2 x}{x^2+1} d x =J^{\prime \prime}(0), $$
$\text { where } J(a) =\int_0^{\infty} \frac{x^a}{x^2+1} d x 
$, which is then transformed into a beta function by letting $x=\tan x.$
\begin{aligned}
J(a)&=\int_0^{\frac{\pi}{2}} \tan ^a \theta d \theta \\
&=\int_0^{\frac{\pi}{2}} \sin ^a \theta \cos ^a \theta d \theta \\
&=\frac{1}{2} B\left(\frac{a+1}{2}, \frac{1-a}{2}\right)
\end{aligned}
Differentiating $J(a)$ twice w.r.t. $a$ yields
$$
\begin{aligned}
J^{\prime \prime}(a)=& \frac{1}{8} B\left(\frac{a+1}{2}, \frac{1-a}{2}\right)\left[\psi^{\prime}\left(\frac{a+1}{2}\right)+\psi^{\prime}\left(\frac{1-a}{2}\right)\right] \\&+\frac{1}{8} B^2\left(\frac{a+1}{2}, \frac{1-a}{2}\right)\left[\psi\left(\frac{a+1}{2}\right)-\psi\left(\frac{1-a}{2}\right)\right]^2
\end{aligned}
$$
$$
\int_0^{\infty} \frac{\ln ^2 x}{x^2+1} d x  = J^{\prime \prime}(0)=\frac{1}{8} B\left(\frac{1}{2}, \frac{1}{2}\right)\left[\psi^{\prime}\left(\frac{1}{2}\right)+\psi^{\prime}\left(\frac{1}{2}\right)\right] =\frac{\pi}{8}\left(\pi^2\right)=\frac{\pi^3}{8} $$
