How to integrate $\int_{0}^{2\pi} \frac{1}{\sin^4x + \cos^4 x} \,dx$ So I followed the explanations made in this post and I got that:
$$\int \frac{1}{\sin^4x + \cos^4 x} \,dx = \frac{\sqrt{2}}{2}\arctan\left(\frac{\sqrt{2}}{2}\tan\left(2x\right)\right) + C$$
But when I try to use the Leibniz-Newton formula and evaluate the integral from $0$ to $2\pi$ I get that it's $0$ because $\tan\left(2x\right)$ evaluates to $0$ at both $x=0$ and $x=2\pi$. Is there another way to solve this integral and get the correct answer ($2\pi\sqrt2$)?

Given integral $$ I  = \int^{2 \pi}_0 \cfrac{1}{\sin^4 x + \cos^4 x} dx = 4 \int^{\pi/2}_0 \cfrac{dx}{\sin^4 x + \cos^4 x} $$
By repeatedly using $ \int^{2a}_0 f(x) dx = \int^a_0 f(x) dx + \int^a_0 f(2a-x) dx$
On multiplying numerator and denominator by $ \sec^4(x)$, followed by substitution of $\tan(x) = u$ $$ \begin{align} I &= 4 \int^{\infty}_0 \cfrac{1 + u^2}{1+ u^4} du \\ &= 4 \int^{\infty}_0 \cfrac{1}{\bigg( u - \frac{1}{u} \bigg)^2 + 2} d \bigg( u - \frac{1}{u} \bigg) \\ &= \cfrac{4}{\sqrt{2}} \arctan \bigg(\cfrac{u-\frac{1}{u}}{\sqrt{2}} \bigg) \bigg|^{\infty}_0 = 2 \sqrt{2} \pi\end{align} $$ 
