Using residue theorem to compute Hi I am studying previous exam questions from complex analysis, and at the same time I am trying to learn about the Residue theorem.
Now I stumbled upon the integral 
\begin{aligned}
\int_{-\infty}^{\infty} e^{-\frac{1}{2}(x+is)^2}dx
\end{aligned}
And I was wondering if it is possible to use the residue theorem on this particular integral. It seems like there are two strategies to use the Residue theorem 
\begin{aligned}
\int_{C} f(z) dz = 2 \pi i \cdot \sum^{k}_{i = 1}  \operatorname{res}(f,a_{i})
\end{aligned}
First one is to find $ \operatorname{res}(f,a_{i})$ by finding the poles and then taking the limits and the second method seems to be series expand, and I suppose I am in the second case here? However I am not exactly sure how to evaluate it.
 A: As already suggested, it's hard to see how we can use RT here, since $e^{-z^2/2}$ is entire; there are no poles, hence no residues.
If this came up on a complex exam, maybe this is what they had in mind: Say the integral is $I(s)$. It's an exercise to use Cauchy's Theorem to show that $I(s)=I(0)$; now if we're allowed to regard $I(0)=\sqrt{2\pi}$ as "well-known" we're done.
Comment It's actually an important integral: If you write $(x+is)^2=x^2+isx-s^2$ you see that $I(s)=\sqrt{2\pi}$ implies that the function $e^{-x^2/2}$ is its own Fourier transform.
Ok, for the benefit of readers who don't want  to do any exercises:
Details: Let $f(z)=e^{-z^2/2}$ and define $$I(s)=\int_{-\infty}^\infty f(x+is)\,dx.$$


$I(s)=I(0)$ for every $s\in\Bbb C$.


Proof: It's clear that $I(s+it)=I(s)$ for $t\in\Bbb R$, so we may assume that $s\in\Bbb R$. In fact we'll assume $s>0$ just so it's clear what the picture looks like.
For $A>0$ let $$I_A(s)=\int_{-A}^Af(x+is)\,dx,$$so $I(s)=\lim_{A\to\infty}I_A(s)$.
Let $R_A$ be the rectangle with vertices $\pm A$, $\pm A+is$. Since $f$ is entire, Cauchy's Theorem shows that $$\int_{R_A}f=0.$$Parametrizing $R_A$ in the obvious way, and letting $[p,q]$ denote the line segment from $p$ to $q$, this says precisely that $$I_A(0)-I_A(s)=\int_{[-A,-A+is]}f - \int_{[A, A+is]}f.$$Now since $|e^{\alpha+i\beta}|=e^\alpha$we see that $$|f(x+iy)|=e^{(y^2-x^2)/2},$$hence $$|f(z)|\le e^{(s^2-A^2)/2}
\quad(z\in[A,A+is]).$$So $$\lim_{A\to\infty}\int_{[A,A+is]}f=0$$by uniform convergence. Similarly for $[-A,-A+is]$; hence $$\lim_{A\to\infty}(I_A(0)-I_A(s))=0,$$or $$I(0)-I(s)=0.$$
