# Question #336d1

Mar 17, 2017

$\frac{d}{\mathrm{dx}} \left({x}^{2} - \tan x\right) = 2 x - \frac{1}{\cos} ^ 2 x$

#### Explanation:

By definition the derivative of a function $f \left(x\right)$ is:

$\frac{\mathrm{df}}{\mathrm{dx}} = {\lim}_{h \to 0} \frac{f \left(x + h\right) - f \left(x\right)}{h}$

Substituting: $f \left(x\right) = {x}^{2} - \tan x$:

$\frac{\mathrm{df}}{\mathrm{dx}} = {\lim}_{h \to 0} \frac{{\left(x + h\right)}^{2} - {x}^{2} - \tan \left(x + h\right) + \tan x}{h}$

If the limits exist separately we have:

$\frac{\mathrm{df}}{\mathrm{dx}} = {\lim}_{h \to 0} \frac{{\left(x + h\right)}^{2} - {x}^{2}}{h} - {\lim}_{h \to 0} \frac{\tan \left(x + h\right) - \tan x}{h}$

So let's evaluate separately:

${\lim}_{h \to 0} \frac{{\left(x + h\right)}^{2} - {x}^{2}}{h} = {\lim}_{h \to 0} \frac{\cancel{{x}^{2}} + 2 h x + {h}^{2} - \cancel{{x}^{2}}}{h}$

${\lim}_{h \to 0} \frac{{\left(x + h\right)}^{2} - {x}^{2}}{h} = {\lim}_{h \to 0} \cancel{h} \frac{2 x + h}{\cancel{h}}$

${\lim}_{h \to 0} \frac{{\left(x + h\right)}^{2} - {x}^{2}}{h} = 2 x$

and using the identity:

$\tan \left(a + b\right) = \frac{\tan a + \tan b}{1 - \tan a \tan b}$

${\lim}_{h \to 0} \frac{\tan \left(x + h\right) - \tan x}{h} = {\lim}_{h \to 0} \frac{1}{h} \left(\frac{\tan x + \tanh}{1 - \tan x \tanh} - \tan x\right)$

${\lim}_{h \to 0} \frac{\tan \left(x + h\right) - \tan x}{h} = {\lim}_{h \to 0} \frac{1}{h} \left(\frac{\cancel{\tan} x + \tanh - \cancel{\tan} x + {\tan}^{2} x \tanh}{1 - \tan x \tanh}\right)$

${\lim}_{h \to 0} \frac{\tan \left(x + h\right) - \tan x}{h} = {\lim}_{h \to 0} \frac{\tanh}{h} \left(\frac{1 + {\tan}^{2} x}{1 - \tan x \tanh}\right)$

${\lim}_{h \to 0} \frac{\tan \left(x + h\right) - \tan x}{h} = {\lim}_{h \to 0} \left(\frac{\sinh}{h}\right) \left(\frac{1}{\cosh}\right) \left(\frac{1 + {\tan}^{2} x}{1 - \tan x \tanh}\right)$

${\lim}_{h \to 0} \frac{\tan \left(x + h\right) - \tan x}{h} = 1 \cdot 1 \cdot \left(\frac{1 + {\tan}^{2} x}{1 - \tan x \cdot 0}\right) = 1 + {\tan}^{2} x$

As:

$1 + {\tan}^{2} x = 1 + {\sin}^{2} \frac{x}{\cos} ^ 2 x = \frac{{\cos}^{2} x + {\sin}^{2} x}{\cos} ^ 2 x = \frac{1}{\cos} ^ 2 x$

putting it together we have:

$\frac{d}{\mathrm{dx}} \left({x}^{2} - \tan x\right) = 2 x - \frac{1}{\cos} ^ 2 x$