8.258. $\cos ^{3} z \cos 3 z+\sin ^{3} z \sin 3 z=\frac{\sqrt{2}}{4}$.
## Solution.

Let's write the equation as

$\cos ^{2} z(2 \cos z \cos 3 z)+\sin ^{2} z(2 \sin z \sin 3 z)=\frac{\sqrt{2}}{2}$.

Since

$$
\cos \alpha \cos \beta=\frac{1}{2}(\cos (\alpha-\beta)+\cos (\alpha+\beta)) \text { and }
$$

$\sin \alpha \sin \beta=\frac{1}{2}(\cos (\alpha-\beta)-\cos (\alpha+\beta))$, we have

$\cos ^{2} z(\cos 2 z+\cos 4 z)+\sin ^{2} z(\cos 2 z-\cos 4 z)=\frac{\sqrt{2}}{2} \Leftrightarrow$

$\Leftrightarrow\left(\cos ^{2} z \cos 2 z+\sin ^{2} z \cos 2 z\right)+\left(\cos ^{2} z \cos 4 z-\sin ^{2} z \cos 4 z\right)=\frac{\sqrt{2}}{2} \Leftrightarrow$ $\Leftrightarrow \cos 2 z\left(\cos ^{2} z+\sin ^{2} z\right)+\cos 4 z\left(\cos ^{2} z-\sin ^{2} z\right)=\frac{\sqrt{2}}{2} \Leftrightarrow$ $\Leftrightarrow \cos 2 z+\cos 4 z \cos 2 z=\frac{\sqrt{2}}{2} \Leftrightarrow \cos 2 z(1+\cos 4 z)=\frac{\sqrt{2}}{2} \Leftrightarrow$ $\Leftrightarrow \cos 2 z\left(1+2 \cos ^{2} 2 z-1\right)=\frac{\sqrt{2}}{2} \Leftrightarrow 2 \cos ^{3} 2 z=\frac{\sqrt{2}}{2} \Leftrightarrow \cos ^{3} 2 z=\frac{\sqrt{2}}{4} \Leftrightarrow$ $\Leftrightarrow \cos 2 z=\frac{\sqrt{2}}{2}, 2 z= \pm \frac{\pi}{4}+2 \pi k, z= \pm \frac{\pi}{8}+\pi k=\frac{\pi}{8}(8 k \pm 1), k \in Z$.

Answer: $z=\frac{\pi}{8}(8 k \pm 1), k \in Z$.