Solution (source code)

= Solution

The <Cauchy integral theorem> states that if $f$ is holomorphic on a simply connected domain, then its <integral> around every closed piecewise smooth contour in that domain is zero.

Put $q=b-k$. Completing the square gives
$$
-ax^2+iqx
=-a\left(x-\frac{iq}{2a}\right)^2-
\frac{q^2}{4a}.
$$
After the change of variable $z=x-iq/(2a)$, the <integral> runs along the horizontal line $\operatorname{Im}z=-q/(2a)$. The integrand $e^{-az^2}$ is entire. Apply Cauchy's theorem to a rectangle joining this line to the real axis; the two vertical <integrals> tend to zero as their real parts tend to $\pm\infty$, because $a>0$. The contour may therefore be shifted to the real line. Hence the <Fourier transform of a Gaussian> gives
$$
\begin{aligned}
\widehat f_{a,b}(k)
&=e^{-q^2/(4a)}\int_{-\infty}^{\infty}e^{-az^2}\,dz\\
&=\boxed{\sqrt{\frac\pi a}
\exp\left[-\frac{(k-b)^2}{4a}\right]}.
\end{aligned}
$$