<s>[INST] Evaluating $\tan\frac\pi{12}-\cot\frac\pi{12}+\tan\frac{5\pi}6-\cot\frac{5\pi}6$ knowing the roots $3x^4+4\sqrt{3}x^3-18x^2-4\sqrt{3}x+3=0$ I know that the roots of this equation
$$3x^4+4\sqrt{3}x^3-18x^2-4\sqrt{3}x+3=0$$ are $x=\tan{\frac{\pi}{12}}, \tan{\frac{\pi}{3}}, \tan{\frac{7\pi}{12}}, \tan{\frac{5\pi}{6}}$.
I need to use this information to find the value of
$$\tan{\frac{\pi}{12}}-\cot{\frac{\pi}{12}}+\tan{\frac{5\pi}{6}}-\cot{\frac{5\pi}{6}}$$
I know that I can rearrange $\tan{\frac{\pi}{12}}-\cot{\frac{\pi}{12}}$ into $-2\left(\frac{2\tan{\frac{\pi}{12}}}{1-\tan{\frac{\pi}{12}}^2}\right)^{-1}$ and then use double angle to find the value but this doesn't use the part beforehand.
Also from playing on the calculator I know $-\cot{\frac{\pi}{12}}=\tan{\frac{7\pi}{12}}$ and that $-\cot{\frac{5\pi}{6}}=\tan{\frac{\pi}{3}}$ so if I can prove these two results I can just use sum of roots but I don't know how.
 [/INST] Like @WA Don: indicated, you use the formula
$$\tan(\theta + \frac{\pi}{2}) = \tan(\frac{\pi}{2}- (-\theta)) = \cot(-\theta) = -\cot \theta$$
and you are done.
Explaining the equation at the beginning: if $\tan \theta = x$, it expresses the equality
$$\tan 4 \theta = \tan \frac{\pi}{3} = \sqrt{3}$$
Indeed, we have
$$\tan 2 \theta = \frac{2 \tan \theta}{1- \tan^2 \theta}$$
and so
$$\tan 4 \theta = \frac{2 \tan 2 \theta}{1- \tan^2 2 \theta}= \frac{ 4(x-x^3)}{x^4 - 6 x^2 + 1}$$
Therefore, the equation
$$\tan 4 \theta = \tan \frac{\pi}{3}$$
is equivalent to
$$4(x-x^3)= \sqrt{3}( x^4 - 6 x^2 + 1)$$
or
$$3 x^4 + 4 \sqrt{3}x^3 - 18 x^2 - 4 \sqrt{3}x + 3 =0$$
Note that apriori, if $x$ is a root of the above equation, then $-\frac{1}{x}$ is also a root.
The fact that the numbers indicated are the roots follows from  simple trigonometry.
</s>