How do you differentiate y=xsin(1/x)?

1 Answer

y'=sin(1/x)-1/xcos(1/x)
This is a product rule + chain rule.

Explanation:

Because the inside of the sine function is something other than x, we have to do a chain rule.
So that I know what I'm doing and why, I'm going to do the chain rule first and then show how it fits into the product rule.
The derivative of sin(1/x) is sin(1/x)=sin(x^-1)=cos(x^-1)(-x^-2)=cos(1/x)(-1/x^2)

Next we'll do the product rule and put the derivative of sin(1/x) in there.
y'=(1)sin(1/x)+(x)cos(1/x)(-1/x^2).

Now all that's left is to simplify to the final answer:
y'=sin(1/x)-1/xcos(1/x).