<s>[INST] solve $\tan{x} = \tan{3x}$ I'm asked to solve $\tan{x} = \tan{3x}$
Here's my attempt: 
$$\tan{x} = \tan{3x}$$
$$\tan{x} = \tan{(x + 2x)}$$
$$\tan{x} = \frac{\tan{x} + \tan{2x}}{1-\tan{x}\tan{2x}}$$
Recall the identity:
$$\tan{2x} = \frac{2\tan{x}}{1-\tan^2{x}}$$
So then we have:
$$\tan{x} = \frac{\tan{x} + \frac{2\tan{x}}{1-\tan^2{x}}}{1-\tan{x}\frac{2\tan{x}}{1-\tan^2{x}}}$$
$$\tan{x} - \tan^2{(x)} \cdot \frac{2\tan{x}}{1-\tan^2{x}} = \tan{x} + \frac{2\tan{x}}{1-\tan^2{x}}$$
$$-\tan^2{(x)} \cdot \frac{2\tan{x}}{1-\tan^2{x}} = \frac{2\tan{x}}{1-\tan^2{x}}$$
$$-\tan^2{x} \cdot \frac{2\tan{x}}{1-\tan^2{x}} \cdot \frac{1-\tan^2{x}}{2\tan{x}} = 1$$
$$\tan^2{x} = -1$$
This does obviously not compute. Why is my way wrong and how can I go about solving it?
 [/INST] When you arrive at
$$
-\tan^2x \frac{2\tan x}{1-\tan^2x} = \frac{2\tan x}{1-\tan^2x}
$$
you can't multiply both sides by $\frac{1-\tan^2x}{2\tan x}$, because this operation is allowed only when the multiplier is nonzero.
You should rather move everything to the right-hand side and collect terms, getting
$$
0=\frac{2\tan x}{1-\tan^2x}(\tan^2x+1)
$$
Since $\tan^2x+1\ne0$, you get
$$
\tan x=0
$$
and so $x=k\pi$.

You can also observe that $\tan3x=\tan x$ means
$$
3x=x+k\pi
$$
so
$$
x=k\frac{\pi}{2}
$$
provided $\tan x$ and $\tan3x$ exist, which is not the case when $k$ is odd. Thus the solutions are $x=(2h)\frac{\pi}{2}=h\pi$ ($h$ integer).
</s>