ĐK: $\begin{cases} \sin x\ne 0\\ \cos x\ne 0\end{cases}$
$\to x\ne \dfrac{k\pi}{2}$
$\cot^2x-\tan^2x=0$
$\to (\tan x-\cot x)(\tan x+\cot x)=0$
$\to \left[ \begin{array}{l} \tan x-\cot x=0\\ \tan x+\cot x=0\end{array} \right.$
$\to \left[ \begin{array}{l}\tan x=\cot x=\tan\left(\dfrac{\pi}{2}-x\right) \\ \dfrac{\sin x}{\cos x}+\dfrac{\cos x}{\sin x}=0\end{array} \right.$
$\to \left[ \begin{array}{l}x=\dfrac{\pi}{2}-x+k\pi \\ \dfrac{1}{\sin x\cos x}=0\quad(VN, \text{loại})\end{array} \right.$
$\to x=\dfrac{\pi}{4}+\dfrac{k\pi}{2}$ (TM)
$0<x<2\pi\to 0<\dfrac{\pi}{4}+\dfrac{k\pi}{2}<2\pi$
$\to -0,5<k<3,5$
$\to k\in\{0;1;2;3\}$
Vậy PT có các nghiệm trên $(0;2\pi)$: $x\in\left\{ \dfrac{\pi}{4}; \dfrac{3\pi}{4}; \dfrac{5\pi}{4}; \dfrac{7\pi}{4}\right\}$
Tổng nghiệm:
$\dfrac{\pi+3\pi+5\pi+7\pi}{4}=4\pi$