8.097. $\sin z-\sin ^{2} z=\cos ^{2} z-\cos z$.

Translate the above text into English, keeping the original text's line breaks and format, and output the translation result directly.

8.097. $\sin z-\sin ^{2} z=\cos ^{2} z-\cos z$.
Solution.

$\sin z+\cos z-\left(\sin ^{2} z+\cos ^{2} z\right)=0, \quad \sin z+\cos z-1=0$, $\sin 2\left(\frac{z}{2}\right)+\cos 2\left(\frac{z}{2}\right)-\left(\sin ^{2} \frac{z}{2}+\cos ^{2} \frac{z}{2}\right)=0, \Leftrightarrow 2 \sin \frac{z}{2} \cos \frac{z}{2}+\cos ^{2} \frac{z}{2}-$ $-\sin ^{2} \frac{z}{2}-\sin ^{2} \frac{z}{2}-\cos ^{2} \frac{z}{2}=0 \Leftrightarrow 2 \sin \frac{z}{2} \cos \frac{z}{2}-2 \sin ^{2} \frac{z}{2}=0 \Leftrightarrow$ $\Leftrightarrow 2 \sin \frac{z}{2}\left(\cos \frac{z}{2}-\sin \frac{z}{2}\right)=0$

From this:

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

Answer: $z_{1}=2 \pi n ; z_{2}=\frac{\pi}{2}(4 k+1) n, k \in Z$.