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?

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}} $$
