8.369. $\operatorname{ctg} x-\operatorname{tg} x=\sin x+\cos x$.

8.369. $\cot x - \tan x = \sin x + \cos x$.
## Solution.

Domain of definition: $\left\{\begin{array}{l}\sin x \neq 0, \\ \cos x \neq 0 .\end{array}\right.$

## Rewrite the equation as

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

From this, 1) $\cos x+\sin x=0 ; 2) \cos x-\sin x-\sin x \cos x=0$.

1) $\operatorname{tg} x=-1, x_{1}=-\frac{\pi}{4}+\pi k=\frac{\pi}{4}(4 k-1), k \in Z$.
2) Let $\cos x-\sin x=y \Rightarrow \cos ^{2} x-2 \sin x \cos x+\sin ^{2} x=y^{2},-2 \sin x \cos x=$ $=y^{2}-1,-\sin x \cos x=\frac{y^{2}-1}{2}$. The equation in terms of $y$ becomes $y+\frac{y^{2}-1}{2}=0, y^{2}+2 y-1=0$, from which $y_{1}=-1-\sqrt{2}, \varnothing ; y_{2}=-1+\sqrt{2}$.

From this

$\cos x-\sin x=\sqrt{2}-1 \Leftrightarrow \frac{1}{\sqrt{2}} \cos x-\frac{1}{\sqrt{2}} \sin x=\frac{\sqrt{2}-1}{\sqrt{2}} \Leftrightarrow$

$\Leftrightarrow \sin \left(\frac{\pi}{4}-x\right)=\frac{\sqrt{2}-1}{\sqrt{2}} \Leftrightarrow \sin \left(x-\frac{\pi}{4}\right)=\frac{1-\sqrt{2}}{\sqrt{2}}$,

$x-\frac{\pi}{4}=(-1)^{n} \arcsin \frac{1-\sqrt{2}}{\sqrt{2}}+\pi n, x_{2}=(-1)^{n} \arcsin \frac{1-\sqrt{2}}{\sqrt{2}}+\frac{\pi}{4}+\pi n, n \in Z$.

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