4. (ROM) Solve the equation  
$$ \cos ^{2} x+\cos ^{2} 2 x+\cos ^{2} 3 x=1 . $$
4. Since $\cos 2 x=1+\cos ^{2} x$ and $\cos \alpha+\cos \beta=2 \cos \left(\frac{\alpha+\beta}{2}\right) \cos \left(\frac{\alpha-\beta}{2}\right)$, we have $\cos ^{2} x+\cos ^{2} 2 x+\cos ^{2} 3 x=1 \Leftrightarrow \cos 2 x+\cos 4 x+2 \cos ^{2} 3 x=$ $2 \cos 3 x(\cos x+\cos 3 x)=0 \Leftrightarrow 4 \cos 3 x \cos 2 x \cos x=0$. Hence the solutions are $x \in\{\pi / 2+m \pi, \pi / 4+m \pi / 2, \pi / 6+m \pi / 3 \mid m \in \mathbb{Z}\}$.