8.348. $1-\sin 2x=\cos x-\sin x$.

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

8.348. $1-\sin 2x=\cos x-\sin x$.
## Solution.

Let's rewrite the equation as

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

From this, we have 1) $\cos x-\sin x=0$, 2) $\cos x-\sin x-1=0$.

1) $\operatorname{tg} x=1, x_{1}=\frac{\pi}{4}+\pi k=\frac{\pi}{4}(4 k+1), k \in Z$.
2) $\cos ^{2} \frac{x}{2}-\sin ^{2} \frac{x}{2}-2 \sin \frac{x}{2} \cos \frac{x}{2}-\cos ^{2} \frac{x}{2}-\sin ^{2} \frac{x}{2}=0 \Leftrightarrow$

$$
\Leftrightarrow 2 \sin ^{2} \frac{x}{2}+2 \sin \frac{x}{2} \cos \frac{x}{2}=0,2 \sin \frac{x}{2}\left(\sin \frac{x}{2}+\cos \frac{x}{2}\right)=0
$$

From this, either $\sin \frac{x}{2}=0, \frac{x}{2}=\pi l, x_{2}=2 \pi l, l \in Z$, or $\sin \frac{x}{2}+\cos \frac{x}{2}=0$, $\operatorname{tg} \frac{x}{2}=-1, \frac{x}{2}=-\frac{\pi}{4}+\pi n, x_{3}=-\frac{\pi}{2}+2 \pi n=\frac{\pi}{2}(4 n-1), n \in Z$.

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