The general formula for integration by parts is given as
∫u(dv/dx)dx = uv - ∫v(du/dx)dx
given that the equation to be solved is ∫x2sin2xdx, the values for u, v, du/dx and dv/dx can be assigned as
u = x2 du/dx = 2x
v = (-1/2)cos2x dv/dx = sin2x
These values can then be plugged into the general formula to solve the integral
∫x2sin2xdx = (-1/2)x2cos2x + ∫xcos2x dx
the second integral is then solved. In this instance, integration by parts has to be used a second time. The new values for u, v, du/dx and dv/dx can be assigned as
u = x du/dx = 1
v = (1/2)sin2x dv/dx = cos2x
Therefore the integral can be solved as
∫x2sin2xdx = (-1/2)x2sin2x + (1/2)xsin2x - ∫(1/2)sin2x dx
= (-1/2)x2sin2x + (1/2)xsin2x + (1/4)cos2x + C