Gaussian integral with a shift in the complex plane

$$\int_{-\infty}^\infty e^{-(x+ia)^2} \text{d}x$$ where $a\in \mathbb{R}$.

I don't know where to start but have reasons to believe the answer is $\sqrt{\pi}$. Namely $\int_{-\infty}^\infty e^{-x^2} \text{d}x$. Problem is I feel insecure performing changes of variables when suddenly the variables range in $\mathbb{C}$. I don't even know if this can be done properly, least of all how.

• You could always expand the square and look at it as a Fourier transform, do the calculations, and see if you get what you think that you should get... – mickep May 24 '15 at 19:28
• the searched result should be $\sqrt{\pi}$ – Dr. Sonnhard Graubner May 24 '15 at 19:38
• You can use Cauchy's integral theorem to get rid of the $ia$, by shifting the contour from the line $\operatorname{Im} z = a$ to the real axis. – Daniel Fischer May 24 '15 at 19:49
• @DanielFischer That's awesome thank you, I really should work on my complex analysis knowledge. – Anguepa May 24 '15 at 22:04
• possible duplicate of Can I shift this integral along the complex plane? – user147263 May 25 '15 at 5:03

If $a=0$ the result is clear. Take $a>0$ and take the closed rectangular contour $\Gamma$ counterclockwise oriented in the complex plane from $-T$ to $T$, a vertical segment from $T$ to $T+ia$, a segment from $T+ia$ to $-T+ia$ and the last segment from $-T+ia$ to $-T$. Take $f\left(z\right)=e^{-z^{2}}$. Then by Cauchy theorem we have $$\oint_{\Gamma}f\left(z\right)dz=0\,\,\,\,\,\,\,\,\,(1)$$ and $$\oint_{\Gamma}f\left(z\right)dz=\int_{-T}^{T}f\left(x\right)dx+\int_{0}^{a}f\left(T+iy\right)dy+\int_{T}^{-T}f\left(x+ia\right)dx+\int_{a}^{0}f\left(-T+ia\right)dy=$$ $$=I_{1}+I_{2}+I_{3}+I_{4}.$$ As $T\rightarrow\infty$ we have $$I_{1}=\sqrt{\pi}$$ and $$I_{2}=I_{4}=0$$ because $e^{-\left(x+ia\right)^{2}}\rightarrow0$ if $\left|x\right|\rightarrow\infty$. And so by $(1)$ $$-I_3 = \int_{-\infty}^{\infty}f\left(x+ia\right)dx=\sqrt{\pi}.$$ If $a<0$ the proof is similar.
I saw this used once. Basically, we show that the value of the integral doesn't change with respect to $a$. It requires differentiation under the integral.
$$I(a) = \int_{-\infty}^{\infty} \exp(-(x+ia)^2) dx$$