77

It seems as if no one has asked this here before, unless I don't know how to search.

The Gamma function is $$ \Gamma(\alpha)=\int_0^\infty x^{\alpha-1} e^{-x}\,dx. $$ Why is $$ \Gamma\left(\frac{1}{2}\right)=\sqrt{\pi}\text{ ?} $$ (I'll post my own answer, but I know there are many ways to show this, so post your own!)

  • Possible duplicate: http://math.stackexchange.com/questions/9286/proving-int-0-infty-e-x2-dx-frac-sqrt-pi2 – Argon Oct 20 '12 at 17:35
  • 4
    @Argon Did you look at the other question? It's not even close to the same thing. And, how on earth did 2 other people vote to close without even looking at it? – GeoffDS Oct 20 '12 at 23:49
  • 7
    @Graphth With a simply change of variables ($x^2 = t$), the integrals are virtually identical, except for a constant coefficient. – Argon Oct 20 '12 at 23:52
  • Maybe not that question, but I am quite sure this has been asked before... – J. M. ain't a mathematician Oct 21 '12 at 06:09
  • 2
    http://www.math.uconn.edu/~kconrad/blurbs/.../gaussianintegral.pdf is a good source of methods to solve this. – Ishan Banerjee Mar 17 '13 at 08:07

11 Answers11

62

One can use the trick with spherical coordinates: $$ \Gamma\left(\frac{1}{2}\right) = \int_0^\infty \mathrm{e}^{-x} \frac{\mathrm{d} x}{\sqrt{x}} = \int_0^\infty \mathrm{e}^{-x} \mathrm{d} (2 \sqrt{x}) = \int_{-\infty}^\infty \mathrm{e}^{-u^2} \, \mathrm{d} u $$ Then: $$ \Gamma\left(\frac{1}{2}\right) \Gamma\left(\frac{1}{2}\right) = \int_{-\infty}^\infty \int_{-\infty}^\infty \mathrm{e}^{-x^2} \mathrm{e}^{-y^2} \, \mathrm{d}x \, \mathrm{d} y = \underbrace{\int_0^\infty r \mathrm{e}^{-r^2} \, \mathrm{d} r}_{\frac{1}{2}} \cdot \underbrace{\int_{0}^{2\pi} \, \mathrm{d} \phi}_{2 \pi} = \pi $$

Alternatively one can use the second Euler's integral: $$ \frac{\Gamma\left(\frac{1}{2}\right) \Gamma\left(\frac{1}{2}\right) }{\Gamma(1)} = \int_0^1 t^{-1/2} (1-t)^{-1/2} \mathrm{d}t = \int_0^1 \mathrm{d} \left(2\arcsin\left(\sqrt{t}\right)\right) = \pi $$ Now, using $\Gamma(1) = 1$ the result follows.

Yet another method is to use the duplication identity: $$ \Gamma(2s) = \frac{2^{2s-1}}{\sqrt{\pi}} \Gamma(s) \Gamma\left(s+\frac{1}{2}\right) $$ at $ s= \frac{1}{2}$.

Sasha
  • 70,631
61

We only need Euler's formula:

$$\Gamma(1-z) \Gamma(z) = \frac{\pi}{\sin \pi z} \Longrightarrow \Gamma^2\left(\frac{1}{2}\right ) = \pi $$

DonAntonio
  • 211,718
  • 17
  • 136
  • 287
  • 1
    @DonAntonio , Have you any source which prove Euler's formula which you have used ? – FNH Aug 20 '13 at 03:06
  • 2
    @MathsLover, there must be thousands as that is a rather well known formula (Euler's Reflection Formula). Check the following: http://en.wikipedia.org/wiki/Gamma_function , http://mathworld.wolfram.com/GammaFunction.html (41) , http://en.wikipedia.org/wiki/Reflection_formula , http://planetmath.org/eulerreflectionformula , http://aw.twi.tudelft.nl/~koekoek/documents/wi4006/gammabeta.pdf (formula 18, page 7) , etc. – DonAntonio Aug 20 '13 at 10:46
  • 6
    Euler's formula is much more advanced than evaluating $\Gamma(1/2)$. – GEdgar Nov 22 '14 at 15:35
  • 2
    @Matt Stun Please be way more careful before you attempt to edit someone else's answer : no square root is necessary in the last expression ! – DonAntonio May 23 '17 at 19:21
  • @FawzyHegab: There is a local (MSE) proof of Euler's Reflection Formula in this answer. – robjohn May 23 '17 at 19:58
29

If there's any justice in the universe, someone must have asked here how to show that $$ \int_{-\infty}^\infty e^{-x^2/2}\,dx = \sqrt{2\pi}. $$ Let's suppose that has been answered here. Let (capital) $X$ be a random variable whose probability distribution is $$ \frac{e^{-x^2/2}}{\sqrt{2\pi}}\,dx. $$ Consider the problem of finding $\operatorname{E}(X^2)$. It is $$ \frac{1}{\sqrt{2\pi}}\int_{-\infty}^\infty x^2 e^{-x^2/2}\,dx = \text{(by symmetry)} \frac{2}{\sqrt{2\pi}} \int_0^\infty x^2 e^{-x^2/2}\,dx $$ $$ \sqrt{\frac2\pi}\int_0^\infty xe^{-x^2/2}\Big(x\,dx\Big) = \sqrt{\frac2\pi}\int_0^\infty \sqrt{u}\ e^{-u}\,du = \sqrt{\frac2\pi}\ \Gamma\left(\frac32\right) = \frac12\sqrt{\frac2\pi} \Gamma\left(\frac12\right). $$ So it is enough to show that this expected value is $1$. That is true if the sum of two independent copies of it has expected value $2$. So: $$ \Pr\left(X^2+Y^2<w\right) = \frac{1}{2\pi}\iint\limits_\mathrm{disk} e^{-(x^2+y^2)/2}\,dx\,dy $$ where the disk has radius $\sqrt{w}$. This equals $$ \frac{1}{2\pi}\int_0^{2\pi}\int_0^{\sqrt{w}} e^{-\rho^2/2} \,\rho\,d\rho\,d\theta = \int_0^{\sqrt{w}} e^{-\rho^2/2} \,\rho\,d\rho. $$ This last equality holds because we are integrating with respect to $\theta$ something not depending on $\theta$. Differentiating this with respect to $w$ gives the probability density function of the random variable $X^2+Y^2$: $$ e^{-w/2}\sqrt{w}\frac{1}{2\sqrt{w}} = \frac{e^{-w/2}}{2}\text{ for }w>0. $$ So $$ \operatorname{E}(X^2+Y^2) = \int_0^\infty w \frac{e^{-w/2}}{2}\,dw =2. $$

  • 14
    If $\int_{-\infty}^\infty e^{-u^2/2},du = \sqrt{2\pi}$ is given, then it seems much simpler to take $\Gamma(1/2) = \int_0^{\infty} x^{-1/2} \exp(-x) dx$, substitute $u^2=2x$, and we are done. – leonbloy Jun 17 '13 at 01:13
24

Method 1: $$\Gamma(1/2) = \int_0^{\infty} x^{-1/2} \exp(-x) dx$$ Set $x = t^2$, to get $$\Gamma(1/2) = \int_0^{\infty} 2\exp(-t^2) dt = \sqrt{\pi}$$

Method 2: $$\beta(x,y) = \dfrac{\Gamma(x) \Gamma(y)}{\Gamma(x+y)}$$ Take $y=x=1/2$, to get $$\beta(1/2,1/2) = \dfrac{\Gamma^2(1/2)}{\Gamma(1)} \implies \Gamma(1/2) = \sqrt{\beta(1/2,1/2)}$$

$$\beta(x,y) = 2 \int_0^{\pi/2} \sin^{2x-1}(\theta) \cos^{2y-1}(\theta) d \theta$$ Hence, $$\beta(1/2,1/2) = 2 \int_0^{\pi/2} d \theta = \pi$$ $$\Gamma(1/2) = \sqrt{\pi}$$

21

I'm surprised that no one has mentioned that this $\sqrt{\pi}$ is also "the same one" as the $\sqrt{\pi}$ in Stirling's formula.

It is a known fact that $\Gamma$ is uniquely characterized as the function that satisfies the equation $\Gamma(z+1) = z \Gamma(z)$ and whose logarithm "has nice asymptotics at $+\infty$". The conventional way to explain what "nice asymptotics" should mean in this context involves logarithmic convexity, but I prefer to leave it like this: any function that satisfies that functional equation must coincide with $\Gamma(z)$ up to a periodic factor, which, if nontrivial, would prevent it from having an asymptotic expansion at $+\infty$ in terms of powers and logs.

Now let's turn to Stirling's formula and assume that it holds both for integer and half-integer values of $\Gamma$. Clearly,

$$\Gamma(n+1/2) = \Gamma(1/2) \cdot \frac{1}{2} \cdot \frac{3}{2} \cdot \dots \cdot \frac{2n-1}{2} = \Gamma(1/2) \cdot \frac{(2n)!}{2^{2n} n!},$$

which is basically the duplication formula. Now if we plug it into the Stirling's formula, we will find out that $\Gamma(1/2) = \sqrt{\pi}$.

Alexander Shamov
  • 4,457
  • 17
  • 28
13

It also follows from the famous Riemann functional equation with $s=1/2$: $$ \zeta(s) = 2^s\pi^{s-1}\ \sin\left(\frac{\pi s}{2}\right)\ \Gamma(1-s)\ \zeta(1-s) $$ but Euler's reflection formula is probably more basic.

lhf
  • 216,483
12

This is a "proof". We know that the surface area of the $n-1$ dimensional unit sphere is $$ |S^{n-1}| = \frac{2\pi^{\frac{n}2}}{\Gamma(\frac{n}2)}. $$ On the other hand, we know that $|S^2|=4\pi$, which gives $$ 4\pi = \frac{2\pi^{\frac32}}{\Gamma(\frac32)} = \frac{2\pi^{\frac32}}{\frac12\Gamma(\frac12)}. $$

timur
  • 16,599
  • 3
    This formula also holds for $n = 1$ if you take counting measure as your $0$-dimensional measure. – JavaMan Dec 23 '12 at 18:09
7

There are a few details missing (showing the integral converges, justifying the differentiation under the integral sign, and so forth), but the main idea should be clear.

Consider the Fourier transform of $f(x)=e^{-x^2}$.

$$\hat f(\xi)= \int_{-\infty}^{\infty} e^{-x^2} e^{-2\pi i x\xi} \ dx =\int_{-\infty}^{\infty} e^{-x^2} (\cos(2\pi x \xi) - i \sin(2\pi x \xi)) dx =\int_{-\infty}^{\infty} e^{-x^2} \cos(2\pi x \xi) \ dx$$

Differentiate under the integral sign and integrate by parts.

$$\hat f'(\xi) =-2\pi \int e^{-x^2}\sin(2\pi \xi x) \ dx = -2\pi^2 \xi \int e^{-x^2} \cos(2\pi x \xi) \ dx = -2\pi^2\xi \hat f(\xi)$$

Separate variables.

$$\frac{\hat f'(\xi)}{\hat f(\xi) }= -2\pi^2 \xi \Rightarrow \hat f(\xi) =Ce^{-\pi^2 \xi^2}.$$

Use the inversion formula and change variables .

$$e^{-x^2} = C\int e^{-\pi^2 \xi^2} \cos(2\pi x \xi) \ d\xi = \frac{C}{\pi} \int e^{- \xi^2} \cos(2 x \xi) \ d\xi $$

$$e^{-\pi^2 x^2}\frac{C}{\pi} =\int e^{- \xi^2} \cos(2 x\pi \xi) \ d\xi =\frac{C^2}{\pi}e^{-\pi^2x^2}\Rightarrow C=\sqrt{\pi}$$

$$\hat f (0) = \sqrt{\pi} = \int e^{-x^2} \cos(0) \ dx = \int e^{-x^2} \ dx.$$

Potato
  • 40,171
6

$$B\left(\frac{1}{2},\frac{1}{2}\right)=\frac{\left[\Gamma\left(\frac{1}{2}\right)\right]^{2}}{\Gamma{(1)}}=\left[\Gamma\left(\frac{1}{2}\right)\right]^{2}$$ $$B\left(\frac{1}{2},\frac{1}{2}\right)=\frac{\pi}{\sin{\frac{\pi}{2}}}=\pi$$

Chris.

user 1591719
  • 44,216
  • 12
  • 105
  • 255
  • 3
    For those who find the second line not obvious, here is an elementary explanation: by definition, $B(\frac{3}{2},\frac{3}{2}) = \intop_0^1 x^{1/2} (1-x)^{1/2} dx$, and the graph of $x^{1/2} (1-x)^{1/2}$ is a semicircle, so this directly relates to $\pi$ being defined via the area of the circle. This allows to calculate $\Gamma(\frac{3}{2})$, which is just $\frac{1}{2} \Gamma(\frac{1}{2})$ – Alexander Shamov Jun 16 '13 at 22:27
6

The Gamma function is $$\Gamma(\alpha)=\int_0^\infty x^{\alpha-1} e^{-x}\,dx$$

Therefore

$$\Gamma\left( \frac{1}{2}\right) =\int_0^\infty \frac{1}{\sqrt{x}} e^{-x}\,dx$$

Thus, after the change of variable $t=\sqrt{x}$, this turns into the Euler integral $$t=\sqrt{x} \implies x = t^2$$ $$\frac{dt}{dx} = \frac{1}{2\sqrt{x}} = \frac{1}{2t} \iff dx = 2t\,dt$$

We have $$\int_0^\infty \frac{1}{t} e^{-t^2}\,2t\,dt = 2\int_0^\infty e^{-t^2}\,dt $$

And following holds: $$\Gamma\left( \frac{1}{2}\right) = 2\int_0^\infty e^{-t^2}\,dt = \int_{-\infty}^\infty e^{-t^2}\,dt$$

Which $\int_{-\infty}^\infty e^{-t^2}\,dt$ is the Gaussian integral. It follows:

$$\left[ \Gamma\left( \frac{1}{2}\right)\right]^2 = \bigg(\int_{-\infty}^{+\infty} e^{-x^2} dx\bigg)\bigg(\int_{-\infty}^{+\infty} e^{-y^2} dy\bigg)$$ $$\int_{-\infty}^{+\infty}\int_{-\infty}^{+\infty}e^{-(x^2+y^2)} \,dx\,dy$$

Now change to polar coordinates
$$\int_0^{+2 \pi}\int_0^{+\infty}e^{-r^2} r\,dr\,d\theta$$

The $\theta$ integral just gives $2\pi$, while the $r$ integral succumbs to the substitution $u=r^2$
$$\left[ \Gamma\left( \frac{1}{2}\right)\right]^2 = 2\pi\int_{0}^{+\infty}e^{-u} \,du/2=\pi$$ $$\Gamma\left( \frac{1}{2}\right)=\sqrt{\pi}$$

3

By the Bohr-Mollerup theorem,

$$\Gamma(1/2)=\lim_{n\to\infty}\frac{\sqrt n(n!)}{(1/2)(-1/2)\dots(1/2-n)}=\lim_{n\to\infty}\frac{\sqrt n4^{n+1}(n!)^2}{(2n)!(n+\frac12)}$$

Apply the Stirling approximation and watch almost everything simplify!

$$\Gamma(1/2)=\sqrt\pi\lim_{n\to\infty}\frac n{n+\frac12}=\sqrt\pi$$