TITLE: A Cauchy principal value integral, using contour integration and Plemelj.
QUESTION [6 upvotes]: I came across the following integral
$$\lim_{\epsilon\to0^+}\int_\mathbb{R}\frac{e^{-ax^2+ibx}}{x+i\epsilon}dx$$ with $a,b>0$.
Using Plemelj's formula led me to evaluating 
$$P.V\int_\mathbb{R}e^{ibx}\frac{e^{-ax^2}}{x}dx$$ I thought then of using a closed contour in the complex upper half plane to evaluate this integral. I would be thrilled if $e^{-az^2}/z$ would vanish on the infinite semicircle $\theta\in[0,\pi]$, since then I could apply Jordan's lemma on this function and retrieve my improper integral with just the residue around 0...
After plotting to get a feel, it seems that it does indeed vanish for an "infinite" half circle...

However it is just a plot, hardly prove anything... I would like pointer on how to give a definite proof of that, since I don't really want to waste another 3 pages...
An additional thing: since the integral does "look like" a F.T, is there an easier way to reach a final result than the contour integral way I chose ?...if it is indeed as simple as looking for the FT of $e^{-ax^2}/x$ which as it seems equals $i\pi \text{Erf}\frac{b}{2\sqrt a}$, then how could I retrieve it using the complex tools ?
Thanks

REPLY [4 votes]: \begin{align}
\lim_{\epsilon \to 0^{+}}\int_{\mathbb R}
{{\rm e}^{-ax^{2}\ +\ {\rm i}bx} \over x + {\rm i}\epsilon}\,{\rm d}x
&=
\int_{-\infty}^{\infty}
{{\rm e}^{-ax^{2}\ +\ {\rm i}bx} \over x + {\rm i}0^{+}}\,{\rm d}x
=
\int_{-\infty}^{\infty}
{\rm e}^{-ax^{2}\ +\ {\rm i}bx}
\left[{\cal P}{1 \over x} - {\rm i}\pi\delta\left(x\right)\right]\,{\rm d}x
\\[3mm]&=
{\cal P}\int_{-\infty}^{\infty}
{{\rm e}^{-ax^{2}\ +\ {\rm i}bx} \over x}\,{\rm d}x
-
{\rm i}\pi
\\
-----------&---------------------------
\end{align}
\begin{align}
&{\cal P}\int_{-\infty}^{\infty}
{{\rm e}^{-ax^{2}\ +\ {\rm i}bx} \over x}\,{\rm d}x
=
{\rm i}\int_{-\infty}^{\infty}{\rm e}^{-ax^{2}}\,{\sin\left(bx\right) \over x}\,{\rm d}x
=
{\rm i\,sgn}\left(b\right)\int_{-\infty}^{\infty}{\rm e}^{-ax^{2}/b^{2}}\,{\sin\left(bx\right) \over x}\,{\rm d}x
\\[3mm]&=
{\rm i\,sgn}\left(b\right)\int_{-\infty}^{\infty}{\rm e}^{-ax^{2}/b^{2}}\,
{1 \over 2}\int_{-1}^{1}{\rm e}^{{\rm i}kx}\,{\rm d}k\,\,{\rm d}x
=
{1 \over 2}{\rm i\,sgn}\left(b\right)\int_{-1}^{1}{\rm d}k\int_{-\infty}^{\infty}{\rm e}^{-ax^{2}/b^{2}\ +\ {\rm i}kx}\,{\rm d}x
\\[3mm]&=
{1 \over 2}{\rm i\,sgn}\left(b\right)\int_{-1}^{1}{\rm d}k\int_{-\infty}^{\infty}
\exp\left(-\,{b^{2} \over 4a}\,k^{2}
          -
          {a \over b^{2}}\,\left[x - {\rm i}\,{b^{2}k \over 2a}\right]^{2}\right)
\,{\rm d}x
\\[3mm]&=
{1 \over 2}{\rm i\,sgn}\left(b\right)\int_{-1}^{1}{\rm d}k\,
{\rm e}^{-b^{2}k^{2}/4a}\
\overbrace{\int_{-\infty}^{\infty}{\rm e}^{-ax^{2}/b^{2}}\,{\rm d}x}
^{\left\vert b\right\vert\,\sqrt{\vphantom{\Large A}\pi/a}}
=
{1 \over 2}\,{\rm i}b\,\sqrt{{\pi \over a}\,}2\int_{0}^{1}{\rm e}^{-b^{2}k^{2}/4a}
\,{\rm d}k
\\[3mm]&=
{\rm i}b\,\sqrt{{\pi \over a}\,}\,{2\sqrt{a\,} \over \left\vert b\right\vert}
\,{\sqrt{\pi\,} \over 2}
\left(%
{2 \over \sqrt{\pi\,}}\int_{0}^{b/2\sqrt{a\,}}{\rm e}^{-k^{2}}\,{\rm d}k
\right)
=
{\rm i}\pi\,{\rm sgn}\left(b\right){\rm erf}\left(b \over 2\sqrt{a\,}\right)
\end{align}
$$
\begin{array}{|c|}\hline\\
\color{#ff0000}{\large\quad%
\lim_{\epsilon \to 0^{+}}\int_{\mathbb R}
{{\rm e}^{-ax^{2}\ +\ {\rm i}bx} \over x + {\rm i}\epsilon}\,{\rm d}x
\color{#000000}{\ =\ }
{\rm i}\pi
\left[{\rm sgn}\left(b\right){\rm erf}\left(b \over 2\sqrt{a\,}\right) - 1\right]
\quad}
\\ \\ \hline
\end{array}
$$