TITLE: Integral $\int_0^\infty \log^2 x\frac{1+x^2}{1+x^4}dx=\frac{3 \pi^3}{16\sqrt 2}$
QUESTION [23 upvotes]: This integral below
$$
I:=\int_0^\infty \log^2 x\frac{1+x^2}{1+x^4}dx=\frac{3 \pi^3}{16 \sqrt 2}
$$
is what I am trying to prove.  Thanks.
We can not expand the denominator as a series since the domain of integration is for $x\in [0,\infty)$.  Next I wrote
$$
I=\int_0^\infty \log^2 x \frac{1+x^4-x^4+x^2}{1+x^4}dx=\int_0^\infty \log^2x \left(\frac{1+x^4}{1+x^4}+\frac{x^2-x^4}{1+x^4}\right)dx=\\
\int_0^\infty \log^2 x \, dx+\int_0^\infty \log^2 x \frac{x^2}{1+x^4}dx-\int_0^\infty \log^2 x \frac{x^4}{1+x^4}dx,
$$
however only the middle integral is convergent.  I am not sure how to go about solving this problem.  Thank you

REPLY [3 votes]: A little long answer, but let us consider the triple integral:
$$I=\int_{0}^{\infty}\int_{0}^{\infty}\int_{0}^{\infty} \frac{xy}{(1+x^2)(1+y^2)(1+x^2y^2z^4)} \ dz \ dy \ dx.$$ 
Integrating in this order, we use a u substitution $z=\frac{u}{\sqrt{xy}}$ and $\ dz =\frac{du}{\sqrt{xy}},$ and this transforms the integral into 
$$I=\int_{0}^{\infty}\int_{0}^{\infty}\int_{0}^{\infty} \frac{\sqrt{xy}\left(1+\frac{u^2}{xy} \right)}{(1+x^2)(1+y^2)(1+u^4)} \ du \ dy \ dx.$$ We can apply the well-known integral formula $$\int_{0}^{\infty} \frac{v^m}{1+v^n} \ dv =\frac{\pi}{n} \csc \left(\frac{\pi(m+1)}{n} \right)$$ to get that $$I=\frac{\pi^3}{2\sqrt{2}}.$$ Now let us reverse the order of integration as such. 
$$I=\int_{0}^{\infty}\int_{0}^{\infty}\int_{0}^{\infty} \frac{xy}{(1+x^2)(1+y^2)(1+x^2y^2z^4)} \ dy \ dz \ dx.$$ Using partial fractions or Mathematica, we can get that 
$$I= \int_{0}^{\infty}\int_{0}^{\infty} \frac{x(1+z^2)\ln(x)}{(1+x^2)(x^2z^4-1)} \ dz \ dx+\int_{0}^{\infty}\int_{0}^{\infty} \frac{2x(1+z^2)\ln(z)}{(1+x^2)(x^2z^4-1)} \ dz \ dx = J_1 + J_2.$$ Reverse the order of integration in $J_2$ and use partial fractions to see
$$J_2=4\int_{0}^{\infty}  \frac{(z^2+1)(\ln(z))^2}{z^4+1} \ dz.$$  Let's focus on $J_1.$ 
Integrating with respect to $z$ first with partial fractions gives 
$$J_1= \int_{0}^{\infty} \frac{\pi}{4\sqrt{x}} \frac{(1-x)\ln(x)}{1+x^2} \ dx,$$ and we expand 
$$J_1=-\int_{0}^{\infty}\int_{0}^{\infty} \frac{\pi(1-x)}{4\sqrt{x}} \frac{t}{(1+t^2)(1-t^2x^2)} \ dt \ dx,$$ which can be proven by partial fractions. 
Reverse the order of integration and use partial fractions again to get that
$$J_1= -\frac{\pi^2}{8} \int_{0}^{\infty} \frac{t+1}{\sqrt{t}(t^2+1)} \ dt,$$ which by the well-known formula I mentioned, can be shown that  $$J_1=\frac{-\pi^3}{4\sqrt{2}}.$$ 
Putting everything together now, we have that 
$$\frac{\pi^3}{2\sqrt{2}}=\frac{-\pi^3}{4\sqrt{2}}+4\int_{0}^{\infty}  \frac{(z^2+1)(\ln(z))^2}{z^4+1} \ dz,$$ which by some algebraic manipulation, gives us 
$$\int_{0}^{\infty}  \frac{(z^2+1)(\ln(z))^2}{z^4+1} \ dz= \frac{3 \pi^3}{16\sqrt{2}}.$$