My question relates to this question, where the integral
$\displaystyle\int_{-\infty}^{\infty}\dfrac{e^{iax}}{x^2-b^2}dx=-\dfrac{\pi}{b}\sin(ab)$, where $a,b\gt 0$
is solved. Now, in many physics texts the so-called Feynman prescription is used, i.e. it is stated that instead uf using little semi-circles in the contour to circumvent the poles one may simply shift the pole a bit into the complex plane. Specifically:
$\displaystyle\int_{-\infty}^{\infty}\dfrac{e^{iax}}{x^2-b^2}dx=\int_{-\infty}^{\infty}\dfrac{e^{iax}}{(x-b)(x+b)}dx=\lim_{\epsilon\rightarrow 0}\int_{-\infty}^{\infty}\dfrac{e^{iax}}{(x-b-i\epsilon)(x+b-i\epsilon)}dx$.
Naïvely, one may now solve this integral easily with a contour that contains the real axis and a semi-circle through the upper half-plane. The latter vanishes, so the integral should directly become
$\displaystyle\lim_{\epsilon\rightarrow 0}\int_{-\infty}^{\infty}\dfrac{e^{iax}}{(x-b-i\epsilon)(x+b-i\epsilon)}dx=\lim_{\epsilon\rightarrow 0}2\pi i(Res_{-b+i\epsilon}f(x) + Res_{b+i\epsilon}f(x))$.
The residues are
$\displaystyle Res_{-b+i\epsilon}=-\frac{e^{-iab}e^{-\epsilon}}{2b}\rightarrow-\frac{e^{-iab}}{2b} \qquad (\epsilon \rightarrow 0)$
and
$\displaystyle Res_{-b+i\epsilon}=\frac{e^{iab}e^{-\epsilon}}{2b}\rightarrow \frac{e^{iab}}{2b} \qquad (\epsilon \rightarrow 0)$.
So, in the end we should get
$\displaystyle\lim_{\epsilon\rightarrow 0}\int_{-\infty}^{\infty}\dfrac{e^{iax}}{(x-b-i\epsilon)(x+b-i\epsilon)}dx=\frac{2\pi i}{2b}(e^{iab}-e^{-iab}) = -\frac{2\pi}{b}\sin ab$.
According to the link on the top this result is wrong. However, I cannot see, where the error is in my "derivation". What puzzles me even more: If we were to shift the poles into the lower half-plane the integral would yield zero since it would not contain the poles anymore.
Thank you very much!