[Math] Using the definition of derivative to find $\tan^2x$

calculusderivativeslimitstrigonometry

The instructions: Use the definition of derivative to find $f'(x)$ if $f(x)=\tan^2(x)$.

I've been working on this problem, trying every way I can think of. At first I tried this method:
$$\lim_{h\to 0} {\tan^2(x+h)-\tan^2(x)\over h}$$
$$\lim_{h\to 0} {\tan(x+h)-\tan(x)\over h}\cdot\lim_{h\to 0} {\tan(x+h)-\tan(x)\over h}$$
And then I went on from there, but I was never able to get rid of the $h$.

So then I tried this:
$$\lim_{x\to y} {\tan(x)-\tan(y)\over x-y}\cdot\lim_{x\to y} {\tan(x)-\tan(y)\over x-y}$$
$$\lim_{x\to y} {\tan(x-y)[1+\tan(x)\tan(y)]\over x-y}\cdot\lim_{x\to y} {\tan(x-y)[1+\tan(x)\tan(y)]\over x-y}$$
$$\lim_{x\to y} {\sin(x-y)\over (x-y)}\cdot{1\over \cos(x-y)}\cdot[1+\tan(x)\tan(y)]\cdot\lim_{x\to y} {\sin(x-y)\over (x-y)}\cdot{1\over \cos(x-y)}\cdot[1+\tan(x)\tan(y)]$$
I then put the ${\frac{\sin(x-y)}{x-y}}=1$, and I traded all of the $y$ values for $x$, which gave me $\frac{1}{\cos(\theta)}=1$
$$1+\tan^2(x)\cdot1+\tan^2(x)=1+2\tan^2(x)+\tan^4(x)$$
I know that the derivative of $\tan^2(x)=2\tan(x)\sec^2(x)$, so this is obviously wrong.

I found this link from a previous stack exchange point on finding the limit by definition of $\tan(x)$, so I tried using the answers given there. But, even with that, I haven't been able to get this correct.

What do I need to do?

Best Answer

Using first principle, the derivative of any function $f(x)$ is given as $$\frac{d(f(x))}{dx}=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$$ Hence, derivative of $\tan^2 x$ is given as $$\frac{d(\tan^2 x)}{dx}=\lim_{h\to 0}\frac{\tan^2(x+h)-\tan^2(x)}{h}$$ $$=\lim_{h\to 0}\frac{(\tan(x+h)-\tan(x))(\tan(x+h)+\tan(x))}{h}$$$$=\lim_{h\to 0}\frac{\tan(x+h)-\tan(x)}{h}\times \lim_{h\to 0}(\tan(x+h)+\tan(x))$$ $$=\lim_{h\to 0}\frac{\frac{\sin(x+h)}{\cos(x+h)}-\frac{\sin(x)}{\cos(x)}}{h}\times \lim_{h\to 0}(\tan(x+h)+\tan(x))$$ $$=\lim_{h\to 0}\frac{\sin(x+h)\cos x-\cos(x+h)\sin x}{h\cos(x+h)\cos x}\times (\tan x+\tan x)$$ $$=2\tan x\lim_{h\to 0}\frac{\sin(x+h-x)}{h}\times \lim_{h\to 0}\frac{1}{\cos(x+h)\cos x}$$ $$=2\tan x\lim_{h\to 0}\frac{\sin h}{h}\times \frac{1}{\cos^2 x}$$ $$=2\tan x \times 1\times \sec^2 x$$ $$=\color{blue}{2\tan x \sec^2x}$$

Related Question