I am studying the following integral: $$\int_{-\infty}^\infty \frac{1}{2\pi i} \frac{-e^{-ix(a-b)}}{x^2 - c^2} dx$$ where $a, b, c > 0$ are real constants.
The integrand has poles along the real axis when viewed as a complex function. My approach to solving this integral was to create a contour with two semicircles of radius $\epsilon$ and close the contour by creating a big semicircle. In other words, we would have a contour like the one in the figure below:
but instead of having a semicircle cutout near the origin there would be two at $\pm c$. One can then use the residue theorem.
I made a post about this integral on physics SE: https://physics.stackexchange.com/q/800770/288281. In that post I was surprised to find out that the choice of contour does matter and will give different answers, in contrast to something like $$\int_{-\infty}^\infty \frac{\sin(x)}{x}dx$$ which does not depend on the choice of contour. This is briefly discussed in this question: When does the value of a complex contour integral depend on the choice of the contour of integration?.
I have two questions:
- When does the value of an integral over the real line, when computed using complex contour integration, depend on the choice of contour and why?
- The approach used to solve this integral in physics textbooks is also to use the residue theorem, but they first push the poles slightly above or below the real axis and then take a limit. So the integral becomes $$\lim_{\epsilon \rightarrow 0} \int_{-\infty}^\infty \frac{1}{2\pi i} \frac{-e^{-ix(a-b)}}{x^2 - c^2 + i\epsilon} dx.$$ Why is it necessary to push the poles above/below the real axis? What is wrong with the contour approach I described above which keeps the poles on the real axis? Is this because the integral is not well defined?
