# When does the value of a complex contour integral depend on the choice of the contour of integration?

I have seen examples of complex contour integrals whose value depends on the choice of the contour of integration and some integrals where the value does not depend on the choice of the contour. Is there any indication by which we can know whether the choice of contour matters?

Just to give an example, the value of the improper integral $$I_1=\int_{-\infty}^{\infty}\frac{\sin x}{x}$$ does not depend on the choice of the contour but $$I_2=\int_{-\infty}^{\infty}\frac{e^{-ix}}{x^2-4}$$ does! When we try to evaluate these improper integrals by converting them to complex contour integrals and then using Cauchy's residue theorem, $$I_1$$ is found to be independent of the choice of contour while $$I_2$$ is not.

• If one contour is a continuous deformation of the other, a homotopy, and if the integrand is analytic everywhere on the region between the two contours (the region traversed by the homotopy) then the integrals are guaranteed to be equal (which is remarkable!) May 17 at 14:31
• If either the homotopy or the "analytic on the region between" condition fails, generally the integrals will no longer be the same May 17 at 14:31
• I made a video on this topic. The contour independence comes at the same time when the fucntion is "complex differentiable" inside the domain. of integration. Actually the idea underlying this is heavily related to the idea underlying some general vector calculus theorems, so in the video I talk about that first before this particular case. May 17 at 14:32
• Hmm the integrals you've written aren't contour integrals but rather just real integrals over the real line. You integrate a function over a contour. You don't integrate an integral over a contour May 17 at 14:35
• Hint: by joining two contours with the same endpoints, this is equivalent to asking when an integral around a closed contour is nonzero.
– J.G.
May 17 at 14:40