Your choice of contour seems good to me. That is, I would choose the following:
on the real axis, (you'll let later) followed by the semicircle of radius in the upper half plane going back to on the real axis, which we'll call . Picture that? Technically, you're interested in the second half of after you've let .
I should point out, that, because when using the residue theory you're assumed to have traversed a contour in the clockwise (positive) direction, you'll need to change the sign of to get the correct answer.
So we've got a simple closed contour that avoids all poles directly in its path, and includes the original limits of integration. What next?
Well, all residues are concerned with the Laurent expansion. However, there are cute ways of computing them if you know the order of the pole. All our poles are simple, which are the easiest. Rule 1 on page 196 of Gamelin states the following:
If has a simple pole at , then
Try that on for size. At which poles are you going to compute the residues?
Better to say "upper half plane" than "positive imaginary direction" - less confusing. Those are indeed the poles at which to compute the residues. Once you have the residues, the residue theorem gives you the value of , modulo a minus sign for traversing the boundary the "wrong" way. You're left with two pieces: the and integrals. What do you think about them?
Your computation seems correct. In fact, it's more correct than I would have done. True confessions: I just looked it up, and the positive orientation of a contour is counterclockwise (the interior of the region is to your left as you traverse in the positive direction). So forget what I said about the minus sign.
The ML estimate looks like this: suppose is a piecewise smooth curve. If is a continuous function on , then
Further, if has length , and on , then
That's the theorem on page 105 of Gamelin. This estimate might be useful for your , but not for . Why, might you ask, is it not useful for ? Because you want to know its exact value! However, if you can prove that the integral over the is zero using the ML estimate, then you're essentially done. How could you use the ML estimate to show that the integral is zero (as I think you'll find it is, after you've taken the limit as )?
We know that L is just the length of the semi circle we have, so , and M is something which I don't remember, but know how to calculate. We get . Since, as , we get the denominator going to 0 much faster than the numerator, so we that that integral term equal 0. So, we just need to find the , and then we can find the final thing . Would we do the ML for the too?
You should be a little more careful with your parentheses, especially when adding things together in denominators. *ahem* Your basic idea for the ML estimate is correct. However, without the parentheses, it's actually incorrect. The basic idea is correct, however. The integrand beats out the (correct) value of L you gave, so the ML is zero in the limit. Hence the integral over is zero. As for , I would simply recognize that
since the integrand is even.
And your final answer is...?