8.327. $\operatorname{ctg} x\left(1-\frac{1}{2} \cos 2 x\right)=1$.
## Solution.

Domain of definition: $\sin x \neq 0$.

$$
\begin{aligned}
& \text { By the formula } \cos \alpha=\frac{1-\operatorname{tg}^{2} \frac{\alpha}{2}}{1+\operatorname{tg}^{2} \frac{\alpha}{2}}, \text { we have } \\
& \frac{1}{\operatorname{tg} x}\left(1-\frac{1-\operatorname{tg}^{2} x}{2\left(1+\operatorname{tg}^{2} x\right)}\right)=1 \Leftrightarrow 2 \operatorname{tg}^{3} x-3 \operatorname{tg}^{2} x+2 \operatorname{tg} x-1=0 \Leftrightarrow
\end{aligned}
$$

$$
\begin{aligned}
& \Leftrightarrow\left(2 \operatorname{tg}^{3} x-2 \operatorname{tg}^{2} x\right)-\left(\operatorname{tg}^{2} x-2 \operatorname{tg} x+1\right)=0 \Leftrightarrow \\
& \Leftrightarrow 2 \operatorname{tg}^{2} x(\operatorname{tg} x-1)-(\operatorname{tg} x-1)^{2}=0,(\operatorname{tg} x-1)\left(2 \operatorname{tg}^{2} x-\operatorname{tg} x+1\right)=0
\end{aligned}
$$

From this,

1) $\operatorname{tg} x-1=0, \operatorname{tg} x=1, x=\frac{\pi}{4}+\pi k, k \in Z$;
2) $2 \operatorname{tg}^{2} x-\operatorname{tg} x+1 \neq 0(D<0), \varnothing$.

Answer: $x=\frac{\pi}{4}+\pi k, k \in Z$.