# What is the derivative of tanx?

Nov 22, 2017

see below

#### Explanation:

one approach is to use the quotient rule

$\frac{d}{\mathrm{dx}} \left(\frac{u}{v}\right) = \frac{v u ' - u v '}{v} ^ 2$

$\frac{d}{\mathrm{dx}} \left(\tan x\right) = \frac{d}{\mathrm{dx}} \left(\sin \frac{x}{\cos} x\right)$

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

$= \frac{\cos x \cos x - \sin x \left(- \sin x\right)}{\cos} ^ 2 x$

$= \frac{{\cos}^{2} x - - {\sin}^{2} x}{\cos} ^ 2 x$

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

$= \frac{1}{\cos} ^ 2 x = {\sec}^{2} x$

Nov 22, 2017

$\frac{\mathrm{dy}}{\mathrm{dx}} = {\sec}^{2} x$

#### Explanation:

If:

$y = \tan x$

Then applying the quotient rule we have:

$\frac{\mathrm{dy}}{\mathrm{dx}} = \frac{d}{\mathrm{dx}} \left(\sin \frac{x}{\cos} x\right)$
$\setminus \setminus \setminus \setminus \setminus = \frac{\left(\cos x\right) \left(\frac{d}{\mathrm{dx}} \sin x\right) - \left(\sin x\right) \left(\frac{d}{\mathrm{dx}} \cos x\right)}{\cos x} ^ 2$
$\setminus \setminus \setminus \setminus \setminus = \frac{\left(\cos x\right) \left(\cos x\right) - \left(\sin x\right) \left(- \sin x\right)}{{\cos}^{2} x}$
$\setminus \setminus \setminus \setminus \setminus = \frac{{\cos}^{2} x + {\sin}^{2} x}{{\cos}^{2} x}$
$\setminus \setminus \setminus \setminus \setminus = \frac{1}{{\cos}^{2} x}$
$\setminus \setminus \setminus \setminus \setminus = {\sec}^{2} x$

Nov 22, 2017

see below

#### Explanation:

we could do it from first principles

$\frac{\mathrm{dy}}{\mathrm{dx}} = L i {m}_{h \rightarrow 0} \frac{f \left(x + h\right) - f \left(x\right)}{h}$

for $y = \tan x$

$\frac{\mathrm{dy}}{\mathrm{dx}} = L i {m}_{h \rightarrow 0} \frac{\left(\tan \left(x + h\right) - \tan x\right)}{h}$

$\frac{\mathrm{dy}}{\mathrm{dx}} = L i {m}_{h \rightarrow 0} \frac{\left(\tan \left(x + h\right) - \tan x\right)}{h}$

$\frac{\mathrm{dy}}{\mathrm{dx}} = L i {m}_{h \rightarrow 0} \frac{\left(\frac{\tan x + \tanh}{1 - \tan x \tanh} - \tan x\right)}{h}$

$\frac{\mathrm{dy}}{\mathrm{dx}} = L i {m}_{h \rightarrow 0} \frac{\left(\cancel{\tan x} + \tanh - \cancel{\tan x} + {\tan}^{2} x \tanh\right)}{h \left(1 - \tan x \tanh\right)}$

$\frac{\mathrm{dy}}{\mathrm{dx}} = L i {m}_{h \rightarrow 0} \frac{\tanh + {\tan}^{2} x \tanh}{h \left(1 - \tan x \tanh\right)}$

$\frac{\mathrm{dy}}{\mathrm{dx}} = L i {m}_{h \rightarrow 0} \left(\tanh \frac{1 + {\tan}^{2} x}{h \left(1 - \tan x \tanh\right)}\right)$

we need then to evaluate the limit of

$L i {m}_{h \rightarrow 0} \left(\frac{\tanh}{h \left(1 - \tan x \tanh\right)}\right)$

$n o w L i {m}_{h \rightarrow 0} \left(1 - \tan x \tanh\right) = 1 - 0 = 1$

so

$L i {m}_{h \rightarrow 0} \left(\frac{\tanh}{h \left(1 - \tan x \tanh\right)}\right) = L i {m}_{h \rightarrow 0} \left(\frac{\tanh}{h}\right)$

$= L i {m}_{h \rightarrow 0} \left(\frac{\sinh}{h} \frac{1}{\cosh}\right)$

=Lim_(hrarr0)(sinh/h)xxLim_(hrarr0)1/cosh)

$= 1 \times 1 = 1$

$\frac{\mathrm{dy}}{\mathrm{dx}} = 1 + {\tan}^{2} x = {\sec}^{2} x$