I think you will find that it depends on the principal part of the Laurent series of the integrand.

http://mathworld.wolfram.com/ContourIntegration.html

Look at equation 12. I remember saying for rational functions only. You will also see it is a definite integral. The method can be extended to some other forms, see (14),(15) and (16).

]]>In order to evaluate real integrals, the residue theorem is used in the following manner: the integrand is extended to the complex plane and its residues are computed (which is usually easy), and a part of the real axis is extended to a closed curve by attaching a half-circle in the upper or lower half-plane, forming a semicircle. The integral over this curve can then be computed using the residue theorem. Often, the half-circle part of the integral will tend towards zero as the radius of the half-circle grows, leaving only the real-axis part of the integral, the one we were originally interested in.

It is not a problem, looks like you convert it into a contour integral or something like that. Anyway the method can be used for real integrals.

Do you think we have done 5 of these and got the right answer by accident? Sure we are lacking in rigor in the approach but it does work for real integrals of that type.

]]>If you look here you will see the formula I am using or misusing and even that the contour is circular and encloses the poles.

]]>By the way, now when I look at this stuff again, I think only the residue part confused me, so I do thank you for making that part clearer. It seems to be a common ground between your method and the contour integration method. I will have to read about it once more to make sure I understand it.

]]>