$4 \cdot 89$ Find all solutions to the equation $\cos ^{2} x+\cos ^{2} 2 x+\cos ^{2} 3 x=1$.

Translate the above text into English, please retain the original text's line breaks and format, and output the translation result directly.
[Solution] From $\cos ^{2} x+\cos ^{2} 2 x+\cos ^{2} 3 x=1$, we get
$$
\begin{array}{l}
\frac{1+\cos 2 x}{2}+\cos ^{2} 2 x+\frac{1+\cos 6 x}{2}=1, \\
\cos 2 x+\cos 6 x+2 \cos ^{2} 2 x=0, \\
2 \cos 4 x \cdot \cos 2 x+2 \cos ^{2} 2 x=0, \\
\cos 2 x(\cos 4 x+\cos 2 x)=0, \\
2 \cos 2 x \cos 3 x \cos x=0 .
\end{array}
$$

Therefore, we have
$$
\cos x=0 \text { or } \cos 2 x=0 \text { or } \cos 3 x=0 \text {. }
$$

From $\cos x=0$, we get $x=k \pi+\frac{\pi}{2}$ ( $k$ is an integer). From $\cos 2 x=0$, we get $x=\frac{k \pi}{2}+\frac{\pi}{4}$ ( $k$ is an integer). From $\cos 3 x=0$, we get $x=\frac{k \pi}{3}+\frac{\pi}{6}$ ( $k$ is an integer).
Since $\cos 3 x=\cos x$ ( $4 \cos ^{2} x-3$ ), the solutions $x=\frac{k \pi}{3}+\frac{\pi}{6}$ obtained from $\cos 3 x=0$ include the solutions $x=k \pi+\frac{\pi}{2}$ obtained from $\cos x=0$. Therefore, the solutions to the original equation are
$$
x=\frac{k \pi}{2}+\frac{\pi}{4} \text { or } \quad x=\frac{k \pi}{3}+\frac{\pi}{6}(k \text { is an integer }) \text {. }
$$