<s>[INST] Integrate $\sin^4(4x)/\sin^2(x)$ I would like to compute
$$\int_{0}^{2\pi} \frac{\sin^4(4x)}{\sin^2(x)} \mathrm{d}x.$$
Wolfram|Alpha is able to compute an antiderivative explicitly so I do not think use of the residue theorem is needed, but I'm interested in any approach.
 [/INST] We can compute the integral by Fourier series. Consider
\begin{align}
f(x) = \frac{\sin^2(4x)}{\sin x}
\end{align}
then the sine series expansion of $f$ is given by
\begin{align}
f(x) = \sin x + \sin 3x + \sin 5x + \sin 7 x.
\end{align}
In particular, we see
\begin{align}
\int^{2\pi}_0 f^2(x)\ dx = \int^{2\pi}_0 \sin^2 x+ \sin^2(3x) + \sin^2(5x) + \sin^2(7x)\ dx 
\end{align}
since
\begin{align}
\int^{2\pi}_0 \sin(nx) \sin(mx) \ dx = 0 \ \ \text{ if } \ \ n\neq m. 
\end{align}
Lastly, we have that
\begin{align}
\int^{2\pi}_0 \sin^2(n x)\ dx = \frac{1}{2}\int^{2\pi}_0 1-\cos(2nx)\ dx = \pi. 
\end{align}
Thus, it follows
\begin{align}
\int^{2\pi}_0 \frac{\sin^4(4x)}{\sin^2 x}\ dx = 4\pi. 
\end{align}
Remark: The hard work lies in finding the sine series expansion. 
</s>