$5.36 \operatorname{tg} x \frac{3-\operatorname{tg}^{2} x}{1-3 \operatorname{tg}^{2} x}=\sin 6 x$.
5.36 Here $\operatorname{tg} x \neq \pm \frac{1}{\sqrt{3}}, \cos x \neq 0$. Transform the left side of the equation:

$$
\begin{aligned}
& \operatorname{tg} x \frac{3 \cos ^{2} x-\sin ^{2} x}{\cos ^{2} x-3 \sin ^{2} x}=\operatorname{tg} x \frac{2 \cos ^{2} x+\cos 2 x}{\cos 2 x-2 \sin ^{2} x}= \\
& =\operatorname{tg} x \frac{1+2 \cos 2 x}{2 \cos 2 x-1}=\frac{\sin x+2 \sin x \cos 2 x}{2 \cos x \cos 2 x-\cos x}= \\
& =\frac{\sin x+\sin 3 x-\sin x}{\cos x+\cos 3 x-\cos x}=\operatorname{tg} 3 x
\end{aligned}
$$

Then $\operatorname{tg} 3 x=\sin 6 x$, from which we get:

1) $\sin 3 x=0 ; x_{1}=\frac{\pi k}{3}$
2) $\cos ^{2} 3 x=\frac{1}{2}, 1+\cos 6 x=1, \cos 6 x=0 ; x_{2}=\frac{\pi}{12}(2 k+1)$.

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