# If f(x)= cos(-2 x -1)  and g(x) = 4x^2 -5 , how do you differentiate f(g(x))  using the chain rule?

Mar 18, 2016

$\frac{\mathrm{df}}{\mathrm{dx}} = - 16 x \sin \left(8 {x}^{2} - 9\right)$

#### Explanation:

Note that $\cos \left(- 2 x - 1\right) = \cos \left(2 x + 1\right)$ as $\cos \left(- \theta\right) = \cos \theta$.

If $f \left(x\right) = \cos \left(- 2 x - 1\right)$ and $g \left(x\right) = 4 {x}^{2} - 5$

$f \left(g \left(x\right)\right) = \cos \left(2 \left(4 {x}^{2} - 5\right) + 1\right)$

As according to chain rule, $\frac{\mathrm{df}}{\mathrm{dx}} = \frac{\mathrm{df}}{\mathrm{dg}} \times \frac{\mathrm{dg}}{\mathrm{dx}}$

$\frac{\mathrm{df}}{\mathrm{dx}} = - 2 \sin \left(2 \left(4 {x}^{2} - 5\right) + 1\right) \times \frac{d}{\mathrm{dx}} \left(4 {x}^{2} - 5\right)$

= -2sin(2(4x^2-5)+1)xx8x)

= $- 16 x \sin \left(8 {x}^{2} - 9\right)$