First substitute
to rewrite the integral as
Now use an Euler substitution,
to rewrite it again as
where we take
Partial fractions:
so that
The second integral is trivial,
For the other, I'm compelled to use the residue theorem, though real methods are doable too (e.g. trig substitution). Consider the contour integral
where
is a semicircle in the upper half of the complex plane, and its diameter lies on the real axis connecting
to
. The value of this integral is 2πi times the sum of the residues in the upper half-plane. It's fairly straightforward to convince ourselves that the integral along the circular arc vanishes as
, so the contour integral converges to the integral over the entire real line. Note that
since the integrand is even.
Find the poles of
.
where
.
The two poles we care about are at
and
. Compute the residues at each one.
By the residue theorem,
We also have
Then the remaining integral is
It follows that