Another way to do this (without so much guessing): convert to sine and cosine:
Now, since that has sin(3x) to an odd power, the standard method is to factor one out for the differential and convert to cos(3x): .
Let u= cos(x) so that du= -sin(x)dx and the integral becomes .