# How do you find the derivative y=xsinx + cosx?

Feb 26, 2015

$y ' = x \cos x$

Use the product rule for $d \frac{\left(x \sin x\right)}{\mathrm{dx}}$:

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

Where $u = x$ and $v = \sin x$

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

Now $\frac{d \left(\cos x\right)}{\mathrm{dx}} = - \sin x$

So combining the 2 we get:

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