# ∫+∞−∞e−x2dx\int_{-\infty}^{+\infty} e^{-x^2} dx with complex analysis

Inspired by this recently closed question, I’m curious whether there’s a way to do the Gaussian integral using techniques in complex analysis such as contour integrals.

I am aware of the calculation using polar coordinates and have seen other derivations. But I don’t think I’ve ever seen it done with methods from complex analysis. I am ignorant enough about complex analysis to believe it can somehow be done without knowing how it would be done.

What follows is a list of solutions that I enjoy, and use complex analysis either implicitly or explicitly. I will update the list as I come up with more. (Note: Solution 4 is my favorite, and is completely complex analysis oriented. I also quite like Solution 6.)

First, let $u=x^{2}$, $du=2xdx$. Then our integral becomes where $\Gamma(s)$ is the Gamma function.

Solution 1:
Since for all complex $s$, we conclude

Solution 2: Recall the Beta function, Setting $x=y=\frac{1}{2}$ we have

To evaluate this, set $t=\sin^{2}(x)$ to find
Alternatively, we could evaluate the last integral by choosing branch’s such that the integrand is analytic on $\mathbb{C}-[0,1]$ and then integrating around this cut. (The residue then comes from the residue at infinity)

Solution 3: Setting $s=\frac{1}{2}$ in the duplication formula, yields

Solution 4: My personal favorite:
Recall the functional equation for the zeta function, namely that Taking the limit as $z\rightarrow1$, we know that $\zeta(z)\sim\frac{1}{z-1}$ and $\Gamma\left(\frac{1-z}{2}\right)\sim2\frac{1}{\left(z-1\right)}$ so that we must have the equality By taking the limit in the right half plane as $s\rightarrow0$ using the identity which holds for $\sigma>0$, we can find that $\zeta(0)=\frac{1}{2}.$ (notice the pole/zero cancellation). Consequently

Solution 5: From complex integration, for $a,b>0$ we have the identity Set $a=\frac{1}{2},b=\frac{3}{2}$ to find that
Hence Since the integrand on left hand side has anti derivative $\frac{x}{\sqrt{x^{2}+1}}+C$, it follows that the integral is $1$ and hence

Solution 6: More with the Beta function. Consider the Mellin Transform The last equality follows by substituting $v=\frac{1}{1+t}$, and then rewriting the integral as $\int_{0}^{1}v^{a-z-1}(1-v)^{z-1}dv.$ Now, plug in $a=1$ and $z=\frac{1}{2}$ to get and then let $t=x^{2}$ to find

Solution 7: We can also prove the result by using Stirling’s formula. Admittedly, this isn’t really using complex analysis, but I find it interesting.

Since $z\Gamma(z)=\Gamma(z+1)$ we see that

By Stirling’s formula,

and

Using the fact that $\lim_{n\rightarrow\infty}\left(1+\frac{a}{n}\right)^{n}=e^{a}$, it then follows that

Consequently, taking the limit as $n\rightarrow\infty$ in the formula yields

Hope that helps,

Remark: All of the formulas used here can be proven without use the fact that $\Gamma(1/2)=\sqrt{\pi}$, so that none of these are cyclic. This is mainly worth pointing out for $4$.

Edit: I put what were solutions 2 and 3 together since they were not different.