Compute $\int_0^{2\pi} \frac 1{\sin^4x+\cos^4x}dx$ 
Evaluate $\int_0^{2\pi} \frac 1{\sin^4x+\cos^4x}dx$

My attempt:
$I=\int_0^{2\pi}\frac 1{\sin^4x+\cos^4x}dx=\int_0^{2\pi}\frac 1{(\sin^2x+\cos^2x)^2-2\sin^2(2x)}dx=\int_0^{2\pi}\frac {1}{1-2\sin^2(2x)}dx=\frac 12\int_0^{4\pi}\frac 1{1-2\sin^2(x)}dx=\frac 12 \int_0^{4\pi}\frac {1}{\cos(\frac{x}2)}dx=\int_0^{2\pi}\frac 1{\cos x}dx=0$
So it actually is:
$$I=2\int_0^{2\pi}\frac {1}{2-\sin^2(2x)}dx=\int_0^{4\pi}\frac{1}{2-\sin^2(x)}dx=\int_0^{4\pi}\frac 1{1+\cos^2x}dx$$
Now if I try to make the substituion $u=\tan(\frac x2)$ I get integral from $0$ to $0$...Why?
What I am doing wrong?
 A: Under $x\to\tan x\to x-\frac1x$, one has
\begin{eqnarray}
&&\int_0^{2\pi} \frac 1{\sin^4x+\cos^4x}dx\\
&=&4\int_0^{\pi/2} \frac 1{\sin^4x+\cos^4x}dx\\
&=&4\int_0^{\pi/2} \frac {\sec^2x}{1+\tan^4x}\sec^2xdx\\
&=&4\int_0^{\infty} \frac{1+x^2}{1+x^4}dx\\
&=&4\int_0^{\infty} \frac{1+\frac1{x^2}}{x^2+\frac1{x^2}}dx\\
&=&4\int_0^{\infty} \frac{1}{\left(x-\frac1{x}\right)^2+2}d\left(x-\frac1x\right)\\
&=&4\int_{-\infty}^{\infty} \frac{1}{x^2+2}dx\\
&=&\frac{4}{\sqrt2}\arctan(\frac{x}{\sqrt2})|_{-\infty}^{\infty}\\
&=&2\pi\sqrt2.
\end{eqnarray}
A: One easy approach to this problem is by dividing both numerator and denominator by $\dfrac{\tan^4x}{\tan^4x}$
$$\dfrac{1}{\sin^4x+\cos^4x}\left(\dfrac{\tan^4x}{\tan^4x}\right)=\dfrac{\sec^4x}{1+\tan^4x}=\dfrac{(1+\tan^2x)\sec^2x}{1+\tan^4x}$$ 
Now you can use $u-$ substitution $u=\tan x$
Can you take it from here?
A: You know 
$$\sin^4x+\cos^4x=1-\dfrac12\sin^22x=1-\dfrac12\left(\dfrac{1-\cos4x}{2}\right)$$
is periodic with period $T=\dfrac{\pi}{2}$, so write 
$$\int_0^{2\pi} \frac 1{\sin^4x+\cos^4x}dx=4\int_0^\frac{\pi}{2}\dfrac{(1+\tan^2x)^2}{1+\tan^4x}dx=4\int_0^\infty\dfrac{1+t^2}{1+t^4}dt=4\dfrac{\pi}{\sqrt{2}}=\color{blue}{2\sqrt{2}\pi}$$
A: $\newcommand{\Re}{\operatorname{Re}}\newcommand{\Im}{\operatorname{Im}}$The integrand is periodic with period $\frac \pi 2$ hence:
\begin{align}
I:=\int^{2\pi}_0 \frac{1}{\sin^4 (x)+\cos^4(x)}\,dx = 4 \int^{\pi/2}_0 \frac{1}{\sin^4(x)+\cos^4(x)}\,dx
\end{align}
Applying Weierstrass substitution now leads to high order polynomial in the denominator, you can reduce the powers by noticing that:
\begin{align}
I &= 4\int^{\pi/2}_0 \Re\frac{1}{\sin^2(x)+i\cos^2(x)}-\Im \frac{1}{\sin^2(x)+i\cos^2(x)} \,dx \\
&= 4(\Re J- \Im J)
\end{align}
where $$J:= \int^{\pi/2}_0 \frac{1}{\sin^2(x)+i\cos^2(x)} \,dx$$ now we set $t=\tan(x)$ to get $$J = \int^\infty_0 \frac{1}{t^2+i}\,dt = \frac 1 2 \int^\infty_{-\infty}\frac{1}{t^2+i}\,dt$$
This integral is just a standard application of the Residue Theorem: 
$$J=\frac  \pi 2 e^{-i\pi/4}$$
So:
$$I = 2\pi \left[\cos\left(-\frac \pi 4 \right) -\sin\left(-\frac \pi 4 \right)\right] = 2\sqrt[]{2}\ \pi  $$
A: $\begin{align}
(\sin^2x+\cos^2x)^2-2\sin^2(2x) & = \sin^4x+\cos^4x + 2\sin^2x\cos^2x-2\sin^2(2x) \\& = 
\sin^4x+\cos^4x + 2\sin^2x\cos^2x-2(2\sin x \cos x)^2
\\& = 
\sin^4x+\cos^4x -6\sin^2x\cos^2x
\\& \neq
\sin^4x+\cos^4x 
\end{align} $
A: As has been noted, you occasionally get powers of $2$ wrong; for example, $2\sin^2 x\cos^2 x\ne 2\sin^2 2x$, and even if it were $1-2\sin^2 x$ is $\cos 2x$, not $\cos\frac{x}{2}$. Let's talk about a better approach. Odd powers of $s:=\sin x,\,c:=\cos x$ have period $2\pi$, like $\tan\frac{x}{2}$; but even powers have period $\pi$, like $\tan x$. So let's use a slight variant on the usual Weierstrass substitution, viz. $t=\tan x$ so $dx=\frac{dt}{1+t^2},\,c^2=\frac{1}{1+t^2},\,s^2=\frac{t^2}{1+t^2}$. The integrand actually has period $\pi/2$ (can you see why?), so $$\int_0^{2\pi}\frac{dx}{s^4+c^4}=4\int_0^\infty\frac{(1+t^2)dt}{(1+t^2)^2-2t^2}=2\sum_\pm\int_0^\infty\frac{dt}{1+t^2\pm t\sqrt{2}}.$$I'll leave the rest to you.
A: Note that the integrand has a period of $\pi/2$ since $$f\left(x+\frac{\pi}{4}\right) = \sin^4\left(x+\frac{\pi}{2}\right) + \cos^4\left(x+\frac{\pi}{2}\right) = (-\cos x)^4 + (\sin x)^4 = f(x) $$
So it's sufficient to compute
$$ \int_0^{2\pi} f(x)\ dx = 4\int_0^{\pi/2} f(x)\ dx $$
The comments have noted that
$$ \sin^4 x + \cos^4 x = (\sin^2 x + \cos^2 x) - 2\sin^2 x\cos^2 x = 1 - \frac{1}{2}\sin^2(2x) $$
with that in mind
$$ \frac{1}{\sin^4 x + \cos^4 x} = \frac{2}{2-\sin^2 (2x)} = \frac{2\sec^2 (2x)}{2\sec^2 (2x) - \tan^2(2x)} $$
The substitution $u = \tan (2x)$, then $du = 2\sec^2 (2x)\ dx$ and $\sec^2(2x) = u^2+1$, therefore
$$ \frac{2\sec^2 (2x)\ dx}{2\sec^2 (2x) - \tan^2(2x)} = \frac{du}{u^2 + 2} $$
A potential problem with this substitution is $\tan(2x)$ has a singularity at $x=\pi/4$. This is fine as the integrand is symmetric about this point, i.e.
$$ f\left(\frac{\pi}{2}- x\right) = \sin^4\left(\frac{\pi}{2}- x\right) + \cos^4 \left(\frac{\pi}{2}- x\right) = \cos^4 x + \sin^4 x = f(x) $$
So we can write
\begin{align} \int_0^{\pi/2} f(x)\ dx &= \int_0^{\pi/4} f(x)\ dx + \int_{\pi/4}^{\pi/2} f(x) \ dx \\
&= \int_0^{\pi/4} f(x)\ dx - \int_{\pi/4}^0 f\left(\frac{\pi}{2}-x\right)\ dx \\
&= 2\int_0^{\pi/4} f(x)\ dx
\end{align}
Continuing the integration, we find
$$ \int_{0}^{2\pi} f(x)\ dx = 8\int_0^{\pi/4} f(x)\ dx = 8\int_{0}^{\infty} \frac{1}{u^2+2} du = \frac{8}{\sqrt{2}}\arctan\left(\frac{u}{\sqrt{2}}\right)\Bigg|_0^\infty = \frac{8\pi}{2\sqrt{2}} $$
A: We have
$$\sin^4(x)+\cos^4(x)+2\sin^2(x)\cos^2(x)-2\sin^2(x)\cos^2(x)$$
and 
$$2\left(\frac{2\sin(x)\cos(x)}{2}\right)^2=\frac{1}{2}\sin^2(2x)$$
