There are several ways to compute the classical integral
$$
\int\_{\mathbb R}e^{-x^2}dx=\sqrt{\pi}.
$$
Probably, best known are


(1) squaring the integral with subsequent change
of (now two) variables to the polar form, and


(2) the reducing to the Gamma-function at $1/2$.


I am interested though in a "complex" analysis method (namely, a use
of the residue theorem) to do the job. The reason is that several integrals like
$$
\int\_0^\infty e^{-x^2}\cos ax\ dx
\qquad\text{or}\qquad
\int\_0^\infty\sin x^2\ dx
$$
can be computed via the residue theorem *and* the above integral,
so I would like to avoid any reference to real analysis. Is there such
a complex evaluation though?!



Complex evaluation of a classical (real) integral
Yes! For a long time that was thought impossible, but then it was found how to do it using a parallelogram as a contour. 


Desbrow, Darrell  

On evaluating $\int\_{-\infty}^\infty e^{ax(x-2b)}dx$ by contour integration round a parallelogram.  

Amer. Math. Monthly 105 (1998), no. 8, 726–731. 


According to Desbrow, the parallelogram integral evaluation for the probability integral is due to Mirsky, 1949.


