If the integrand is

then the easiest way to compute this is to expand the product completely, then integrate the resulting polynomial.
If instead it's

you can split the integrand into partial fractions


On the right side, we have

so that

Then

In both denominators, we can complete the square to write


Then substitute


We have



Since

and

all the remaining integrals are trivial; we end up with

Reverse the substitution:

