# What is the derivative of f(x) = cos (x^2 - 4x)?

Sep 13, 2015

#### Answer:

$\textcolor{b l u e}{\frac{d}{\mathrm{dx}} \cos \left({x}^{2} - 4 x\right) = - \sin \left({x}^{2} - 4 x\right) \cdot \left(2 x - 4\right)}$

#### Explanation:

To differentiate $\cos \left({x}^{2} - 4 x\right)$, we have to apply the chain rule:

$\textcolor{g r e e n}{\left(f \circ g\right) ' \left(x\right) = f ' \left(g \left(x\right)\right) \cdot g ' \left(x\right)}$

In other words:
1) Get the derivative of the outer function, and plug in the inner function...
2) Then multiply that by the derivative of the inner function.

In $\cos \left({x}^{2} - 4 x\right)$, the outer function is $\cos x$ and the inner function is ${x}^{2} - 4 x$.

The derivative of $\cos x$ is $- \sin x$, so we get:

$\frac{d}{\mathrm{dx}} \cos \left({x}^{2} - 4 x\right)$

$= - \sin \left({x}^{2} - 4 x\right) \cdot \frac{d}{\mathrm{dx}} \left({x}^{2} - 4 x\right)$

Next we solve $\frac{d}{\mathrm{dx}} \left({x}^{2} - 4 x\right)$ using the power rule:

$\textcolor{g r e e n}{\frac{d}{\mathrm{dx}} {x}^{n} = n {x}^{n - 1}}$

$- \sin \left({x}^{2} - 4 x\right) \cdot \frac{d}{\mathrm{dx}} \left({x}^{2} - 4 x\right)$

$= - \sin \left({x}^{2} - 4 x\right) \cdot \left(2 x - 4\right)$

In summary:

$\frac{d}{\mathrm{dx}} \cos \left({x}^{2} - 4 x\right)$

$= - \sin \left({x}^{2} - 4 x\right) \cdot \frac{d}{\mathrm{dx}} \left({x}^{2} - 4 x\right)$

$\textcolor{b l u e}{= - \sin \left({x}^{2} - 4 x\right) \cdot \left(2 x - 4\right)}$