<s>[INST] How to prove $\tan x+\tan \left(x+\frac{\pi }{3}\right)+\tan \left(x+\frac{2\pi }{3}\right)=3\tan 3x$? The following is the equation.
\begin{eqnarray}
\tan x+\tan \left(x+\frac{\pi }{3}\right)+\tan \left(x+\frac{2\pi }{3}\right)&=&3\tan 3x\\
\tan x+\frac{\tan x+\tan \frac{\pi }{3}}{1-\tan x\space \tan \frac{\pi }{3}}+\frac{\tan x+\tan \frac{2\pi }{3}}{1-\tan x\space \tan \frac{2\pi }{3}} &=& 3\tan 3x\\
\end{eqnarray}
I think that : 
\begin{eqnarray}
\tan \frac{2\pi }{3}=-\tan \frac{\pi }{3}\\
\end{eqnarray}
Therefore,
\begin{eqnarray} \tan x+\frac{\tan x+\tan \frac{\pi }{3}}{1-\tan x\space \tan \frac{\pi }{3}}+\frac{\tan x-\tan \frac{\pi }{3}}{1+\tan x\space \tan \frac{\pi }{3}}&=&3\tan 3x\\ \end{eqnarray}
For me, it's too complex to continue...
Maybe there are something wrong. 
Are there any other methods to prove the answer easily?
Thank you for your attention.
 [/INST] Let $$\tan3x=\tan3A$$
$\implies 3x=n\pi+3A,x =\frac{n\pi}3+A$ where $n$ is any integer
We can set $x=A,\frac\pi3+A,\frac{2\pi}3+A$ (In fact, we can any three in-congruent values of $n\pmod 3$)
Now,
$$\tan3A=\tan3x=\frac{3\tan x-\tan^3x}{1-3\tan^2x}$$
On rearrangement, $$\tan^3x-3\tan3A\tan^2x-3\tan x+\tan3A=0$$ which is a cubic equation in $\tan x$
Now, apply Vieta's formula to find 
$\sum \tan x=3\tan3A,\prod\tan x=-\tan3A $
</s>