<s>[INST] General solution of $\tan (2x)\tan (x)=1$ For the question, $\tan (2x) \tan x=1$, I divided it by $\tan x$, and got the solution as $\frac{(2n+1)\pi}{6}$. 
$\tan 2x= \cot x= \tan\left(\frac{\pi}{2}-x\right)$. So, $2x=n\pi+ \frac{\pi}{2}-x$. So, $3x= \frac{(2n+1)\pi}{2}$
But the book solved using the formula of $\tan (2x)$, and got the solution as  $\frac{(6n \pm 1)\pi}{6}$. I can see that my solution has odd multiples of $\pi/2$, which should be discarded, but I thought of it only after checking the solution. Also, in a way, it suggests that we can't solve these questions in different ways because that way we might get extra solutions. So, how to ensure which method to follow?
 [/INST] Your way is better, I think:
The domain gives $\cos2x\neq0$,$\cos{x}\neq0$ and $\sin{x}\neq0$ and by your idea we obtain:
$$\tan2x=\cot{x}$$ or
$$\frac{\sin2x\sin{x}-\cos2x\cos{x}}{\cos2x\sin{x}}=0$$ or
$$\cos3x=0$$ or
$$x=\frac{\pi}{6}+\frac{\pi}{3}k,$$ where $k\in\mathbb Z$.
Now, delete from these roots, roots of $\sin{x}=0$ (which is impossible), $\cos2x=0$ (which is impossible again) and $\cos{x}=0.$
We can get an answer by the following way.
From $\cos3x=0$ on the interval $(0,2\pi)$ we got the following numbers:
$$\left\{\frac{\pi}{6},\frac{\pi}{2},\frac{5\pi}{6},\frac{7\pi}{6},\frac{3\pi}{2},\frac{11\pi}{6}\right\}.$$ 
$\frac{\pi}{2}$ and $\frac{3\pi}{2}$ we need to delete and since
$$\frac{11\pi}{6}=\pi+\frac{5\pi}{6}$$ and
$$\frac{7\pi}{6}=\pi+\frac{\pi}{6},$$ we got the following series:
$$x=\frac{\pi}{6}+\pi k$$ and
$$x=\frac{5\pi}{6}+\pi k$$ or $$\left\{\frac{(\pm1+6)\pi}{6}|k\in\mathbb Z\right\}$$
</s>