Evaluating $I=\int_{-\infty}^\infty \frac{u^2}{5u^2\left(u^2+1\right)+2}\,\mathrm{d}u$? This integral popped up when I was trying to solve this integral : $$\int_{-\pi/2}^{\pi/2}\frac{\sin^2x}{4(\cos^4x+2\sin^4x)+2\sin^2 2x}\,dx $$
I simplified it a little bit, substituted $\tan(x)=u$ and came up with, 
$$I= \int_{-\infty}^\infty \frac{u^2}{5u^2\left(u^2+1\right)+2}\,\mathrm{d}u$$
any suggestions for how I can take it from here ?
 A: There might be a easy way out,taking from where @tilper left 
$$\begin{align}I&=\int_{-\infty}^{+\infty}\frac{2u^2}{8(1+2u^2+2u^4)}\,du\\&=\frac{1}{8}\int_{-\infty}^{+\infty}\frac{du}{(\sqrt{1+\sqrt{2}})^2+\left[u-\frac{1}{u\sqrt{2}}\right]^2}\\&=\frac{1}{8}\int_{-\infty}^{+\infty}\frac{du}{u^2+(\sqrt{1+\sqrt{2}})^2}\\&=\boxed{\frac{1}{8}\dfrac{1}{\sqrt{1+\sqrt{2}}}\cdot\pi}\end{align}$$
in the third step i used 

$$\int_{-\infty}^{+\infty}f(x)\,dx=\int_{-\infty}^{+\infty}f\left(x-\dfrac{a}{x} \right)\,dx ,a>0$$

A: For the fun of it :-)
\begin{align}
4(\cos^4x+2\sin^4x)+2\sin^2 2x&=4(1-\sin^2x)^2+8\sin^4x+2(2\sin x \cos x)^2\\
&=4-8\sin^2x+4\sin^4x+8\sin^4x+8\sin^2 x (1-\sin^2x)\\
&=4+4\sin^4x
\end{align}
Hence 
\begin{align}
I&=\int_{-\pi/2}^{\pi/2}\frac{\sin^2x}{4(\cos^4x+2\sin^4x)+2\sin^2 2x}\,dx\\
&=\frac14\int_{-\pi/2}^{\pi/2}\frac{\sin^2x}{1+\sin^4x}\,dx\\
&=\frac12\int_{0}^{\pi/2}\frac{\sin^2x}{1+\sin^4x}\,dx\\
&=\frac12\int_{0}^{\pi/2}\sin^2x\sum_{j=0}^{\infty}(-1)^j\sin^{4j}x\,dx\\
&=\frac12\sum_{j=0}^{\infty}(-1)^j\int_{0}^{\pi/2}\sin^{2\times\frac{4j+3}{2}-1}x\cos^{2\times\frac12-1}x\,dx\\
&=\frac14\sum_{j=0}^{\infty}(-1)^j \text{Beta}\left(\frac{4j+3}{2},\frac12\right)\\
&=\frac14\sum_{j=0}^{\infty}(-1)^j \frac{\Gamma(\frac12)\Gamma(2j+\frac32)}{\Gamma(2j+2)}\\
\end{align}
I am not sure how to pin the last down. I will be happy if someone would share thoughts on this :-)
A: If we assume, as in mickep's comment, that it's $\dfrac{u^2}{8u^4 + 8u^2+4},$ then we work first on factoring the denominator:
$$
8u^4 + (\cdots) + 4 = \Big( \sqrt8\, u^2 + 2\Big)^2 = 8u^4 + 8\sqrt 2\, u^2 + 2
$$
So
\begin{align}
8u^4 + 8u^2 + 4 & = \Big(8u^2 + 8\sqrt 2 u^2 + 2\Big) + (8u^2 - 8\sqrt 2\, u^2) \\[10pt]
& = (\sqrt8\,u^2 + 2)^2 + 8(1-\sqrt2)u^2 \\[10pt]
& = \Big( \sqrt8\,u^2 + 2\Big)^2 - \Big( \sqrt{8(\sqrt 2 - 1)} \, u \Big)^2 \\[10pt]
& = \Big( \sqrt8\, u^2 + 1 - \sqrt{8(\sqrt 2 - 1)}\,u\, \Big) \Big( \sqrt8\, u^2 + 1 + \sqrt{8(\sqrt 2 - 1)}\,u \, \Big).
\end{align}
You then have a product of two irreducible quadratic factors in the denominator. Do partial fractions accordingly.
You might also consider the tangent half-angle substitution:
$$
w = \tan \frac x 2
$$
which leads to
\begin{align}
\sin x & = \frac{2w}{1+w^2}, \\[10pt]
\cos x & = \frac{1-w^2}{1+w^2}, \\[10pt]
dx & = \frac{2\,dw}{1+w^2}.
\end{align}
A: This is more a comment than an answer.
Considering
$$\frac{\sin^2(x)}{4(\cos^4(x)+2\sin^4(x))+2\sin^2 (2x)}$$ the denominator can be simplified as $2\cos^2(2x)-4\cos(2x)+10$ and the numerator as $\frac{1-\cos(2x)} 2$.
So, for the time being, let $X=\cos(2x)$ and the integrand is then $$\frac{1-X}{4 (X-a) (X-b)}=\frac 1{4(a-b)}\left(\frac{1-a}{X-a} -\frac{1-b}{X-b}\right)$$ where $a=1-2i$, $b=1+2i$ are the roots of $2X^2-4X+10=0$.
So, we are basically facing simpler integrals looking like $$I=\int \frac{dx}{\cos(2x)-c}=\frac 1{\sqrt{1-c^2}}{\tanh ^{-1}\left(\sqrt{\frac{1+c}{1-c}}\tan (x)\right)}$$ and the problem becomes easy (assuming that you enjoy complex numbers).
