This function is the product of the two functions 'x' and 'sin(x)'. Therefore we use the product rule, which says that the differential of a product of two functions is the differential of the first multiplied by the second, plus the differential of the second multiplied by the first:
d/dx(x*sin(x)) = (d/dx(x))sin(x) + x(d/dx(sin(x)))
= 1sin(x) + xcos(x)
= sin(x) + x*cos(x)