Find $\int_{0}^{2\pi} \frac{1}{\sin^4x + \cos^4x} dx$. I was wondering, how to calculate the following definite integral that appeared in an integration bee (preferably the quickest way possible).

$$\int_{0}^{2\pi} \frac{1}{\sin^4x + \cos^4x} dx$$
Note that
$$\sin^4 x + \cos^4 x = \frac{3+\cos(4x)}{4}$$
(see for example How to simplify $\sin^4 x+\cos^4 x$ using trigonometrical identities?).

Hence, by letting $z=e^{it}$, $dz=zidt$ and recalling that $\cos(t)=\frac{z+1/z}{2}$, we get
\begin{align*}
\int_{0}^{2\pi} \frac{1}{\sin^4x + \cos^4x} dx&amp;=
\int_{0}^{2\pi} \frac{d(4x)}{3+\cos(4x)} \\
&amp;=\int_{0}^{8\pi}\frac{dt}{3+\cos (t)}=4\int_{0}^{2\pi}\frac{dt}{3+\cos (t)}\\
&amp;=4 \int_{|z|=1} \frac{dz/(zi)}{3+\frac{z+1/z}{2}}\\
&amp;=\frac{8}{i} \int_{|z|=1} \frac{dz}{z^2 + 6z + 1}\\
&amp;=16\pi\,\mbox{Res}\left(\frac{1}{z^2 + 6z + 1},2\sqrt{2}-3\right)\\
&amp;=16\pi\,\left.\frac{1}{(z^2 + 6z + 1)'}\right|_{z=2\sqrt{2}-3}\\
&amp;=16\pi\,\frac{1}{2(2\sqrt{2}-3) + 6}=2\sqrt{2}\pi.
\end{align*}
Hint:

$$\sin^4x + \cos^4x = (\sin^2x + \cos^2x)^2 - 2\sin^2x\cos^2x = 1 - 2\sin^2x\cos^2x$$

And again

$$2\sin^2x\cos^2x = 2(\sin x \cos x)^2 = 2\left(\frac{\sin2x}{2}\right)^2 = \frac{1}{2}\sin^22x$$

Hence in the end

$$\sin^4x + \cos^4x = 1 - \frac{1}{2}\sin^22x$$

You can treat this.