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?

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.
