If you make no mistakes, there's loads of freedom in choosing contours. Let me outline the general idea of the solution. You pick a contour such as I have described. Let's say that the contour has various "legs of the journey", or is partitioned into the following contours: , where one of them, , corresponds to the original integral, and . You've got an original integrand . Now, let's suppose further that you know what the value of
is. What you do is set
The hope is that all the , except the one you're interested in, are very easy to do. You might be able to eliminate them on the basis of an ML estimate, for example. Then, you simply shove everything except the integral in which you're interested over to the other side:
Everything on the RHS is either known or easy to compute. Voila! You're done. That's the high-level view of contour integration as it's used to evaluate real-valued integrals. Make sense?