# Derivative of Tangent Function

## Theorem

$D_x \left({\tan x}\right) = \sec^2 x = \dfrac 1 {\cos^2 x}$

when $\cos x \ne 0$.

### Corollary

$\map {D_x} {\tan a x} = a \sec^2 a x$

## Proof 1

From the definition of the tangent function:

$\tan x = \dfrac {\sin x} {\cos x}$
$D_x \left({\sin x}\right) = \cos x$
$D_x \left({\cos x}\right) = -\sin x$

Then:

 $\displaystyle D_x \left({\tan x}\right)$ $=$ $\displaystyle \frac {\cos x \cos x - \sin x \left({-\sin x}\right)} {\cos^2 x}$ Quotient Rule for Derivatives $\displaystyle$ $=$ $\displaystyle \frac {\cos^2 x + \sin^2 x} {\cos^2 x}$ $\displaystyle$ $=$ $\displaystyle \frac 1 {\cos^2 x}$ Sum of Squares of Sine and Cosine

This is valid only when $\cos x \ne 0$.

The result follows from the Secant is Reciprocal of Cosine.

$\blacksquare$

## Proof 2

 $\displaystyle D_x \left({\tan x}\right)$ $=$ $\displaystyle \lim_{h \mathop \to 0} \frac {\tan \left({x + h}\right) - \tan \left({x}\right)} h$ Definition of Derivative of Real Function at Point $\displaystyle$ $=$ $\displaystyle \lim_{h \mathop \to 0} \frac {\frac {\tan \left({x}\right) + \tan \left({h}\right)} {1 - \tan \left({x}\right) \tan \left({h}\right)} - \tan \left({x}\right)} h$ Tangent of Sum $\displaystyle$ $=$ $\displaystyle \lim_{h \mathop \to 0} \frac {\frac {\tan \left({x}\right) + \tan \left({h}\right) - \tan \left({x}\right) + \tan^2 \left({x}\right) \tan \left({h}\right)} {1 - \tan \left({x}\right) \tan \left({h}\right)} } h$ $\displaystyle$ $=$ $\displaystyle \lim_{h \mathop \to 0} \frac {\tan \left({h}\right) + \tan^2 \left({x}\right) \tan \left({h}\right)} {h \left({1 - \tan \left({x}\right) \tan \left({h}\right)}\right)}$ $\displaystyle$ $=$ $\displaystyle \lim_{h \mathop \to 0} \frac {1 + \tan^2 \left({x}\right)} {1 - \tan \left({x}\right) \tan \left({h}\right)} \cdot \lim_{h \mathop \to 0} \frac {\tan \left({h}\right)} h$ Product Rule for Limits of Functions $\displaystyle$ $=$ $\displaystyle \frac{ 1 + \tan^2 \left({x}\right)} {1 - \tan \left({x}\right) \tan \left({0}\right)} \cdot 1$ Limit of Tan X over X $\displaystyle$ $=$ $\displaystyle 1 + \tan^2 \left({x}\right)$ Tangent of Zero $\displaystyle$ $=$ $\displaystyle \sec^2 \left({x}\right)$ Corollary to Sum of Squares of Sine and Cosine $\displaystyle$ $=$ $\displaystyle \frac 1 {\cos^2 \left({x}\right)}$ Secant is Reciprocal of Cosine ($\cos \left({x}\right) \ne 0$)

$\blacksquare$