# How do you differentiate  x*sin(2/x)?

Jun 20, 2017

$\left(x \cdot \sin \left(\frac{2}{x}\right)\right) ' = \sin \left(\frac{2}{x}\right) - \frac{2 \cos \left(\frac{2}{x}\right)}{x}$

#### Explanation:

We are going to have to use more than one rule here, first the product rule. If we were to look at just "$x \cdot \sin \left(x\right)$", you might know how to differentiate the trigonometric function $\sin \left(x\right)$ and the linear function $x$. The product rule states:

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

so $\left(x \cdot \sin \left(x\right)\right) ' = 1 \cdot \sin \left(x\right) + x \cdot \cos \left(x\right)$

Similarly $\left(x \cdot \sin \left(\frac{2}{x}\right)\right) ' = 1 \cdot \sin \left(\frac{2}{x}\right) + x \cdot \left(\sin \left(\frac{2}{x}\right)\right) '$

Looking at $\left(\sin \left(\frac{2}{x}\right)\right) '$, this require the use of the chain rule:
$\frac{\mathrm{dy}}{\mathrm{dx}} = \frac{\mathrm{dy}}{\mathrm{du}} \cdot \frac{\mathrm{du}}{\mathrm{dx}}$

Let's say $u = \frac{2}{x}$ , so $\sin \left(\frac{2}{x}\right) = \sin \left(u\right)$

This means: $\frac{d}{\mathrm{du}} \sin \left(u\right) = \cos \left(u\right)$ and $\frac{d}{\mathrm{dx}} \left(2 \cdot {x}^{-} 1\right) = - 2 {x}^{-} 2$

then we would get:
$\left(\sin \left(\frac{2}{x}\right)\right) ' = \left(\sin \left(u\right)\right) ' \cdot \left(\frac{2}{x}\right) ' = \cos \left(u\right) \cdot \left(- 2 {x}^{-} 2\right) = - \frac{2 \cos \left(\frac{2}{x}\right)}{x} ^ 2$

Putting all this together, we get:

$\left(x \cdot \sin \left(\frac{2}{x}\right)\right) ' = \sin \left(\frac{2}{x}\right) + x \cdot \left(- \frac{2 \cos \left(\frac{2}{x}\right)}{x} ^ 2\right) = \sin \left(\frac{2}{x}\right) - \frac{2 \cos \left(\frac{2}{x}\right)}{x}$

PS. if you know how to differentiate and integrate $\sin \left(x\right)$ and $\cos \left(x\right)$, then you know more than me, because I can't remember those to safe my life :)