<s>[INST] Derive $\tan(3x)$ in terms of $\tan(x)$ using De Moivre's theorem 
Derive the following identity: $$\tan(3x)=\frac{3\tan(x)-\tan^3(x)}{1-3\tan^2(x)}$$

The way I approached the questions is that I first derived $\sin(3x)$ and $\cos(3x)$ because $\tan(\theta)=\frac{\sin(\theta)}{\cos(\theta)}$. Then substituting:
$$\tan(3x)=\frac{\sin(3x)}{\cos(3x)}=\frac{-4\sin^3(x)+3\sin(x)}{4\cos^3(x)-3\cos(x)}$$
I transformed it into $$\tan(3x)=\frac{-4\sin^2(x)\tan(x)+3\tan(x)}{4\cos^2(x)-3}$$ and also to $$\tan(3x)=-\tan(x)\frac{4\sin^2(x)-3}{-4\sin^2(x)+1}$$ but I'm stuck on either of these forms. Any help?
 [/INST] Wthout de Moivre:
$$\tan(2x+x)=\frac{\tan2x+\tan x}{1-\tan2x\tan x}=\frac{\frac{2\tan x}{1-\tan^2x}+\tan x}{1-\frac{2\tan x}{1-\tan^2x}\tan x}=$$
$$=\frac{3\tan x-\tan^3x}{1-3\tan^2x}=\tan x\frac{(\tan x-\sqrt3)(\tan x+\sqrt3)}{(\sqrt3\,\tan x-1)(\sqrt3\,\tan x+1)}$$
</s>