<s>[INST] How do I solve this definite integral: $\int_0^{2\pi} \frac{dx}{\sin^{4}x + \cos^{4}x}$? $$\int_0^{2\pi} \frac{dx}{\sin^{4}x + \cos^{4}x}$$
I have already solved the indefinite integral by transforming $\sin^{4}x + \cos^{4}x$ as follows:
$\sin^{4}x + \cos^{4}x = (\sin^{2}x + \cos^{2}x)^{2} - 2\cdot\sin^{2}x\cdot\cos^{2}x = 1 - \frac{1}{2}\cdot\sin^{2}(2x) = \frac{1 + \cos^{2}(2x)}{2}$, 
and then using the $\tan(2x) = t$ substitution. But if I do the same with the definite integral, both bounds of the integral become $0$.
 [/INST] Let $z=e^{i x}$; then $dx = -i dz/z$ and the integral is equal to
$$-i 8 \oint_{|z|=1} dz \frac{z^3}{z^8 + 6 z^4+1}$$
By the residue theorem, the integral is then equal to $i 2 \pi$ times the sum of the residues at each pole inside the unit circle.  The residue at each pole $z_k$ is equal to
$$-i 8 \frac{z_k^3}{8 z_k^7 + 24 z_k^3} = -i \frac1{z_k^4+3}$$
Each pole $z_k$ inside the unit circle satisfies $z_k^4+3=2 \sqrt{2}$, so the integral is therefore
$$2 \pi \frac{4}{2 \sqrt{2}} = 2 \sqrt{2} \pi$$ 
</s>