Evaluating $\int \frac{\operatorname d \! x}{\sin^4{x}+\cos^4{x}+\sin^2{x}\cos^2{x}}$ How do you integrate
$$\frac{1}{\sin^4{x}+\cos^4{x}+\sin^2{x}\cos^2{x}}$$
or simply 
$$\frac{1}{1-\left(\frac{\sin{2x}}{2}\right)^2}.$$
 A: $$I=\int\frac{dx}{\sin^4x+\cos^4x+\sin^2x\cos^2x}=\int\frac{(1+\tan^2x)\sec^2x}{1+\tan^2x+\tan^4x}dx$$
Setting $\tan x=u,$
$$I=\int\frac{1+u^2}{1+u^2+u^4}du $$
Now as $\displaystyle 1+u^2+u^4=(1+u^2)^2-u^2=(1+u+u^2)(1-u+u^2),$
$\displaystyle\frac{2(1+u^2)}{1+u^2+u^4}=\frac{(1+u+u^2)+(1-u+u^2)}{(1+u+u^2)(1-u+u^2)}=\frac1{1+u+u^2}+\frac1{1-u+u^2}$
Now, $\displaystyle\frac1{1+u+u^2}=\frac4{(2u+1)^2+(\sqrt3)^2}$
Using Trigonometric substitution, set $\displaystyle2u+1=\sqrt3\tan\phi$
Similarly, for $\displaystyle\frac1{1-u+u^2}$
A: Note that  $$\frac{1}{\sin ^{4}x+\cos ^{4}x+\sin ^{2}x\cos ^{2}x}\ne \frac{1}{1+\left( \frac{
\sin 2x}{2}\right) ^{2}}.$$
Since
\begin{equation*}
\frac{1}{\sin ^{4}x+\cos ^{4}x+\sin ^{2}x\cos ^{2}x}=\frac{1}{1-\left( \frac{
\sin 2x}{2}\right) ^{2}}=\frac{4}{3+\cos ^{2}2x},
\end{equation*}
we will evaluate
$$I=\int\frac{4}{3+\cos ^{2}2x}\, dx.$$
We will use two substitutions: the trigonometric substitution $u=\cos 2x$ and the Euler substitution$\sqrt{1-u^{2}}=(u-1)t$ (third substitution of Euler) or $t=\frac{\sqrt{1-u^{2}}}{u-1}$. We obtain the following rational function of $t$ which is integrable by partial fractions decomposition. Each fraction is easily integrable by completing the square in the denominator.
$$\frac{t^{2}+1}{t^{4}+t^{2}+1} = \frac{1}{2\left( t^{2}+t+1\right) }+ \frac{1}{2\left(
t^{2}-t+1\right) }.$$
We have that
\begin{eqnarray*}
I &=&-2\int \frac{1}{\left( 3+u^{2}\right) \sqrt{1-u^{2}}}\,du \\[2ex]
&=&\int \frac{t^{2}+1}{t^{4}+t^{2}+1}\,dt =\int \frac{1}{2\left( t^{2}+t+1\right) }dt+\int \frac{1}{2\left(
t^{2}-t+1\right) }dt \\[2ex]
&=&\frac{\sqrt{3}}{3}\arctan \frac{\sqrt{3}\left( 4t+2\right) }{6}+\frac{
\sqrt{3}}{3}\arctan \frac{\sqrt{3}\left( 4t-2\right) }{6}+C \\[2ex]
&=&\frac{\sqrt{3}}{3}\arctan \frac{\sqrt{3}\left( \frac{4\sqrt{1-u^{2}}}{u-1}
+2\right) }{6}+\frac{\sqrt{3}}{3}\arctan \frac{\sqrt{3}\left( \frac{4\sqrt{
1-u^{2}}}{u-1}-2\right) }{6}+C \\[2ex]
&=&\frac{\sqrt{3}}{3}\arctan \frac{\sqrt{3}\left( \frac{4\sqrt{1-\cos ^{2}2x}
}{\cos 2x-1}+2\right) }{6}+\frac{\sqrt{3}}{3}\arctan \frac{\sqrt{3}\left( 
\frac{4\sqrt{1-\cos ^{2}2x}}{\cos 2x-1}-2\right) }{6}+C \\[2ex]
&=&\frac{1}{\sqrt{3}}\arctan \frac{ -2+\tan x }{\sqrt{3}\tan x}-\frac{1}{\sqrt{3}}\arctan \frac{ 2+\tan x }{\sqrt{3}\tan x}+C.
\end{eqnarray*}
A: Following the hint from David H in the comments, write
$$I=\int{{\rm d}x \over \sin^4(x)+\cos^4(x)+\sin^2(x)\cos^2(x)}=\int{{\rm d}x\over 1-{1\over4 }\sin^2(2x)}$$
Several substitutions work here, but the simplest one is $u=\tan(2x)$. Then ${\rm d}u={2{\rm d}x\over\cos^2(2x)}$, so we divide by $\cos^2(2x)$ in the nominator and the denominator, and use that ${1\over \cos^2(2x)}=1+\tan^2(2x)$. This gives
$$I={1\over 2}\int{{\rm d}u\over 1+{3\over 4}u^2}$$
Let $v={\sqrt{3}\over 2}u$, then
$$I={1\over\sqrt{3}}\int{{\rm d}v\over 1+v^2}={1\over\sqrt{3}}\arctan(v)+C={1\over \sqrt{3}}\arctan\Bigl({\sqrt{3}\over 2}\tan(2x)\Bigr)+C$$
