Solution:
We use integration by parts:
∫f(x)g(x)dx=f(x)∫g(x)dx−∫[f′(x)∫g(x)dx]dx
Take x as the first function and sin3x as the second function.
Since ∫sin3xdx=−3cos3x, we get
∫xsin3xdx=x(−3cos3x)−∫1⋅(−3cos3x)dx
=−3xcos3x+31∫cos3xdx
=−3xcos3x+31⋅3sin3x+C
Therefore,
∫xsin3xdx=−3xcos3x+9sin3x+C