Let u = x and dv/dx = sin(x),
By using the general expression of:
integral(u multiply dv/dx)dx = [u multiply v] - integral(v multiply du/dx)dx, and by realising that:
du/dx = 1, and v = -cos(x), we can deduce that the expression for integral(xsin(x)) becomes:
[-xcos(x)] - integral(-cos(x))dx, by putting the limits in, we can say that [-xcos(x)] is 0 because cos(-pi/2) = cos(pi/2) = 0. We can also say that, -integral(-cos(x))dx = [sin(x)], and by puitting the limits in this becomes [sin(pi/2) - sin(-pi/2)] = 2.
Therefore: integral(xsin(x))dx between -pi/2 and pi/2 = 2.