# Method of pole shifting (feyman's trick) in Scattering theory vs contour deformation trick

I am studying Scattering theory but I am stuck at this point on evaluating this integral

$$G(R)={1\over {4\pi^2 i R }}{\int_0^{\infty} } {q\over{k^2-q^2}}\Biggr(e^{iqR}-e^{-iqR} \Biggl)dq$$

Where $$R=|r-r'|$$

This integral can be rewritten as

$$G(R)={1\over {4{\pi}^2 i R }}{\int_{-\infty}^{\infty} } {q\over{k^2}-{q^2}}{e^{iqR}}dq$$

Zettili did this integral by the method of contour integration in his book of 'Quantum Mechanics'.He uses residue theorems and arrived at these results.

$$G_+(R)={ -1e^{ikR}\over {4 \pi R}}$$ and $$G_-(R)={ -1e^{-ikR}\over {4 \pi R}}$$

I don't get how he arrived at this result. The test book doesn't provide any detailed explanations about this. But I know to evaluate this integral by pole shifting.

My question is how to evaluate this integral buy just deform the contour in complex plane instead of shifting the poles?

We get $$G_\pm$$ from the pole at $$\pm k$$, enclosed in a semicircular contour on $$\operatorname{sgn}\Re q=\pm\operatorname{sgn}k$$:$$G_\pm=\frac{1}{4\pi^2iR}2\pi i\left.\left(\frac{-q}{q\pm k}e^{iqR}\right)\right|_{q=\pm k}=\frac{-1}{4\pi R}e^{\pm ikR}.$$