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

Dec 23, 2015

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

#### Explanation:

Know that: $\left\{\begin{matrix}\frac{d}{\mathrm{dx}} \left[\ln x\right] = \frac{1}{x} \\ \frac{d}{\mathrm{dx}} \left[\sin x\right] = \cos x\end{matrix}\right.$

According to the product rule:

$f ' \left(x\right) = \left(\ln x - x\right) \frac{d}{\mathrm{dx}} \left[\ln x + \sin x\right] + \left(\ln x + \sin x\right) \frac{d}{\mathrm{dx}} \left[\ln x - x\right]$

$\implies \left(\ln x - x\right) \left(\frac{1}{x} + \cos x\right) + \left(\ln x + \sin x\right) \left(\frac{1}{x} - 1\right)$