Contour Integral of a Complex Gaussian Say we have the integral
$ I = \int_{-\infty}^{\infty} e^{-a(k+bi)^2} dk $
I know that this gives $\sqrt{\frac{\pi}{a}}$ though Wolfram and other sources. I am also fairly certain I need to solve this problem using contour integration, however, I have not seen anything similar in form and don't know what contour to choose the correct contour to evaluate it over, I need to be able to show rigorously show $I = \sqrt{\frac{\pi}{a}}$, but how?
A final question of if it isn't contour integration then how should I approach the problem?
 A: If you want to do it without contour integration you could use a standard result for the Fourier transform.
Expand the integral
$$
I=\int_{-\infty}^\infty e^{a b^2}e^{-2i ab k}e^{-a k^2}\;dk\\
I=C\int_{-\infty}^\infty e^{-2 \pi i x k}e^{-a k^2}\;dk\\
$$
where $x=2ab/(2\pi)$. We can identify this as the Fourier transform of a Gaussian which can be found in a standard table
$$
I = C \frac{e^{{-\frac{\pi^2 x^2}{a}}} \sqrt{\pi}}{\sqrt{a}}\\
I = e^{a b^2} \frac{e^{{-\frac{\pi^2 (2ab/(2\pi))^2}{a}}} \sqrt{\pi}}{\sqrt{a}} \\
I= e^{a b^2} \frac{e^{{-ab^2}} \sqrt{\pi}}{\sqrt{a}} \\
I= \frac{\sqrt{\pi}}{\sqrt{a}}
$$
A: Consider the contour
$$
\gamma=[-R,R]\cup[R,R+bi]\cup[R+bi,-R+bi]\cup[-R+bi,-R]
$$
The integral
$$
\int_\gamma e^{-az^2}\,\mathrm{d}z=0
$$
since there are no singularities of $e^{-az^2}$ inside it (or anywhere). Since the integral along $[R,R+bi]$ and $[-R+bi,-R]$ vanish as $R\to\infty$, we get that the integral along this contour is the difference
$$
\int_{-\infty}^\infty e^{-ak^2}\,\mathrm{d}k-\int_{-\infty}^\infty e^{-a(k+bi)^2}\,\mathrm{d}k
$$
