The value of $\tan x+\tan \left(\frac{\pi}{3}+x\right)+\tan \left(\frac{2 \pi}{3}+x\right)$ is
(a) 3 tan 3x
(b) tan 3x
(c) 3 cot 3x
(d) cot 3x
(a) 3 tan 3x
$\frac{\pi}{3}=60^{\circ}, \frac{2 \pi}{3}=120^{\circ}$
$\tan x+\tan \left(60^{\circ}+x\right)+\tan \left(120^{\circ}+x\right)=\tan x+\frac{\tan 60^{\circ}+\tan x}{1-\tan 60^{\circ} \tan x}+\frac{\tan 120^{\circ}+\tan x}{1-\tan 120^{\circ} \tan x}$
$=\tan x+\frac{\sqrt{3}+\tan x}{1-\sqrt{3} \tan x}+\frac{(-\sqrt{3}+\tan x)}{1+\sqrt{3} \tan x}$
$=\frac{\tan x\left(1-3 \tan ^{2} x\right)+(\sqrt{3}+\tan x)(1+\sqrt{3} \tan x)+(-\sqrt{3}+\tan x)(1-\sqrt{3} \tan x)}{1-3 \tan ^{2} x}$
$=\frac{\tan x-3 \tan ^{3} x+\sqrt{3}+3 \tan x+\tan x+\sqrt{3} \tan ^{2} x+\tan x-\sqrt{3} \tan ^{2} x-\sqrt{3}+3 \tan x}{1-3 \tan ^{2} x}$
$=\frac{9 \tan x-3 \tan ^{3} x}{1-3 \tan ^{2} x}$
$=\frac{3\left(3 \tan x-\tan ^{3} x\right)}{1-3 \tan ^{2} x}$
$=3 \tan 3 x$