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

Feb 10, 2017

$= 5 x {e}^{x} - 5 {e}^{x} - x \sin x + 2 \sin x + \cos x$

Explanation:

If $f \left(x\right) = g \left(x\right) \cdot h \left(x\right)$, you know that

$f ' \left(x\right) = g ' \left(x\right) \cdot h \left(x\right) + g \left(x\right) \cdot h ' \left(x\right)$ (product rule), then

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

$= 5 x {e}^{x} - x \sin x - 10 {e}^{x} + 2 \sin x + 5 {e}^{x} + \cos x$

$= 5 x {e}^{x} - 5 {e}^{x} - x \sin x + 2 \sin x + \cos x$