Difficulty with the usage of Cauchy's integral formula in Griffiths QM book On page 410 of Griffiths QM 2nd Ed. book, he begins an analysis to evaluate the integral:
$$\frac{1}{2i}\int_{-\infty}^\infty \frac{s \sin{(sr)}}{(s-k)(s+k)}\mathrm{d}s.$$
To exploit Cauchy's formula, he dissolves the integral into:
$$\int_{-\infty}^\infty \frac{s e^{isr}}{(s-k)(s+k)}\mathrm{d}s-\int_{-\infty}^\infty \frac{s e^{-isr}}{(s-k)(s+k)}\mathrm{d}s.$$
Now he chooses a contour by which he overlooks the poles (at $\pm k$). The poles are (at least apparently) the most severe points. Is this a rigorous analysis? After all, for each of these two integrals I can choose a contour containing no poles at all, and hence each is zero. That is not the answer.
I looked for mathematical sources that discusses this particular point, and I found none. 
 A: The integral $$I(k) = \int_{-\infty}^\infty \frac{s e^{isr}}{(s-k)(s+k)} ds \tag{1}$$
where $k$ is real and the integration is for real $s$, is not really well-defined. This is precisely because the integrand has singularities on the integration domain. However consider if $k$ is a complex number $k = k_r + ik_i$ with $k_i >0$. Then the integrand is smooth on the whole integration domain. We can even calculate the integral using the residue theorem. It turns out that $$ I(k) = i\pi e^{ikr}.$$
As it stands $I(k)$ is only defined for complex numbers with non-zero imaginary part, but since the expression for $I(k)$ certainly makes sense for all complex numbers, we can extend it to the case where $k$ is real. If you draw the poles of the integrand in (1) you see that integration along the real axis is below one pole and above the other. Since the complex integral depends only on the winding numbers about each pole, when taking $k_i \to 0$ you can think of it as the contour having to bend to keep the poles on the same side; this gives the contour in Griffiths's Figure 11.9.
Taking instead $k_i < 0$ will give another contour, but as explained in Griffiths's book for the present purpose this is immaterial.
