Finding the derivative of $ g(x) = tan(3x) $ using the definition I was asked to find the derivative of $tan(3x)$ using the limit definition 
I am bit stuck at the steps, can anyone please explain ?
Thank you so much , would be a great help ! 
 A: hint
$$\tan(3(x+h))-\tan(3x)=(1+\tan(3x+3h)\tan(3x))\tan(3h)$$
and
$$\lim_{h\to 0}\frac{\tan(3h)}{h}=3$$
A: If it's supposed to be directly from the definition, we need to use the formula:
$$ \tan(\alpha+\beta) = \frac{\tan\alpha+\tan \beta}{1-\tan\alpha\cdot\tan\beta}$$
and we need to know that $$\lim_{\epsilon\rightarrow 0} \frac{\tan\epsilon}{\epsilon} = 1 $$
We have:
\begin{align} (\tan 3x)' &= \lim_{\epsilon\rightarrow 0}\frac{\tan\big(3(x+\epsilon)\big)-\tan (3x)}{\epsilon} = \\
&= \lim_{\epsilon\rightarrow 0}\frac{\frac{\tan (3x)+\tan(3\epsilon)}{1-\tan (3x)\cdot\tan(3\epsilon)}-\tan (3x)}{\epsilon} = \\
&= \lim_{\epsilon\rightarrow 0}\frac{\big(1+\tan^2 (3x)\big)\tan(3\epsilon)}{\epsilon\big(1-\tan (3x)\cdot\tan(3\epsilon)\big)} = \\
&= \lim_{\epsilon\rightarrow 0}\frac{3\big(1+\tan^2 (3x)\big)}{1-\tan (3x)\cdot\tan(3\epsilon)} \cdot \frac{\tan(3\epsilon)}{3\epsilon} = \\
&= \frac{3\big(1+\tan^2 (3x)\big)}{1-\tan (3x)\cdot 0} \cdot 1 = \\
&= 3\big(1+\tan^2 (3x)\big) = \frac{3}{\cos^2(3x)}\end{align}
