Integral $\int_0^\infty e^{iax}\sin(bx)dx$ While trying to evaluate the Fourier transform of the Helmholtz operator's Green's function (i.e., $e^{ik|\mathbf{r}_1-\mathbf{r}_2|}/(4\pi|\mathbf{r}_1-\mathbf{r}_2|)$, I'm encountering an integral of the form 
$$\int_0^\infty e^{ikr}\sin(pr)dr\,.$$
Here, $p=|\mathbf{p}|$, is the magnitude of the $\mathbf{p}$ vector from the $\mathbf{p}$-space. Now, my textbook says that the above integral is
$$\frac{p}{p^2 - k^2}\,.$$
How do I prove this? I know that for $a>0$, $\int_0^\infty e^{-ax} \sin(bx) = b/(a^2 + b^2)$).  I'm tempted to set $a = -ik$, and $b = p$ to get the answer I need.  But this doesn't clearly make any sense since $a$ must be a positive real number.
 A: First note the Fourier transform of the delta function, $\delta(x-\tau)$, is $$\hat \delta(\cdot-\tau)(\omega) = \int_{-\infty}^\infty \delta(x-\tau) e^{-ix\omega} dx = e^{-i\omega\tau},$$ since the integral against the delta function results in evaluation.
Therefore, we formally have the inverse Fourier transform: $$\mathcal{F}^{-1}[e^{-i(\cdot)\tau}](x) = \int_{-\infty}^\infty e^{-i\omega\tau} e^{ix\omega} d\omega = \int_{-\infty}^\infty e^{i\omega(x-\tau)} d\omega= \delta(x-\tau).$$ The justification is in the sense of distributions.
Another formal computation is in the Fourier transform of the unit step function $$u(\omega) = \left\{ \begin{array}{cc} 0 & \omega < 0\\ 1 & \omega \ge 0 \end{array}\right. .$$ Let's assume that $u$ is the Fourier transform of some function (we will need this in a minute), then $$\mathcal{F}^{-1}[u](x) = \int_{-\infty}^\infty u(\omega) e^{i\omega x} d\omega.$$ Again, we have an integral that doesn't converge. To attempt to get any reasonable value out of it, we consider a function whose limit is $u$, at least pointwise. Let $$u_\alpha(\omega) = \left\{ \begin{array}{cc} 0 & \omega < 0\\ e^{-\alpha \omega} & \omega \ge 0 \end{array}\right. .$$
As $\alpha \to 0$ we have $u_\alpha \to u$ pointwise (and uniformly over any compact set). Now consider, $$\mathcal{F}^{-1}[u_{\alpha}](x) = \int_{-\infty}^\infty u_{\alpha}(\omega)e^{ix\omega} d\omega = \int_0^\infty e^{-\alpha\omega}e^{ix\omega} d\omega = \int_{0}^\infty e^{(-\alpha+ix)\omega}d\omega = \left. \frac{e^{(-\alpha+ix)\omega}}{(-\alpha+ix)} \right|_{\omega=0}^{\omega=\infty}=\frac{1}{-\alpha+ix}.$$
We now conclude that $\mathcal{F}^{-1}[u](x) = \lim_{\alpha\to0} \mathcal{F}^{-1}[u_\alpha](x) = \frac{1}{ix}.$
Now let us examine your problem: $$\int_{0}^\infty e^{ikr} \sin(pr)dr = \int_{0}^\infty e^{ikr} \left( \frac{e^{ipr} - e^{ipr}}{2i}\right) dr = \frac{1}{2i} \left( \int_0^\infty e^{ikr}e^{ipr} dr - \int_0^\infty e^{ikr}e^{-ipr} dr\right)$$
$$=\frac{1}{2i} \left( \int_{-\infty}^\infty u(r) e^{ikr}e^{ipr} dr - \int_{-\infty}^\infty u(r) e^{ikr}e^{-ipr} dr\right).$$
Now these integrals can be viewed as inverse Fourier transforms,
$$\int_{-\infty}^\infty u(r) e^{ikr}e^{ipr} dr = \mathcal{F}^{-1}[u\cdot e^{ip(\cdot)}](k),$$ for example.
By the convolution theorem, we have $$\mathcal{F}^{-1}[u\cdot e^{ip(\cdot)}](k) = \left(\mathcal{F}^{-1}[u] * \mathcal{F}^{-1}[e^{ip(\cdot)}]\right)(k)=\int_{-\infty}^\infty \mathcal{F}^{-1}[u](x) \mathcal{F}^{-1}[e^{ip(\cdot)}](k-x) dx = \int_{-\infty}^\infty \frac{\delta(k-x+p)}{ix} dx = -\frac{1}{i(k+p)}.$$
Similarly, $\int_{0}^\infty e^{i(k-p)r} dr = -\frac{1}{i(k-p)}.$
Therefore, $$\int_{0}^\infty e^{ikr} \sin(pr)dr =\frac{1}{2i} \left( -\frac{1}{i(k+p)}+ \frac{1}{i(k-p)}\right) = \frac{1}{2i} \frac{-i(k-p)+i(k+p)}{(-1)(k^2-p^2)}= \frac{p}{p^2-k^2}.$$
Now most of these integrals don't converge in the traditional sense. The justification for these operations above comes from the theory of distributions, where two distributions are equal if they agree as integration kernels against Schwarz functions.

Here is a way of demonstrating (at least heuristically) that the inverse Fourier transform of the exponential is the delta funciton. Take $\mathcal{F}^{-1}[e^{i(\cdot)\tau}]$. We believe that it should be $\delta(\cdot + \tau)$.
Then $$\int_{-\infty}^\infty f(x) \mathcal{F}^{-1}[e^{i(\cdot)\tau}](x) dx = \int_{-\infty}^\infty f(x) \int_{-\infty}^\infty e^{i \omega \tau} e^{i\omega x} d\omega dx = \int_{-\infty}^\infty \left(\int_{-\infty}^\infty f(x) e^{i \omega x} dx\right) e^{i\omega\tau} d\omega = \int_{-\infty}^\infty \hat f(-\omega) e^{i\omega\tau} d\omega = f(-\tau) = \int_{-\infty}^\infty f(x) \delta(x+\tau) dx.$$
Thus we see that formally, $\delta(x+\tau)$ and $\mathcal{F}^{-1}[e^{i(\cdot)\tau}]$ should be the same, since they agree after integration against some class of functions. Ususally, $f$ is taken to be a Schwarz function or a $C^\infty$ function with compact support (a test function).
