# How do you find the derivative of y=tan(x) using first principle?

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

#### Explanation:

$y = \tan \left(x\right)$

$\tan x = \sin \frac{x}{\cos} x$
$y + \Delta y = \tan \left(x + \Delta x\right)$
$\tan \left(x + \Delta x\right) = \sin \frac{x + \Delta x}{\cos} \left(x + \Delta x\right)$
$y + \Delta y - y = \tan \left(x + \Delta x\right) - \tan \left(x\right)$
$\sin \left(A + B\right) = \sin A \cos B + \cos A \sin B$
$\cos \left(A + B\right) = \cos A \cos B - \sin A \sin B$

$\tan \left(x + \Delta x\right) = \frac{\sin x \cos \Delta x + \cos x \sin \Delta x}{\cos x \cos \Delta x - \sin x \sin \Delta x}$

$\Delta y = \frac{\sin x \cos \Delta x + \cos x \sin \Delta x}{\cos x \cos \Delta x - \sin x \sin \Delta x} - \sin \frac{x}{\cos} x$

$\Delta y = \left(\frac{\left(\cos x \left(\sin x \cos \Delta x + \cos x \sin \Delta x\right) - \sin x \left(\cos x \cos \Delta x - \sin x \sin \Delta x\right)\right)}{\cos x \left(\cos x \cos \Delta x - \sin x \sin \Delta x\right)}\right)$

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

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

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

Dividing throughout by
${\cos}^{2} x \cos \Delta x$

$= \frac{\tan \Delta x + {\tan}^{2} x \tan \Delta x}{1 - \tan x \tan \Delta x}$

$\Delta y = \left(1 + {\tan}^{2} x\right) \frac{\tan \Delta x}{1 - \tan x \tan \Delta x}$

$\frac{\Delta y}{\Delta x} = \frac{1}{\Delta x} \times \left(1 + {\tan}^{2} x\right) \frac{\tan \Delta x}{1 - \tan x \tan \Delta x}$

$1 + {\tan}^{2} x = {\sec}^{2} x$

$\frac{\Delta y}{\Delta x} = {\sec}^{2} x \times \frac{1}{\Delta x} \times \frac{\tan \Delta x}{1 - \tan x \tan \Delta x}$

applying limits as $\Delta x \to 0$

$\lim \frac{\Delta y}{\Delta x} = \lim \left({\sec}^{2} x \times \frac{1}{\Delta x} \times \frac{\tan \Delta x}{1 - \tan x \tan \Delta x}\right)$

$= {\sec}^{2} x \times \lim \frac{\tan \Delta x}{\Delta x} / \left(1 - \tan x \times \lim \tan \Delta x\right)$

$\lim \frac{\tan \Delta x}{\Delta x} = 1$

$\lim \left(\tan \Delta x\right) = 0$

Thus,

$\frac{\mathrm{dy}}{\mathrm{dx}} = {\sec}^{2} x \times \frac{1}{1 - \tan x \times 0}$

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

Jul 6, 2018

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

#### Explanation:

By definition:

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

Using the trigonometric formulas for the sum of two angles:

$\tan \left(x + h\right) = \sin \frac{x + h}{\cos} \left(x + h\right)$

$\tan \left(x + h\right) = \frac{\sin x \cos \left(h\right) + \cos x \sin \left(h\right)}{\cos x \cos \left(h\right) - \sin x \sin \left(h\right)}$

$\tan \left(x + h\right) = \frac{\frac{\sin x \cos \left(h\right) + \cos x \sin \left(h\right)}{\cos x \cos \left(h\right)}}{\frac{\cos x \cos \left(h\right) - \sin x \sin \left(h\right)}{\cos x \cos \left(h\right)}}$

$\tan \left(x + h\right) = \frac{\tan x + \tan \left(h\right)}{1 - \tan x \tan \left(h\right)}$

So:

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

d/dx tanx = lim_(h->0) (cancel(tanx)+tan(h)-cancel(tanx)+tan^2x tan(h))/(h(1-tanx tan(h))

d/dx tanx = lim_(h->0) (tan(h)(1+tan^2x ))/(h(1-tanx tan(h))

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

and as:

${\lim}_{h \to 0} \tan \frac{h}{h} = 1$

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

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

Or equivalently:

$\frac{d}{\mathrm{dx}} \tan x = 1 + {\sin}^{2} \frac{x}{\cos} ^ 2 x = \frac{{\cos}^{2} x + {\sin}^{2} x}{\cos} ^ 2 x = \frac{1}{\cos} ^ 2 x = {\sec}^{2} x$

Jul 6, 2018

#### Explanation:

By Definition, $\frac{d}{\mathrm{dx}} \left[f \left(x\right)\right] = {\lim}_{t \to x} \frac{f \left(t\right) - f \left(x\right)}{t - x}$.

$\therefore \frac{d}{\mathrm{dx}} \left[\tan x\right] = {\lim}_{t \to x} \frac{\tan t - \tan x}{t - x}$,

$= \lim \frac{\sin \frac{t}{\cos} t - \sin \frac{x}{\cos} x}{t - x}$,

$= \lim \frac{\sin t \cos x - \cos t \sin x}{\left(t - x\right) \cos t \cos x}$,

$= \lim \sin \frac{t - x}{t - x} \cdot \frac{1}{\cos} t \cdot \frac{1}{\cos} x$.

Since, ${\lim}_{\theta \to 0} \sin \frac{\theta}{\theta} = 1$, and, $\cos$ function is continuous, we have,

$\frac{d}{\mathrm{dx}} \left[\tan x\right] = 1 \cdot \frac{1}{\cos} x \cdot \frac{1}{\cos} x = \frac{1}{\cos} ^ 2 x = {\sec}^{2} x$.