Đk: $\left\{ \begin{array}{l} \cos x\ne0 \\ \sin x\ne 0 \end{array} \right .\Leftrightarrow \sin 2x\ne0$
$\Leftrightarrow 2x\ne k\pi$
$\Leftrightarrow x\ne k\dfrac{\pi}{2}$
Phương trình tương đương:
$(\tan x-\cot x)^2-(\tan x-\cot x)-2=0$
$\Rightarrow \left[ \begin{array}{l} \tan x-\cot x=2 (1)\\ \tan x-\cot x=-1(2)\end{array} \right .$
$(1)\Rightarrow \dfrac{\sin x}{\cos x}-\dfrac{\cos x}{\sin x}=2$
$\Rightarrow \dfrac{{\sin}^2x-{\cos}^2x}{\cos x\sin x}=2$
$\Rightarrow -2\cos 2x=2$
$\Rightarrow \cos 2x=-1$
$\Rightarrow 2x=\pi+k2\pi$
$\Rightarrow x=\dfrac{\pi}{2}+k\pi(l)$
$(2)\Rightarrow -2\cos 2x=-1$
$\Rightarrow \cos 2x=\dfrac{1}{2}$
$\Rightarrow 2x=\dfrac{\pm\pi}{3}+k2\pi$
$\Rightarrow x=\dfrac{\pm\pi}{6}+k\pi,(k\in\mathbb Z)(tm)$.