# How do you differentiate g(x) = (2sinx -e^x) ( cosx-x^2) using the product rule?

May 25, 2018

#### Answer:

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

#### Explanation:

using the product rule we get
$g ' \left(x\right) = \left(2 \cos \left(x\right) - {e}^{x}\right) \left(\cos \left(x\right) - {x}^{2}\right) + \left(2 \sin \left(x\right) - {e}^{x}\right) \left(- \sin \left(x\right) - 2 x\right)$