# How do you differentiate f(x)=(cosx+1)(-x^2-3e^x) using the product rule?

Mar 10, 2016

$\left(\cos x + 1\right) \left(- 2 x - 3 {e}^{x}\right) - \sin x \left({x}^{2} - 3 {e}^{x}\right)$

#### Explanation:

using the $\textcolor{b l u e}{\text{ Product rule }}$

If f(x) = g(x).h(x) then f'(x) = g(x).h'(x) + h(x).g'(x)

$\text{----------------------------------------------------------------}$

here g(x) $= \cos x + 1 \Rightarrow g ' \left(x\right) = - \sin x$

and $h \left(x\right) = \left(- {x}^{2} - 3 {e}^{x}\right) \Rightarrow h ' \left(x\right) = - 2 x - 3 {e}^{x}$
$\text{-----------------------------------------------------------------}$

now substitute these results into f'(x)

f'(x) $= \left(\cos x + 1\right) \left(- 2 x - 3 {e}^{x}\right) - \sin x \left({x}^{2} - 3 {e}^{x}\right)$