# How do you differentiate f(x)=sin(x^2 cos x)  using the chain rule?

##### 1 Answer
Oct 28, 2015

When you finish using the Chain Rule the derivative is

$f ' \left(x\right) = - x \cos \left({x}^{2} \cos \left(x\right)\right) \left[x \sin \left(x\right) - 2 \cos \left(x\right)\right]$

#### Explanation:

Take the derivative of the outside

$h \left(x\right) = \sin \left({x}^{2} \cos \left(x\right)\right)$

$h ' \left(x\right) = \cos \left({x}^{2} \cos \left(x\right)\right)$

Take the derivative the of the inside, use the product rule

$g \left(x\right) = {x}^{2} \cos \left(x\right)$

$g ' \left(x\right) = {x}^{2} \left(- \sin \left(x\right)\right) + 2 x \left(\cos \left(x\right)\right)$

$g ' \left(x\right) = - {x}^{2} \sin \left(x\right) + 2 x \cos \left(x\right)$

Multiply the derivative of the outside and inside

$f ' \left(x\right) = \cos \left({x}^{2} \cos \left(x\right)\right) \left[- {x}^{2} \sin \left(x\right) + 2 x \cos \left(x\right)\right]$

Factor out $\left(- x\right)$

$f ' \left(x\right) = - x \cos \left({x}^{2} \cos \left(x\right)\right) \left[x \sin \left(x\right) - 2 \cos \left(x\right)\right]$