Alternatively, you could make use of trig identities to find the same result:
In addition to Gio's method, there is another way of doing this integral, using trig identities. (If you don't like trig or math in general, I wouldn't blame you for disregarding this answer - but sometimes the use of trig is unavoidable in problems).
The identity we will be using is:
We can therefore rewrite the integral like so:
Using the sum rule we get:
The first integral simply evaluates to
Use the identity
And that is the answer Gio found using the integration by parts method.