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

May 24, 2016

See below.

#### Explanation:

By the product rule $\frac{d}{\mathrm{dx}} u \left(x\right) v \left(x\right) = u ' \left(x\right) v \left(x\right) + v ' \left(x\right) u \left(x\right)$
Therefore, if we let $u \left(x\right) = - {e}^{x} + x$ and $v \left(x\right) = 3 {x}^{3} - x$
Then $\frac{d}{\mathrm{dx}} \left(- {e}^{x} + x\right) \left(3 {x}^{3} - x\right) = \left(- {e}^{x} + x\right) ' \left(3 {x}^{3} - x\right) + \left(3 {x}^{3} - x\right) ' \left(- {e}^{x} + x\right)$
$\left(- {e}^{x} + x\right) ' = - {e}^{x} + 1$
$\left(3 {x}^{3} - x\right) ' = 9 {x}^{2} - 1$
Therefore, the derivative $= \left(- {e}^{x} + 1\right) \left(3 {x}^{3} - x\right) + \left(9 {x}^{2} - 1\right) \left(- {e}^{x} + x\right)$
You could then expand and simply to finish off.