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

Jan 19, 2016

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

#### Explanation:

The product rule states that if $f \left(x\right) = g \left(x\right) h \left(x\right)$, then

$f ' \left(x\right) = g ' \left(x\right) h \left(x\right) + g \left(x\right) h ' \left(x\right)$

In this instance, we have

$g \left(x\right) = \sin x + \ln x \textcolor{w h i t e}{\times \times} \implies \textcolor{w h i t e}{\times \times} g ' \left(x\right) = \cos x + \frac{1}{x}$

$h \left(x\right) = x - 3 {e}^{x} \textcolor{w h i t e}{\times \times} \implies \textcolor{w h i t e}{\times \times} h ' \left(x\right) = 1 - 3 {e}^{x}$

Thus, we have

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