112

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.

JasonMond
  • 4,004
  • https://www.jstor.org/stable/3611303 may be of interest. –  Feb 03 '21 at 13:00
  • @user10575 direct access to the note here: https://www.cambridge.org/core/journals/mathematical-gazette/article/abs/2072-the-probability-integral/2D34C7CD09DEA4136D23294651B7D6D5 – Dr. Wolfgang Hintze Aug 13 '23 at 13:18

3 Answers3

175

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 $$\int_{-\infty}^\infty e^{-x^2}dx=\int_{0}^{\infty}u^{-\frac{1}{2}}e^{-u}du=\Gamma\left(\frac{1}{2}\right).$$ where $\Gamma(s)$ is the Gamma function.

Solution 1: Since $$\Gamma(1-s)\Gamma(s)=\frac{\pi}{\sin\pi s}$$ for all complex $s$, we conclude $$\Gamma\left(\frac{1}{2}\right)=\sqrt{\pi}.$$

Solution 2: Recall the Beta function, $$\text{B}(x,y)=\int_{0}^{1}t^{x-1}(1-t)^{y-1}dt=\frac{\Gamma(x)\Gamma(y)}{\Gamma(x+y)}.$$ Setting $x=y=\frac{1}{2}$ we have

$$ \left(\Gamma\left(\frac{1}{2}\right)\right)^{2}=\int_{0}^{1}\frac{1}{\sqrt{t(1-t)}}dt.$$

To evaluate this, set $t=\sin^{2}(x)$ to find $$\left(\Gamma\left(\frac{1}{2}\right)\right)^{2}=\int_{0}^{\frac{\pi}{2}}\frac{2\sin x\cos x}{\sin x\cos x}dt=\pi.$$ 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, $$\Gamma(s)\Gamma\left(s+\frac{1}{2}\right)=\sqrt{\pi}2^{1-2s}\Gamma(2s),$$ yields $$\Gamma\left(\frac{1}{2}\right)=\sqrt{\pi}.$$

Solution 4: My personal favorite: Recall the functional equation for the zeta function, namely that $$\pi^{-\frac{z}{2}}\Gamma\left(\frac{z}{2}\right)\zeta(z)=\pi^{-\frac{1-z}{2}}\Gamma\left(\frac{1-z}{2}\right)\zeta(1-z).$$ 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 $$\pi^{-\frac{1}{2}}\Gamma\left(\frac{1}{2}\right)=2\zeta(0).$$ By taking the limit in the right half plane as $s\rightarrow0$ using the identity $$\zeta(s)=\frac{s}{s-1}-s\int_{1}^{\infty}\{u\}u^{-s}du,$$ which holds for $\sigma>0$, we can find that $\zeta(0)=\frac{1}{2}.$ (notice the pole/zero cancellation). Consequently $$\Gamma\left(\frac{1}{2}\right)=\sqrt{\pi}.$$

Solution 5: From complex integration, for $a,b>0$ we have the identity $$\int_{-\infty}^{\infty}(1-ix)^{-a}(1+ix)^{-b}dx=\frac{2^{2-a-b}\pi\Gamma(a+b-1)}{\Gamma(a)\Gamma(b)}.$$ Set $a=\frac{1}{2},b=\frac{3}{2}$ to find that $$ \int_{-\infty}^{\infty}\frac{1-ix}{\left(1+x^{2}\right)^{\frac{3}{2}}}dx=\frac{2\pi}{\Gamma\left(\frac{1}{2}\right)^{2}}.$$ Hence $$\int_{0}^{\infty}\frac{1}{\left(1+x^{2}\right)^{\frac{3}{2}}}dx=\frac{\pi}{\Gamma\left(\frac{1}{2}\right)^{2}}.$$ 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$$\Gamma\left(\frac{1}{2}\right)=\sqrt{\pi}.$$

Solution 6: More with the Beta function. Consider the Mellin Transform $$\mathcal{M}\left(\frac{1}{\left(1+t\right)^{a}}\right)(z):=\int_{0}^{\infty}\frac{t^{z-1}}{(1+t)^{a}}dt=\text{B}(a-z,z).$$ 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 $$\int_{0}^{\infty}\frac{1}{\sqrt{t}(1+t)}dt=\Gamma\left(\frac{1}{2}\right)^{2}$$ and then let $t=x^{2}$ to find $$ 2\int_{0}^{\infty}\frac{1}{1+x^{2}}dx=\pi=\Gamma\left(\frac{1}{2}\right)^{2}. $$

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 $$ \Gamma\left(n+\frac{1}{2}\right)=\Gamma\left(\frac{1}{2}\right)\cdot\left(\frac{1}{2}\right)\left(\frac{3}{2}\right)\cdots\left(\frac{2n-1}{2}\right)=\Gamma\left(\frac{1}{2}\right)\left(\frac{(2n)!}{n!4^{n}}\right)=\Gamma\left(\frac{1}{2}\right)\binom{2n}{n}\frac{n!}{4^{n}}. $$ By Stirling's formula, $$ \binom{2n}{n}\frac{1}{4^{n}}\sim\frac{1}{\sqrt{\pi n}}\ \text{as}\ n\rightarrow\infty $$ and $$ \frac{\Gamma\left(n+\frac{1}{2}\right)}{n!}\sim\frac{1}{\sqrt{ne}}\frac{\left(n+\frac{1}{2}\right)^{n}}{n^{n}}. $$ Using the fact that $\lim_{n\rightarrow\infty}\left(1+\frac{a}{n}\right)^{n}=e^{a}$, it then follows that $$ \frac{\Gamma\left(n+\frac{1}{2}\right)}{n!}\sim\frac{1}{\sqrt{n}}. $$ Consequently, taking the limit as $n\rightarrow\infty$ in the formula $$\Gamma\left(\frac{1}{2}\right)=\frac{\Gamma\left(n+\frac{1}{2}\right)}{n!}\frac{4^{n}}{\binom{2n}{n}}$$ yields $$\Gamma\left(\frac{1}{2}\right)=\sqrt{\pi}.$$

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.

Did
  • 279,727
Eric Naslund
  • 72,099
  • 27
    Wow! What an answer... – t.b. Apr 23 '11 at 20:21
  • 5
    I will update the list as I think of more interesting solutions. – Eric Naslund Apr 23 '11 at 21:46
  • 3
    That's extraordinary. Well said. – davidlowryduda Apr 24 '11 at 06:38
  • 2
    There are also some ways to do it using the Fourier transform of the $\vartheta$-function (which is of course also a natural place to look for the desired identity). These are also given in the book of Remmert I linked to. Is there a reason you didn't include such calculations? (Of course, this I don't mean to imply that this great answer needs any improvement whatsoever). – t.b. Apr 24 '11 at 09:26
  • Great compilation you have there. :) – J. M. ain't a mathematician Apr 24 '11 at 13:48
  • Thanks! I'm still working through them, but what I've worked through has been very helpful. – JasonMond Apr 24 '11 at 18:42
  • I wish I could vote up more than once! This is quite illuminating to see all these together. – JavaMan Apr 26 '11 at 01:49
  • There is a typo in the (otherwise very nice) solution 7. The asymptotic form of $\Gamma(n+1/2)/n!$ should be inverted. – Johan Apr 26 '11 at 08:55
  • @Johan: Thanks for pointing that out. For that line, I was using Stirlings formula for $\Gamma(s)$, and I accidentally plugged in $n$ instead of $n+1$ for the denominator. – Eric Naslund Apr 26 '11 at 21:12
  • This is really an amazing answer, great work Eric! – Glen Wheeler Apr 26 '11 at 21:21
  • @EricNaslund I've compiled this in a .pdf generated by TeX. Amazing! – Pedro Feb 20 '12 at 01:07
  • @t.b. Could you consider making an answer detailing the use of $\vartheta$ functions to solve this? – Meow Jun 03 '14 at 12:22
  • Mr. Eric Naslund: You seem very good at integral problem on M.SE. Would you mind answering my integration problem? Thanks. BTW, nice solution. +1. I hope that somebody here will upvote this answer so you will earn a gold badge ヽ(^o^)ノ – Anastasiya-Romanova 秀 Aug 08 '14 at 12:42
  • really +127 is a shame : you start with $\frac{\pi}{\sin \pi s} = \Gamma(s) \Gamma(1-s)$ one of the hardest complex analysis theorem to prove, and it obviously relies on $\Gamma(1/2) = \sqrt{\pi}$. the solution 2 is OK, the solution 3 is as hard to prove (the duplication formula for $\Gamma(s)$ and it relies on $\Gamma(1/2)$ ), the solution 4 is even worse (lol the functional equation for $\zeta(s)$, do you know how to prove it ?...), the solution 5 and 6 are the same as solution 2, the solution 7 looks ok, but not sure. – reuns Apr 20 '16 at 02:58
  • 4
    @user1952009 You shouldn't critize my answer just because you don't know how to prove the identities I used nicely. For (1) The functions $\Gamma(s)\Gamma(1-s)$ and $1/\sin(\pi s)$ both have no zeros and poles at every integer, so the first identity follows directly from the Weierstrass Factorization Theorem. It in no way relies on $\Gamma(1/2)$ as you incorrectly state. As for (4), the functional equation comes from an application of the Poisson summation on $\psi(x)=\sum_{n=1}^\infty e^{-\pi n^2 x}$, and (5) has little to do with (2). – Eric Naslund Apr 20 '16 at 15:57
  • @EricNaslund : you are wrong my friend, try yourself. again I repeat : I don't like most part of your answer, the worst being the one with the functional equation for $\zeta(s)$ – reuns Apr 20 '16 at 15:59
  • and the main reason why I don't like it, is that you use complicated theorems, without wondering why and how they would imply $\Gamma(1/2) = \sqrt{\pi}$, after all that "work" you can't classify those methods yet. – reuns Apr 20 '16 at 16:01
  • 2
    @user1952009 You are critizing me because you don't understand why these proofs work, or why the underlying theorems are true. Weierstrass Factorization is a very natural theorem - it roughly says that a meromorphic function is given by the location of it's zeros, poles and it's growth rate. The proof for Poisson summation on the real line is quite short and just uses basic Fourier analysis on the torus. Could the proof that $\Gamma(1/2)=\sqrt{pi}$ using Poisson and zeta be streamlined? Certainly, but you'd lose the lovely connection in doing so, and where is the fun in that? – Eric Naslund Apr 20 '16 at 16:20
  • @EricNaslund : yes I know how to prove Weierstrass Factorization theorem or Fourier inversion theorems, as the functional equation for $\Gamma$ or $\zeta$ that's why I am critizing your answer : most of the proofs of those use the mean value of $e^{-x^2}$ or prove things that are enough for proving it in 2 lines. hence, your answer listing "some beautiful" formulas than imply $\Gamma(1/2) = \sqrt{\pi}$ is a list of some beautiful formulas in real/complex analysis, no more than that, in any case it is the list of the main methods for proving $\Gamma(1/2) = \sqrt{\pi}$ – reuns Apr 20 '16 at 16:36
  • and I'm downvoting because you got +127, you deserved +10 not more, you made a nice work, but you didn't conclude the subject and the question : what are the main methods for proving $\Gamma(1/2) = \sqrt{\pi}$ – reuns Apr 20 '16 at 16:37
  • for $\textbf{Solution 1}$, at the end did you plug in $\frac{1}{2}$ for $s$ then $(\Gamma(\frac{1}{2}))^2 = \frac{\pi}{1}$ thus $\Gamma(\frac{1}{2})=\sqrt{\pi}$? – homosapien Aug 02 '22 at 20:50
  • 1
    @HossienS'MyMathYourMath': That is correct – Eric Naslund Aug 05 '22 at 19:46
87

This needs some trickery since $e^{-z^2}$ has no poles.

The easiest proof I know can be found in Remmert's book (it's in §14.3.3 on page 330 of the German edition, but, as usual, Google doesn't let me look at the page I'm interested in) and seems to be to be due to H. Kneser (since Remmert doesn't give any other source).

So here's the deal:

Put $$g(z) = \frac{e^{-z^2}}{1+ e^{-2az}}\quad \text{with }\quad a = (1+i)\sqrt{\frac{\pi}{2}}.$$ From $a^2 = i\pi$ it is easy to see that $$g(z) - g(z+a) = e^{-z^2}$$ and that the poles of $g$ are simple and located precisely at the points $-\frac{1}{2}a + na$ with $n \in \mathbb{Z}$.

Now integrate the function $g$ over the rectangle with corners $-r,s, s+i\operatorname{Im}(a),-r+i\operatorname{Im}(a)$ with $r,s \gt 0$ real numbers. Observe that the only pole of $g$ inside this rectangle is the one located at $\frac{a}{2}$, and its residue is $$\operatorname{res}_{\frac{a}{2}} g = \frac{e^{-\frac{1}{4}a^2}}{-2ae^{-a^2}} = \frac{-i}{2\sqrt{\pi}},$$ using the usual formula $\operatorname{res}_{x} \frac{f}{h} = \frac{f(x)}{h'(x)}$ if $h$ has a simple zero at $x$ and $f(x) \neq 0$.

Using the residue theorem and the periodicity $g(z) - g(z+a) = e^{-z^2}$ one then easily verifies that $$\int_{-\infty}^{\infty} e^{-x^2}\,dx = \lim_{r,s \to \infty} \int_{-r}^{s} e^{-x^2}\,dx = 2\pi i \, \operatorname{res}_{\frac{a}{2}} g = \sqrt{\pi}$$ since the integrals along the vertical sides of the rectangles converge to zero as $r,s \to \infty$.

Remmert also mentions that it was often claimed in the older literature that it was impossible to obtain this formula from the calculus of residues.


Added.

Remmert also refers to G. Pólya's article Remarks on Computing the Probability Integral in One and Two Dimensions, Proc. [First] Berkeley Symp. on Math. Statist. and Prob. (Univ. of Calif. Press, 1949), 63-78, where another method is shown: In section 5 of that article (on p. 68f) Pólya integrates the function $e^{i\pi z^2} \tan{(\pi z)}$ over the parallelogram with corners $R+iR$, $-R-iR$, $-R+1-iR$, $R+1+iR$ to derive the desired formula.

t.b.
  • 78,116
15

$\text{MR}1641980\, (99\text{h}:26002)$

Desbrow, Darrell.

On Evaluating $\displaystyle\int_{-\infty}^\infty e^{ax(x-2b)}\, dx$ by Contour Integration Round a Parallelogram.

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

GEdgar
  • 111,679