I'm struggling at the moment with the following integral, which is essentially an inverse Fourier transform of a Gaussian with a single pole on the imaginary axis:
$$I(Q) = \frac{1}{2}\int_{-\infty}^{\infty} dx \frac{e^{ix a} e^{-\beta x^2}}{Q^2+x^2} $$
A solution to this integral is given in Ryzhik & Gradshteyn (7th ed, pg 504, 3.954) as
$$I = \frac{\pi}{4Q}e^{\beta Q^2}\left[2\cosh{Qa} - e^{-Qa}\text{erf}\left(Q\sqrt{\beta}-\frac{a}{2\sqrt{\beta}}\right)- e^{Qa}\text{erf}\left(Q\sqrt{\beta}+\frac{a}{2\sqrt{\beta}}\right)\right]$$
I've been trying to figure this solution out, as I will eventually need to take a similar integral with more complicated poles, so this is a good starting integral to solve. However, I don't intuitively see how to get to this result in R&G. I've tried rectangular contours but can't seem to see the line of thought to take me to this result. Any help would be very much appreciated! Thanks :)
(A method without residues to check the given answer.) By change of variables $$ I(Q) = 2\int_{-\infty}^{\infty} dx \frac{e^{ix a} e^{-\beta x^2}}{Q^2+x^2} = \frac2Q \int_{-\infty}^\infty dx \frac{e^{ix Qa} e^{-\beta Q^2 x^2}}{1+x^2} $$ so WLOG $Q=1$. Put $f(a,\beta)= I(1)$. Next, differentiate in $\beta$ and complete the square / use a standard integral: $$ f-\partial_\beta f = 2 \int_{-\infty}^\infty dx e^{ix a} e^{-\beta x^2} = 2\sqrt{\pi /\beta} e^{-a^2/4\beta} $$ We can simplify with an integrating factor: $f - \partial_\beta f = -e^{\beta}\partial_\beta (e^{-\beta} f)$ so $$ \partial_\beta (e^{-\beta} f) = -2\sqrt{\pi /\beta} e^{-a^2/4\beta - \beta} $$ Now we can differentiate $e^{-\beta} F$ wrt $\beta$, where $$ F(a,\beta) = \frac{\pi}{4}e^{\beta }\left[2\cosh{a} - e^{-a}\text{erf}\left(\sqrt{\beta}-\frac{a}{2\sqrt{\beta}}\right)- e^{a}\text{erf}\left(\sqrt{\beta}+\frac{a}{2\sqrt{\beta}}\right)\right] $$ and see if it matches. This is easy since $\text{erf}(z)=\frac{2}{\sqrt\pi}\int_0^ze^{-t^2} dt$, so that $\frac{d}{dx}\text{erf}(x) = \frac{2 e^{-x^2}}{\sqrtπ}$. To avoid mistakes I checked with sympy. Sympy says yes, but a factor of 4 is missing (as in Steven Clark's comments)