How do you differentiate f(x)=(1/x)*e^x*sinx-x^2*cosx using the product rule?

Jul 26, 2016

$\frac{\mathrm{df}}{\mathrm{dx}} = - \frac{{e}^{x} \sin x}{x} ^ 2 + \frac{{e}^{x} \sin x}{x} + \frac{{e}^{x} \cos x}{x} - 2 x \cos x - {x}^{2} \sin x$

Explanation:

According to product rule if $f \left(x\right) = u \left(x\right) \cdot v \left(x\right) \cdot w \left(x\right)$, then

$\frac{\mathrm{df}}{\mathrm{dx}} = \frac{\mathrm{du}}{\mathrm{dx}} \cdot v \cdot w + u \cdot \frac{\mathrm{dv}}{\mathrm{dx}} \cdot w + u \cdot v \cdot \frac{\mathrm{dw}}{\mathrm{dx}}$

Further if $f \left(x\right) = g \left(x\right) + h \left(x\right)$, $\frac{\mathrm{df}}{\mathrm{dx}} = \frac{\mathrm{dg}}{\mathrm{dx}} + \frac{\mathrm{dh}}{\mathrm{dx}}$

Hence, as $f \left(x\right) = \left(\frac{1}{x}\right) \cdot {e}^{x} \cdot \sin x - {x}^{2} \cdot \cos x$

$\frac{\mathrm{df}}{\mathrm{dx}} = \left(- \frac{1}{x} ^ 2\right) \cdot {e}^{x} \cdot \sin x + \left(\frac{1}{x}\right) \cdot {e}^{x} \cdot \sin x + \left(\frac{1}{x}\right) \cdot {e}^{x} \cdot \cos x - \left(2 x \cdot \cos x + {x}^{2} \cdot \left(- \sin x\right)\right)$

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