Integrate xsin(x) with respect to x

Apply the rule for integration for parts: Integral of udv = uv - integral of vdu. Choose u to be the term simplified the most when differentiated; in this case choose u to be x as the differential of x w.r.t x is 1. Then dv is sin(x).This means that du = 1 and v = -cos(x) as this is the integral of sin(x)Therefore the integral of xsin(x) = -xcos(x) - integral of (-cos(x))= -xcos(x) + integral of cos(x)= -xcos(x) + sin(x) + cWe must be careful not to forget the constant of integration, c. This arises due to the fact that any constant (i.e. any term with no x dependence) becomes zero when differentiated.