5. The solution set of the equation about $x$
$$
|1-2 \sin x+\cos x|+2 \sin x+1=\cos 2 x
$$

is $\qquad$ .
5. $\{x \mid x=2 k \pi+\pi, k \in \mathbf{Z}\}$.

From the original equation, we get
$$
\begin{array}{l}
|1-2 \sin x+\cos x| \\
=\cos 2 x-2 \sin x-1 \\
=-2 \sin ^{2} x-2 \sin x \\
=-2 \sin x(\sin x+1) \geqslant 0 \\
\Rightarrow-1 \leqslant \sin x \leqslant 0 \\
\Rightarrow 1-2 \sin x+\cos x \geqslant 0 \\
\Rightarrow 1-2 \sin x+\cos x=-2 \sin ^{2} x-2 \sin x \\
\Rightarrow 2 \cos ^{2} x-\cos x-3=0 \\
\Rightarrow \cos x=\frac{3}{2} \text { (discard) or } \cos x=-1 \text {. }
\end{array}
$$

Therefore, the solution set of the equation is
$$
\{x \mid x=2 k \pi+\pi, k \in \mathbf{Z}\} .
$$