By integrating $e^{{-z^2}/2}$ around a rectangle with vertices $\pm R; it\pm R$;and sending $R$ to $\infty$, show that $\frac {1}{2\pi}\int_{-\infty}^{\infty} e^{-x^2/2} e^{-itx}dx=e^{-t^2/2}$ Use the known value of the integral for $t = 0$.
Now $\int _{\partial D} e^{{-z^2}/2}dz= \int _{-R}^R e^{{-x^2}/2}dx+ \int _0^te^{{-(R+iy)^2}/2}idy + \int _{R}^{-R} e^{{-x^2}/2}dx+ \int _t^0e^{{-(-R+iy)^2}/2}idy=0$.
Now what shall I do? Do I have to integrate this all?
We have from the Cauchy's Integral Theorem
$$\begin{align} \oint_Ce^{-z^2/2}\,dz&=0\\\\ &=\int_{-R}^Re^{-x^2/2}\,dx+\int_0^t e^{-(R+iy)^2/2}\,i\,dy\\\\ &+\int_{R}^{-R}e^{-(x+it)^2/2}\,dx+\int_t^0e^{-(-R+iy)^2/2}\,i\,dy \tag 1 \end{align}$$
It is easy to see that for any fixed $t>0$, the integrals in $(1)$ over $y$ approach $0$ as $R\to \infty$ since $e^{-R^2/2}\to 0$ as $R\to \infty$. Therefore, we have
$$\lim_{R\to \infty}\int_{-R}^Re^{-x^2/2}\,dx=\lim_{R\to \infty}\int_{-R}^{R}e^{-(x+it)^2/2}\,dx \tag 2$$
Now, upon expanding the terms in the exponent on the right-hand side of $(2)$ and simplifying we obtain
$$\sqrt{2\pi}=e^{t^2/2}\int_{-\infty}^{\infty}e^{-x^2/2}e^{-itx}\,dx$$
Finally, we have
$$\bbox[5px,border:2px solid #C0A000]{\frac{1}{\sqrt{2\pi}}\int_{-\infty}^{\infty}e^{-x^2/2}e^{-itx}\,dx=e^{-t^2/2}}$$
as was to be shown!