<s>[INST] Problem in the solution of a trigonometric equation $\tan\theta + \tan 2\theta+\tan 3\theta=\tan\theta\tan2\theta\tan3\theta$ 
I needed to solve the following equation:
  $$\tan\theta + \tan 2\theta+\tan 3\theta=\tan\theta\tan2\theta\tan3\theta$$

Now, the steps that I followed were as follows.
Transform the LHS first:
$$\begin{split}
\tan\theta + \tan 2\theta+\tan 3\theta
 &= (\tan\theta + \tan 2\theta)
    + \dfrac{\tan\theta + \tan 2\theta}
            {1-\tan\theta\tan2\theta} \\
 &= \dfrac{(\tan\theta + \tan 2\theta)(2-\tan\theta\tan2\theta)}
          {1-\tan\theta\tan2\theta}
\end{split}$$
And, RHS yields
$$\begin{split}
\tan\theta\tan2\theta\tan3\theta
  &= (\tan\theta\tan2\theta)\dfrac{\tan\theta + \tan 2\theta}
     {1-\tan\theta\tan2\theta}
\end{split}$$
Now, two terms can be cancelled out from LHS and RHS, yielding the equation:
$$
\begin{split}
2-\tan\theta\tan2\theta &= \tan\theta\tan2\theta\\
\tan\theta\tan2\theta &= 1,
\end{split}$$
 which can be further reduced as:
$$\tan^2\theta=\frac{1}{3}\implies\tan\theta=\pm\frac{1}{\sqrt3}$$
Now, we can yield the general solution of this equation:
$\theta=n\pi\pm\dfrac{\pi}{6},n\in Z$. But, setting $\theta=\dfrac{\pi}{6}$ in the original equation is giving one term $\tan\dfrac{\pi}{2}$, which is not defined.
What is the problem in this computation?
 [/INST] Set, provisionally, $x=\tan\theta$ and $y=\tan2\theta$. Then the equation becomes
$$
x+y+\frac{x+y}{1-xy}=xy\frac{x+y}{1-xy}
$$
Note that the expression only makes sense for $1-xy\ne0$.
After removing the denominator, we get
$$
(x+y)(2-xy)=xy(x+y)
$$
so this becomes
$$
2(x+y)(1-xy)=0
$$
Since $1-xy\ne0$, we remain with $x+y=0$. So $\tan\theta=-\tan2\theta$  and therefore
$$
\tan\theta=\tan(\pi-2\theta)
$$
Hence
$$
\theta=\pi-2\theta+k\pi
$$
that gives
$$
\theta=\frac{\pi}{3}+k\frac{\pi}{3}
$$
and this can be simplified into $\theta=k\pi/3$.
</s>