Solution
= Solution
<De Moivre's theorem> states $(\cos x+i\sin x)^n=\cos(nx)+i\sin(nx)$ for integer $n$. For $n=3$, expanding the cube and taking its real part gives
$$
\cos(3x)=\cos^3x-3\cos x\sin^2x.
$$
Rearranging gives the required identity with
$$
\boxed{a=1,\qquad b=3.}
$$
No division by $\cos x$ is needed, so the proof also covers its zeros.