# Derivative of Tangent Function

## Theorem

$\map {\dfrac \d {\d x} } {\tan x} = \sec^2 x = \dfrac 1 {\cos^2 x}$

when $\cos x \ne 0$.

### Corollary

$\map {\dfrac \d {\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}$
$\map {\dfrac \d {\d x} } {\sin x} = \cos x$
$\map {\dfrac \d {\d x} } {\cos x} = -\sin x$

Then:

 $\displaystyle \map {\dfrac \d {\d x} } {\tan x}$ $=$ $\displaystyle \frac {\cos x \cos x - \sin x \paren {-\sin x} } {\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 \map {\frac \d {\d x} } {\tan x}$ $=$ $\displaystyle \lim_{h \mathop \to 0} \frac {\map \tan {x + h} - \tan x} h$ Definition of Derivative of Real Function at Point $\displaystyle$ $=$ $\displaystyle \lim_{h \mathop \to 0} \frac {\frac {\tan x + \tan h} {1 - \tan x \tan h} - \tan x} h$ Tangent of Sum $\displaystyle$ $=$ $\displaystyle \lim_{h \mathop \to 0} \frac {\frac {\tan x + \tan h - \tan x + \tan^2 x \tan h} {1 - \tan x \tan h} } h$ $\displaystyle$ $=$ $\displaystyle \lim_{h \mathop \to 0} \frac {\tan h + \tan^2 x \tan h} {h \paren {1 - \tan x \tan h} }$ $\displaystyle$ $=$ $\displaystyle \lim_{h \mathop \to 0} \frac {1 + \tan^2 x} {1 - \tan x \tan h} \cdot \lim_{h \mathop \to 0} \frac {\tan h} h$ Product Rule for Limits of Functions $\displaystyle$ $=$ $\displaystyle \frac {1 + \tan^2 x} {1 - \tan x \tan 0} \cdot 1$ Limit of Tan X over X $\displaystyle$ $=$ $\displaystyle 1 + \tan^2 x$ Tangent of Zero $\displaystyle$ $=$ $\displaystyle \sec^2 x$ Difference of Squares of Secant and Tangent $\displaystyle$ $=$ $\displaystyle \frac 1 {\cos^2 x}$ Secant is Reciprocal of Cosine ($\cos x \ne 0$)

$\blacksquare$