<s>[INST] Showing $\int_{0}^{2\pi}\cos(x)\cos(2x)\cos(3x)\,dx = \frac\pi2$ An integral from MIT Integration Bee:

Show that
$$I = \int_{0}^{2\pi}\cos(x)\cos(2x)
\cos(3x)\,dx = \frac\pi2$$

This integral appeared in the 2019 paper. Below is my own solution:
$$\begin{align}
I &= \int_{0}^{2\pi}\cos(x)\cos(2x)(\cos x\cos2x-\sin x\sin2x)\,dx \\[6pt]
&= \int_{0}^{2\pi}\cos^2(x)\cos^2(2x) \,dx -\int_{0}^{2\pi}\cos(x)\cos(2x)\sin(x)\sin(2x)\, dx
\end{align}$$
Replacing $\cos^2(x)= \frac{1+\cos(2x)}{2}$ for the first integral and  $\sin(x)\cos(x)= \sin(2x)/2 $ for the second, we get
$$\begin{align}
&\int_{0}^{2\pi}\frac{1+\cos(2x)}{2}\cos^2(2x) dx-\frac{1}{2}\int_{0}^{2\pi}\cos(2x)\sin^2(2x) dx \\[6pt]
=\; &\frac{1}{2}\left(\int_{0}^{2\pi}\cos^2(2x)dx \, + \int_{0}^{2\pi}\cos(2x)\cos(4x)dx  \right) \\[6pt]
=\; &\frac{1}{2} \left( \pi + 0\right) \qquad \text{$\because$ the orthogonality of $\cos(mx)$} \\[6pt]
=\; &\frac\pi2
\end{align}$$
This solution is rather awkward, and I'm sure there's a better and faster approach to this integral. Could anyone provide a more elegant solution(or a sketch of it)? Thanks.
 [/INST] Another method:
$$I=\int_0^{2\pi} \cos x\cos 2x(\cos 3x+\cos x-\cos x)\, dx=\\
\int_0^{2\pi} \cos x \cos 2x (2\cos 2x\cos x-\cos x)\, dx=\\
\int_0^{2\pi} \cos^2x\cos 2x(2\cos2x-1)\,dx=\\
\int_0^{2\pi} 2\cdot \frac{1+\cos 2x}{2}\cdot \frac{1+\cos 4x}{2}\,dx- \frac{1+\cos 2x}{2}\cdot \cos 2x\,dx=\\
\int_0^{2\pi} \frac12+\frac12\cos 4x+\frac12\cos 2x\cos 4x-\frac12\cdot \frac{1+\cos 4x}{2}\,dx=\\
\pi+0+0-\frac{\pi}{2}-0=\frac{\pi}{2}.$$
</s>