# Derivative Rules for y=cos(x) and y=tan(x)

## Key Questions

• The derivative of $\tan x$ is ${\sec}^{2} x$.

To see why, you'll need to know a few results. First, you need to know that the derivative of $\sin x$ is $\cos x$. Here's a proof of that result from first principles:

Once you know this, it also implies that the derivative of $\cos x$ is $- \sin x$ (which you'll also need later). You need to know one more thing, which is the Quotient Rule for differentiation:

Once all those pieces are in place, the differentiation goes as follows:

$\frac{d}{\mathrm{dx}} \tan x$
$= \frac{d}{\mathrm{dx}} \sin \frac{x}{\cos} x$

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

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

$= \frac{1}{{\cos}^{2} x}$ (using the Pythagorean Identity)

$= {\sec}^{2} x$

• Using the definition of a derivative:

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

We substitute in our function to get:

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

Using the Trig identity:

$\cos \left(a + b\right) = \cos a \cos b - \sin a \sin b$,

we get:

${\lim}_{h \to 0} \frac{\left(\cos x \cos h - \sin x \sin h\right) - \cos x}{h}$

Factoring out the $\cos x$ term, we get:

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

This can be split into 2 fractions:

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

Now comes the more difficult part: recognizing known formulas.

The 2 which will be useful here are:

${\lim}_{x \to 0} \sin \frac{x}{x} = 1$, and ${\lim}_{x \to 0} \frac{\cos x - 1}{x} = 0$

Since those identities rely on the variable inside the functions being the same as the one used in the $\lim$ portion, we can only use these identities on terms using $h$, since that's what our $\lim$ uses. To work these into our equation, we first need to split our function up a bit more:

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

becomes:

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

Using the previously recognized formulas, we now have:

${\lim}_{h \to 0} \cos x \left(0\right) - \sin x \left(1\right)$

which equals:

${\lim}_{h \to 0} \left(- \sin x\right)$

Since there are no more $h$ variables, we can just drop the ${\lim}_{h \to 0}$, giving us a final answer of: $- \sin x$.

• $\frac{\mathrm{dy}}{\mathrm{dx}} = \left(\cos x\right) ' = - \sin x$. See derivatives of trig functions for details.