8.018. $\operatorname{ctg}\left(\frac{3 \pi}{2}+x\right)-\operatorname{tg}^{2} x=(\cos 2 x-1) \cos ^{-2} x$.

8.018. $\cot\left(\frac{3 \pi}{2}+x\right)-\tan^{2} x=(\cos 2 x-1) \cos^{-2} x$.
## Solution.

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

## We have

$-\operatorname{tg} x-\operatorname{tg}^{2} x=\frac{\cos 2 x-1}{\cos ^{2} x}, \frac{\sin x}{\cos x}+\frac{\sin ^{2} x}{\cos ^{2} x}=\frac{1-\cos 2 x}{\cos ^{2} x} \Leftrightarrow$

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

$\sin x(\cos x+\sin x-2 \sin x)=0, \sin x(\cos x-\sin x)=0$.

Then:

1) $\sin x=0, x_{1}=\pi k, \quad k \in Z$,

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

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