Pretend this is an integration over a complex variable z:

.

Now, the Cauchy theorem says that if you integrate a complex integrand (counterclock-wise) over a closed loop that the integral is times the sum of the residues.

So what closed loop to use? Well, two leap to mind:

1) Start at on the real axis and go to , then close the loop by traveling a half-circle (of radius ) upward and to the left, finishing at on the real axis. (Technically we go from -R to R on the real axis, and take the limit of the integrals as R goes to .)

2) Same idea as the first, but close the loop by doing a half-circle downward and to the left.

In each case the ideal result is that the integral over the half-circle ends up being 0. This is the case here. (This is Jordan's Lemma.)

Which contour you choose depends on the integral and location of the poles. In this case you have one pole in the upper half-plane and one in the lower half-plane. I see no reason to choose one contour over the other here. So pick one and do it. (Or if you want some practice, pick both and do them to see that you get the same answer.)

-Dan