# How do you find the derivative of (cos x)^2 - cos x?

Jan 24, 2016

$\sin x - \sin 2 x$

#### Explanation:

To differentiate the squared cosine function, use the chain rule, in that $\frac{d}{\mathrm{dx}} {u}^{2} = 2 u \cdot u '$, where $u = \cos x$. This gives us a derivative of

$2 \cos x \frac{d}{\mathrm{dx}} \cos x - \frac{d}{\mathrm{dx}} \cos x$

Which simplifies to be

$2 \cos x \left(- \sin x\right) - \left(- \sin x\right)$

or

mathbf(-2cosxsinx+sinx

Note that this can be factored as

$\sin x \left(1 - 2 \cos x\right)$

or recognize that $2 \cos x \sin x = \sin 2 x$, so the derivative equals

$\sin x - \sin 2 x$