# Proving $\frac{\mathrm d}{\mathrm dx}(\tan x)=\sec ^2x$

I can find the derivative of $x^2$ by using $$\lim_{h\rightarrow 0}\dfrac{(x+h)^2-x^2}{h}$$

By the same way, if I want to find the derivative of $\tan x$

$$\lim_{h\rightarrow 0}\frac{\tan (x+h)-\tan (x)}{h}$$

after that what I will do to get $\sec ^2(x)$

• Hint: $\tan{x}=\frac{\sin{x}}{\cos{x}}$ – user161516 Dec 7 '14 at 12:45

$\displaystyle\lim_{h\rightarrow 0}\frac{\tan (x+h)-\tan (x)}{h}\\=\displaystyle\lim_{h\rightarrow 0}\frac{\frac{\tan x+\tan h}{1-\tan x \tan h}-\tan (x)}{h}\\=\displaystyle\lim_{h\rightarrow 0}\frac{\frac{\tan x+\tan h-\tan x+\tan^2x\tan h}{1-\tan x \tan h}}{h}\\=\displaystyle\lim_{h\rightarrow 0}\frac{\tan h+\tan^2x\tan h}{h\left(1-\tan x \tan h\right)}\\=\displaystyle\lim_{h\rightarrow 0}\left(\frac{\tan h}{h}\right)\left(\frac{\sec^2x}{1-\tan x \tan h}\right)\\=\displaystyle\lim_{h\rightarrow 0}\left(\frac{\tan h}{h}\right)\displaystyle\cdot\lim_{h\rightarrow 0}\left(\frac{\sec^2x}{1-\tan x \tan h}\right)(\color{red}{?})\\=\sec^2x$

• I'd add $h << 1, \tan{h} \approx h$ – servabat Dec 7 '14 at 12:55

The derivative of $f(x)=x^2:$

$$\lim_{h\to 0}\frac{(x+h)^2-x^2}{h}=\lim_{h\to 0}\frac{x^2+2xh+h^2-x^2}{h}=\lim_{h\to 0}\frac{2xh+h^2}{h}=\lim_{h\to 0}(2x+h)=2x.$$

The derivative of $f(x)=\tan x:$

$$\lim_{h\to 0}\frac{\tan (x+h)-\tan x}{h}=\lim_{h\to 0}\frac{\frac{\tan x+\tan h}{1-\tan x\tan h}-\tan x}{h}=\lim_{h\to 0}\frac{\tan x+\tan h-\tan x+\tan^2 x\tan h}{h(1-\tan x\tan h)}\\=\lim_{h\to 0}\frac{\tan h+\tan^2 x\tan h}{h(1-\tan x\tan h)}=\lim_{h\to 0}\frac{\tan h}{h}\frac{1+\tan^2 x}{1-\tan x\tan h}\\=\lim_{h\to 0}\frac{\tan h}{h}\lim_{h\to 0}\frac{1+\tan^2 x}{1-\tan x\tan h} =1+\tan^2 x=\sec^2 x.$$

\begin{align} f'(x) &=\lim_{h\rightarrow 0}\frac{f(x+h)-f(x)}{h}\tag{1}\\ &=\lim_{h\rightarrow 0}\frac{\tan (x+h)-\tan (x)}{h}\tag{2}\\ &=\lim_{h\rightarrow 0}\frac{\frac{\tan x+\tan h}{1-\tanh\tan x}-\tan (x)}{h}\tag{3}\\ &=\lim_{h\rightarrow 0}\frac{1}{h}\left({\frac{\tan x+\tan h -\tan (x)+\tanh\tan^2x}{1-\tanh\tan x}}\right)\tag{4}\\ &=\lim_{h\rightarrow 0}\frac{\tan h}{h}\left({\frac{1+\tan^2x}{1-\tanh\tan x}}\right)\tag{5}\\ &=\sec^2x\cdot\lim_{h\rightarrow 0}\frac{\tan h}{h}\left({\frac{1}{1-\tanh\tan x}}\right)\tag{6}\\ &=\sec^2x\cdot1\tag{7}\\ &=\sec^2x\tag{8}\\ \end{align}

$$\frac{d}{dx}\tan x=\sec^2x$$