Q:

Solve $\sqrt3 \cot^2 x - 2 \cot x - \sqrt3 = 0$

I thought it'd be nice to factor this as follows: $\sqrt3 \cot^2 x - 2 \cot x - \sqrt3 = 0 $, so: $(\sqrt3 \cot x + 1)(\cot x - \sqrt3) = 0$.
So there are 2 equations to solve:

$\sqrt3 \cot x + 1 = 0$. I thought to multiply both sides by $\tan
    x$, yielding: $\sqrt3 + \tan x = 0$. Hence: $\tan x = -\sqrt3$ and
$x = \{ -\frac{\pi}{3} + k\pi \}$
$\cot x - \sqrt3 = 0$, so $\cot x - \sqrt3 = 0$, $\cot x = \sqrt3$.
Multiplying by $\tan x$ yields: $1 = \sqrt3 \tan x$, dividing both
sides by $\sqrt3$: $\frac{\sqrt3}{3} = \tan x$, so $x = \{
\frac{\pi}{6} + k\pi\}$

Is this a correct approach? 

A:

Assuming $\tan x\neq 0$, multiplying throughout by $\tan^2x$, moving terms to RHS, and putting $t=\tan x$ gives
$$\sqrt3\ t^2+2t-\sqrt3=0\\
(\sqrt3\ t-1)(t+\sqrt3)=0\\
t=\tan x=\frac 1{\sqrt3}, -\sqrt3\\
x=n\pi+\frac {\pi}6, n\pi-\frac {\pi}3$$

