8.361. $\operatorname{tg} x-\operatorname{ctg} x=\sin ^{-1} x-\cos ^{-1} x$.

8.361. $\tan x - \cot x = \sin^{-1} x - \cos^{-1} x$.
Solution.

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

## Write the equation in the form

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

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

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

From this 1) $\sin x-\cos x=0 ; 2) \sin x+\cos 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) $2 \sin \frac{x}{2} \cos \frac{x}{2}+\cos ^{2} \frac{x}{2}-\sin ^{2} \frac{x}{2}+\cos ^{2} \frac{x}{2}+\sin ^{2} \frac{x}{2}=0 \Leftrightarrow$

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

From this $\cos \frac{x}{2}=0, \frac{x}{2}=\frac{\pi}{2}+\pi n, x_{2}=\pi+2 \pi n, n \in Z$, or $\sin \frac{x}{2}+\cos \frac{x}{2}=0 \Leftrightarrow$ $\Leftrightarrow \operatorname{tg} \frac{x}{2}=-1, \frac{x}{2}=-\frac{\pi}{4}+\pi l, x_{3}=-\frac{\pi}{2}+2 \pi l, l \in Z ; x_{2}$ and $x_{3}$ do not satisfy the domain of definition. Answer: $x=\frac{\pi}{4}(4 k+1), k \in Z$.