Solve this trigonometric equation ${\tan ^2}x + {\cot ^2}x - 3(\tan x - \cot x) = 0$ 
Solve the following equation. $${\tan ^2}x + {\cot ^2}x - 3(\tan x - \cot x) = 0.$$

I can't figure out the way to solve this equation. This was my attempt
\begin{array}{l}
{\tan ^2}x + {\cot ^2}x - 3(\tan x - \cot x) = 0\\
 \Leftrightarrow \frac{{{{\sin }^2}x}}{{{{\cos }^2}x}} + \frac{{{{\cos }^2}x}}{{{{\sin }^2}x}} - 3(\frac{{\sin x}}{{\cos x}} - \frac{{\cos x}}{{\sin x}}) = 0\\
 \Leftrightarrow \frac{{{{\sin }^4}x + {{\cos }^4}x}}{{{{\cos }^2}x + {{\sin }^2}x}} - 3\frac{{{{\sin }^2}x - {{\cos }^2}x}}{{\sin x\cos x}} = 0\\
 \Leftrightarrow \frac{{1 + 2{{\sin }^2}x{{\cos }^2}x}}{{{{\sin }^2}x{{\cos }^2}x}} + 3\frac{{\cos 2x}}{{\sin x\cos x}} = 0\\
 \Leftrightarrow \frac{4}{{(1 - \cos 2x)(1 + \cos 2x)}} + 2 + 3\frac{{\cos 2x}}{{\sin x\cos x}} = 0\\
 \Leftrightarrow \frac{4}{{1 - {{\cos }^2}2x}} + 2 + 3\frac{{\cos 2x}}{{\sin x\cos x}} = 0
\end{array}
I don't know how to solve after that. Can anyone help me? 

As an alternative to Michael Rozenberg's answer, let $u=\tan x$.  The equation becomes
$$u^2+{1\over u^2}-3\left(u-{1\over u}\right)=0$$
Multiplying through by $u^2$ to clear denominators, we wind up with 
$$u^4-3u^3+3u+1=0$$
The quartic factors into two quadratics:
$$u^4-3u^3+3u+1=(u^2-u-1)(u^2-2u-1)$$
The rest follows as in Michael's answer.
