4. Solve the system of equations $\left\{\begin{array}{l}2 \cos ^{2} x-2 \sqrt{2} \cos x \cos ^{2} 8 x+\cos ^{2} 8 x=0, \\ \sin x=\cos y .\end{array}\right.$
Solution:

Solve the 1st equation of the system:

$2 \cos ^{2} x-2 \sqrt{2} \cos x \cos ^{2} 8 x+\cos ^{2} 8 x=0 \Leftrightarrow\left(\sqrt{2} \cos x-\cos ^{2} 8 x\right)^{2}+\cos ^{2} 8 x \sin ^{2} 8 x=0 \Leftrightarrow$ $\left\{\begin{array}{l}\sqrt{2} \cos x-\cos ^{2} 8 x=0, \\ \cos ^{2} 8 x \sin ^{2} 8 x=0\end{array} \Leftrightarrow\left\{\begin{array}{l}\cos x=0, \\ \cos 8 x=0,\end{array}\right.\right.$ or $\left\{\begin{array}{l}\sqrt{2} \cos x-1=0, \\ \sin 8 x=0 .\end{array}\right.$ The first system has no solutions. The second system has solutions $x= \pm \frac{\pi}{4}+2 \pi k, k \in Z$.

Returning to the original system of equations, we get an equivalent system

$\left\{\begin{array}{l}x= \pm \frac{\pi}{4}+2 \pi k, k \in Z, \\ \sin x=\cos y .\end{array} \Leftrightarrow\left[\begin{array}{l}\left\{\begin{array}{l}x=\frac{\pi}{4}+2 \pi k, k \in Z, \\ \cos y=\sqrt{2} / 2 ;\end{array}\right. \\ \left\{\begin{array}{l}x=-\frac{\pi}{4}+2 \pi k, k \in Z, \\ \cos y=-\sqrt{2} / 2 .\end{array}\right.\end{array} \Leftrightarrow\left[\begin{array}{l}\left\{\begin{array}{l}x=\frac{\pi}{4}+2 \pi k, k \in Z, \\ y= \pm \frac{\pi}{4}+2 \pi n, n \in Z ;\end{array}\right. \\ \left\{\begin{array}{l}x=-\frac{\pi}{4}+2 \pi k, k \in Z, \\ y= \pm \frac{3 \pi}{4}+2 \pi n, n \in Z .\end{array}\right.\end{array}\right.\right.\right.$

Answer: $\left(\frac{\pi}{4}+2 \pi k, \pm \frac{\pi}{4}+\pi n\right),\left(-\frac{\pi}{4}+2 \pi k, \pm \frac{3 \pi}{4}+\pi n\right), k, n \in Z$.