Prove that: \[ \tan x+\tan\left(\frac{\pi}{3}+x\right) -\tan\left(\frac{\pi}{3}-x\right) = 3\tan 3x \]
Solution
Let
\[
\tan x=t
\]
Using the formula
\[
\tan(A\pm B)
=
\frac{\tan A \pm \tan B}{1 \mp \tan A\tan B}
\]
and
\[
\tan\frac{\pi}{3}=\sqrt{3}
\]
we get
\[
\tan\left(\frac{\pi}{3}+x\right)
=
\frac{\sqrt{3}+t}{1-\sqrt{3}t}
\]
\[
\tan\left(\frac{\pi}{3}-x\right)
=
\frac{\sqrt{3}-t}{1+\sqrt{3}t}
\]
Now consider the left hand side:
\[
LHS
=
t+\frac{\sqrt{3}+t}{1-\sqrt{3}t}
-\frac{\sqrt{3}-t}{1+\sqrt{3}t}
\]
Take the common denominator:
\[
(1-\sqrt{3}t)(1+\sqrt{3}t)
=
1-3t^2
\]
Therefore,
\[
LHS
=
\frac{
t(1-3t^2)
+(\sqrt{3}+t)(1+\sqrt{3}t)
-(\sqrt{3}-t)(1-\sqrt{3}t)
}
{1-3t^2}
\]
Expand the terms:
\[
(\sqrt{3}+t)(1+\sqrt{3}t)
=
\sqrt{3}+4t+\sqrt{3}t^2
\]
\[
(\sqrt{3}-t)(1-\sqrt{3}t)
=
\sqrt{3}-4t+\sqrt{3}t^2
\]
Substituting,
\[
LHS
=
\frac{
t-3t^3+\sqrt{3}+4t+\sqrt{3}t^2
-\sqrt{3}+4t-\sqrt{3}t^2
}
{1-3t^2}
\]
\[
=
\frac{9t-3t^3}{1-3t^2}
\]
\[
=
\frac{3(3t-t^3)}{1-3t^2}
\]
Using the identity
\[
\tan 3x
=
\frac{3t-t^3}{1-3t^2}
\]
we get
\[
LHS=3\tan 3x
\]
Hence proved.