8.340. $1+\sin z+\cos z+\sin 2z+\cos 2z=0$.
## Solution.

## Rewrite the equation as

$$
\begin{aligned}
& \sin ^{2} z+\cos ^{2} z+\sin z+\cos z+2 \sin z \cos z+\cos ^{2} z-\sin ^{2} z=0 \Leftrightarrow \\
& \Leftrightarrow(\sin z+\cos z)+\left(2 \sin z \cos z+2 \cos ^{2} z\right)=0 \Leftrightarrow \\
& \Leftrightarrow(\sin z+\cos z)+2 \cos z(\sin z+\cos z)=0 \Leftrightarrow \\
& \Leftrightarrow(\sin z+\cos z)(1+2 \cos z)=0
\end{aligned}
$$

From this, 1) $\sin z+\cos z=0$, 2) $1+2 \cos z=0$.

1) $\operatorname{tg} z=-1, z_{1}=-\frac{\pi}{4}+\pi k=\frac{\pi}{4}(4 k-1), k \in Z$.
2) $\cos z=-\frac{1}{2}, z_{2}= \pm \frac{2}{3} \pi+2 \pi n=\frac{2}{3} \pi(3 n \pm 1), n \in Z$.

Answer: $z_{1}=\frac{\pi}{4}(4 k-1) ; z_{2}=\frac{2}{3} \pi(3 n \pm 1)$, where $k$ and $n \in Z$.