There are some tricks to doing integrals. One trick is to look them up in a table of integrals. Another is to learn to use Mathematica. But if you’re on your own and you don’t recognize the integral, the oldest trick in the book is integration by parts.