$\int_{1}^{\infty}\frac{x^2-1}{(x^2+1)\sqrt{x^4+1}}dx=$? Consider the convergent integral (I looked up difficult indefinite integrals on google images and then I saw this integrand and I was like hey let's see if it converges)
$$I=\int_{1}^{\infty}\frac{x^2-1}{(x^2+1)\sqrt{x^4+1}}dx$$
We have the numerical approximation $$I\approx0.5553603672697931...$$ 
Which Wolfram alpha says is close to $\frac\pi{4\sqrt{2}}$. All my attempts at this integral have been fruitless and I need some help. Here's the only attempt of mine that actually made the integrand smaller:
$x=\tan u$: $$I=\int_{\pi/4}^{\pi/2}\frac{\tan^2u-1}{\sqrt{\tan^4u+1}}du$$
Next step:
bang head on floor in agony
Any suggestions?
 A: Since $$x^4 + 1 = x^2 (x^2 + x^{-2}) = x^2 ((x + x^{-1})^2 - 2),$$ we have for $x > 0$
$$\frac{x^2-1}{(x^2+1)\sqrt{x^4 + 1}} = \frac{x^2 (1 - x^{-2})}{x^2 (x + x^{-1}) \sqrt{(x + x^{-1})^2 - 2}} = \frac{1-x^{-2}}{(x+x^{-1})\sqrt{(x+x^{-1})^2 - 2}}.$$  Now with the substitution $$u = x + x^{-1}, \quad du = (1 - x^{-2}) \, dx,$$ we obtain $$\int \frac{x^2-1}{(x^2+1)\sqrt{x^4 + 1}} \, dx = \int \frac{du}{u\sqrt{u^2-2}} = \frac{1}{2} \int \frac{2u \, du }{u^2 \sqrt{u^2 - 2}}.$$  One more substitution of the form $$u^2 = v^2 + 2, \quad 2u \, du = 2v \, dv$$ gives $$\frac{1}{2} \int \frac{2v \, dv}{(v^2 + 2)v} = \int \frac{dv}{v^2 + 2}.$$  This demonstrates that an elementary antiderivative exists, the computation of which I have left to you as a straightforward exercise.
A: This integral can be expressed in terms of cycles on a Riemann surface of a finite genus. Using the arguments of Gauss-Manin connection / Picard-Fuchs equation, we come to the conclusion that it's reasonable to expect the integral to be expressed in terms of elliptic / hypergeometric functions. And indeed, Maple gives us:

A: $$
\begin{aligned}
\int_{1}^{\infty} \frac{x^{2}-1}{\left(x^{2}+1\right) \sqrt{x^{4}+1}} d x =& \int_{1}^{\infty} \frac{1-\frac{1}{x^{2}}}{\left(x+\frac{1}{x}\right) \sqrt{x^{2}+\frac{1}{x^{2}}}} d x \\
=& \int \frac{d\left(x+\frac{1}{x}\right)}{\left(x+\frac{1}{x}\right) \sqrt{\left(x+\frac{1}{x}\right)^{2}-2}} \\
=& \int_{2}^{\infty} \frac{d u}{u \sqrt{u^{2}-2}},\textrm{ where }u=x+\frac{1}{x}.  \\
=& \int_{2}^{\infty} \frac{1}{u^{2}} d\left(\sqrt{u^{2}-2}\right) \\
=& \int_{2}^{\infty} \frac{d \sqrt{u^{2}-2}}{\left(\sqrt{u^{2}-2}\right)^{2}+2} \\
=& \frac{1}{\sqrt{2}}\left[\tan ^{-1} \frac{\sqrt{u^{2}-2}}{\sqrt{2}}\right]_{2}^{\infty} \\
=& \frac{1}{\sqrt{2}}\left(\frac{\pi}{2}-\frac{\pi}{4}\right)\\
=& \frac{\pi}{8} \sqrt{2}
\end{aligned}
$$
