# Evaluation of contour integration [closed]

Consider the integral $$\int^{\infty}_{-\infty}\frac{q\exp(iqR)}{q^2-k^2}dq$$. This kind of equation appears in evaluation of Green's function in scattering theory.We use contour integration to evaluate this.But by using different contour and including different poles we get different answers like terms proportional to $$\exp(iqR)$$ or $$\exp(-iqR)$$ of same integration.But we know the answer of an integral given the limits will remain same irrespective of the contour chosen as long as the contour passes through the given limits.I do not understand how a definite integral will have different values in different contours at least mathematically apart from the boundary condition that people use in Green's function of scattering theory.

$$\int_{-\infty}^{\infty} dx = \lim_{\epsilon \rightarrow 0} \int_{-\infty}^{-\epsilon} dx + \int_{\epsilon}^{\infty} dx$$
in the case you have a pole at zero. This definition gets rid of the divergence but this is not unique at all. If you choose two different $$\epsilon$$ for the limits, you will get a different answer. This way of avoiding the pole is known as "Cauchy Principal Value". In Arfken's book (6th edition, page 457), there is a nice discussion on it.
If $$k$$ is complex number that does not lie on the real axis, then the answer to the integral is unambiguous. If $$k$$ lies on the real axis, however, you will have to divide by zero as you try to evaluate the integral. You have to do something to avoid this. It is the choice of the "something" that leads to different answers.