TITLE: Complex evaluation of a classical (real) integral
QUESTION [14 upvotes]: 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?!

REPLY [2 votes]: It seems it was Polya, not Mirsky, who gave the first published evaluation of the probability integral via contour integration in 1945: https://projecteuclid.org/euclid.bsmsp/1166219199 (George Polya, Remarks on Computing the Probability Integral in One and Two Dimensions - see chapter 5). Polya's paper was published only in 1949, so Mirsky was not aware of it.
This story is told in the book D. Mitrinovic and J.D. Keckic,  The Cauchy Method of Residues: Theory and Applications, Volume 1, pp. 158-168. Interestingly, the authors write: 
"Some books even state that its value cannot be found by contour methods (see, for example [1] or [2]).
In fact, this is not so. We did our best to find the earliest proof of (1) by contour methods, but we did not arrive at a decisive conclusion. In a private communication dated 3 June, 1971, Professor Copson informed us that immediately after the publication of [2] (in 1935) somebody evaluated the integral (1) by the method of residues, but that he forgot who that was".
Is it possible to find this 1935 publication, if it existed?
For one more recent variant of such a calculation, see http://ijmsa.yolasite.com/resources/60--sepp.pdf (A simplified contour integration for the Probability integral, by P.W. Gwanyama)