# What is the derivative of xsinx?

Sep 15, 2017

$\frac{\mathrm{dy}}{\mathrm{dx}} = x \cos x + \sin x$

#### Explanation:

We have:

$y = x \sin x$

Which is the product of two functions, and so we apply the Product Rule for Differentiation:

$\frac{d}{\mathrm{dx}} \left(u v\right) = u \frac{\mathrm{dv}}{\mathrm{dx}} + \frac{\mathrm{du}}{\mathrm{dx}} v$, or, $\left(u v\right) ' = \left(\mathrm{du}\right) v + u \left(\mathrm{dv}\right)$

I was taught to remember the rule in words; "The first times the derivative of the second plus the derivative of the first times the second ".

So with $y = x \sin x$;

$\left\{\begin{matrix}\text{Let" & u = x & => (du)/dx = 1 \\ "And} & v = \sin x & \implies \frac{\mathrm{dv}}{\mathrm{dx}} = \cos x\end{matrix}\right.$

Then:

$\frac{d}{\mathrm{dx}} \left(u v\right) = u \frac{\mathrm{dv}}{\mathrm{dx}} + \frac{\mathrm{du}}{\mathrm{dx}} v$

Gives us:

$\frac{d}{\mathrm{dx}} \left(x \sin x\right) = \left(x\right) \left(\cos x\right) + \left(1\right) \left(\sin x\right)$
$\therefore \frac{\mathrm{dy}}{\mathrm{dx}} = x \cos x + \sin x$

If you are new to Calculus then explicitly substituting $u$ and $v$ can be quite helpful, but with practice these steps can be omitted, and the product rule can be applied as we write out the solution.