How to prove $$\int_{0}^{\infty} \mathrm{e}^{-x^2}\, dx = \frac{\sqrt \pi}{2}$$

19 Answers 19

up vote 159 down vote accepted

This is an old favorite of mine.
Define $$I=\int_{-\infty}^{+\infty} e^{-x^2} dx$$ Then $$I^2=\bigg(\int_{-\infty}^{+\infty} e^{-x^2} dx\bigg)\bigg(\int_{-\infty}^{+\infty} e^{-y^2} dy\bigg)$$ $$I^2=\int_{-\infty}^{+\infty}\int_{-\infty}^{+\infty}e^{-(x^2+y^2)} dxdy$$ Now change to polar coordinates
$$I^2=\int_{0}^{+2 \pi}\int_{0}^{+\infty}e^{-r^2} rdrd\theta$$ The $\theta$ integral just gives $2\pi$, while the $r$ integral succumbs to the substitution $u=r^2$ $$I^2=2\pi\int_{0}^{+\infty}e^{-u}du/2=\pi$$ So $$I=\sqrt{\pi}$$ and your integral is half this by symmetry

I have always wondered if somebody found it this way, or did it first using complex variables and noticed this would work.

  • I'm not sure how the history goes precisely but I imagine people first noticed that certain trig substitutions were equivalent to relating their integrals to multi-variable integrals and the story built from there. – Ryan Budney Nov 7 '10 at 16:51
  • +1: I knew the proof using the two variable functions you provide in your $I^2$ line, but I really love how you got to it! (It always seemed like "out of the blue" for me while I was taking the class) – Andy Nov 7 '10 at 17:24
  • @Ross Millikan: I found it that way as well. The area of interest would span the entire first quadrant of the $\mathbb{R}^{2}$ coordinate system. I was justing getting reading to answer but I seen it was going to be the same, just a bit more detailed steps inbetween to show the conversion from cartesian to polar coordinates, but yes pretty much the same method of attack I would have took. +1 – night owl Mar 20 '11 at 23:52
  • 5
    @RyanBudney: this integral was not first computed using complex variables or multivariable integrals. The first proof, due to Laplace, is discussed at the end of – KCd Apr 4 '12 at 4:00
  • 7
    I've twisted the idea of this proof into a proof that $$\int_0^\infty\sin(x^2)\,\mathrm{d}x=\int_0^\infty\cos(x^2)\,\mathrm{d}x=\sqrt{\frac\pi8}$$ – robjohn Sep 14 '12 at 0:50

A variation on Ross Millikan's answer.

We can start again with the observation $$\left(\int_{-\infty}^{\infty}e^{-x^2}dx\right)\left(\int_{-\infty}^{\infty}e^{-y^2}dy\right)=\left(\int_{-\infty}^{\infty}\int_{-\infty}^{\infty}e^{-(x^2+y^2)}dxdy\right)=V.$$ Now $V$ is simply the volume of the body $$-\infty < x,y < \infty,\qquad 0 < z < e^{-(x^2+y^2)},$$ or, equivalently, $$0 < x^2+y^2 < -\ln z,\qquad 0 < z < 1.$$ This implies that the body is a solid of revolution. Using the disk integration formula, we have $$V=\int_{0}^{1}\pi(-\ln z)dz=[\pi(z-z\ln z)]_{0}^1=\pi.$$

  • @Mike Spivey: I vaguely remember seeing this in a note in the Math. Intelligencer though I'm not able to reconstruct the exact reference. – Andrey Rekalo Nov 7 '10 at 21:17
  • Andrey, was this the article you had in mind? – J. M. is not a mathematician Nov 21 '10 at 0:36
  • @ J. M.: That's it! Thanks. – Andrey Rekalo Nov 21 '10 at 7:53
  • 1
    This method is also the one given by Keith Ball in §5.6 of his 2003 book Strange Curves, Counting Rabbits, and other Mathematical Explorations. (I mention this only because it predates the Intelligencer article by a few years; but of course I have no reason to suspect this is the earliest occurrence.) – user21467 Mar 21 '12 at 2:39
  • 3
    An earlier occurrence of this proof was in 1994. See T. P. Jameson, "The Probability Integral by Volume of Revolution", Math. Gazette 78 (1994), 339-340. – KCd Apr 15 '12 at 19:11

I know this:

Define $f$ and $g$ as:

$$f(x):=\left(\int_0^x e^{-t^2}dt\right)^{2} \quad\text{and}\quad g(x):=\left(\int_{0}^{1}\frac{e^{-x^{2}(t^{2}+1)}}{t^{2}+1}dt\right)$$

Now, $$f'(x)=2e^{-x^{2}}\int_{0}^{x}e^{-t^{2}}dt$$ and

$$g'(x)=\int_0^1 \frac{\partial}{\partial x}\left[\frac{e^{-x^2(t^2+1)}}{t^2+1}\right]dt = -2xe^{-x^{2}}\int_{0}^{1}e^{-x^{2}t^{2}}dt$$

So putting $t=tx$, get $\displaystyle\int_{0}^{1}e^{-x^{2}t^{2}}dt= \frac{1}{x}\displaystyle\int_{0}^{x}e^{-t^{2}}dt$

Then we get:


Thus $f'(x)+g'(x)=0$ for all $x$, then $f(x)+g(x)$ is an constant function. Also $$f(0)+g(0)=\displaystyle\int_{0}^{1}\frac{1}{t^{2}+1}dt = \displaystyle\frac{\pi}{4}$$

Then $f(x)+g(x)=\displaystyle\frac{\pi}{4}$ for all $x$.

Now $\lim_{x \to{+}\infty}{g(x)}=0$

So $$\displaystyle\frac{\pi}{4} = \lim_{x \to{+}\infty}{f(x)+g(x)}=\lim_{x \to{+}\infty}{f(x)}= \left(\int_{0}^{\infty}e^{-t^{2}}dt\right)^{2}$$


$$\int_{0}^{\infty}e^{-t^{2}}dt=\sqrt{\frac{\pi}{4}}= \frac{\sqrt{\pi}}{2}$$

The end.

  • Yocks. This method exploits the asymptotic behavior of exponential functions in a surprising way! – MathOverview Apr 19 '14 at 11:59

It might be worth mentioning that one also can use spherical coordinates in 3-dimensions analogously to the polar coordinates Ross Millikan used above: If $I$ denotes $\int_{-\infty}^{\infty} e^{-x^2}dx$, then we have $$I^3 = \int_{-\infty}^{\infty} \int_{-\infty}^{\infty} \int_{-\infty}^{\infty}e^{-x^2 - y^2 - z^2}\,dx\,dy\,dz$$ Switching to spherical coordinates this becomes $$\int_0^{2\pi}\int_0^{\pi}\int_0^{\infty}\sin(\phi) \rho^2 e^{-\rho^2}\,d\rho\,d\phi\,d\theta$$ Doing the theta and $\phi$ integrations this becomes $$I^3 = 4\pi\int_0^{\infty}\rho^2 e^{-\rho^2}\,d\rho$$ One can then integrate parts in this, differentiating $\rho$ and integrating $\rho e^{-\rho^2}$. This leads us to $$I^3 = 2\pi \int_0^{\infty} e^{-\rho^2}\,d\rho$$ Note the right-hand side is exactly $2\pi * {I \over 2} = \pi I$. Thus $I^3 = \pi I$ and thus $I = \sqrt{\pi}$ as needed. Obviously polar coordinates are faster. Just sayin'...

An alternative derivation is to show that

$$\int_{0}^{\infty}xe^{-x^{2}y^{2}}\; \mathrm{d}y=I,$$

where $I$ is your integral:

$$I:=\int_{0}^{\infty}e^{-x^2}\; \mathrm{d}x,$$

and then evaluate $I^2$ by reversing the order of integration. If $x>0$, then

$$\int_{0}^{\infty}xe^{-x^{2}y^{2}}\; \mathrm{d}y=x\int_{0}^{\infty}e^{-{(xy)}^2}\; \mathrm{d}y=x\int_{0}^{\infty}e^{-u^2}\dfrac{\mathrm{d}u}{x}=\int_{0}^{\infty}e^{-u^2}\; \mathrm{d}u=I.$$


$$\begin{aligned}I^2&=\int_{0}^{\infty}e^{-x^2}\; \mathrm{d}x\int_{0}^{\infty}xe^{-x^{2}y^{2}}\; \mathrm{d}y=\displaystyle\int_{0}^{\infty}\mathrm{d}y\int_{0}^{\infty}xe^{-x^2}e^{-x^{2}y^{2}}\; \mathrm{d}x\\ &=\int_{0}^{\infty}\mathrm{d}y\int_{0}^{\infty}xe^{-x^{2}(1+y^2)}\; \mathrm{d}x=\int_{0}^{\infty}\mathrm{d}y\dfrac{1}{2\left( 1+y^{2}\right) }\left[ -e^{-x^{2}\left( 1+y^{2}\right) }\right] _{x=0}^{\infty }\\ &=\int_{0}^{\infty }\dfrac{1}{2\left( 1+y^{2}\right) }\; \mathrm{d}y=\dfrac{1}{2}\left[ \arctan y\right] _{y=0}^{\infty }=\dfrac{\pi}{4}.\end{aligned}$$



  • 3
    This proof goes back to Laplace (Théorie Analytique des Probabilités, 1812, pp. 94-96). – KCd Apr 15 '12 at 19:20
  • @KCd: Thanks for the information. I saw it as an exercise in Advanced Calculus by Angus Taylor. – Américo Tavares Apr 15 '12 at 21:10

Another proof, from G.M. Fichtengoltz, Calculus Course, page 612.

$$K=\int_{0}^{\infty} e^{-x^2} dx $$

It easy to see (and prove) that, $\max\{(1+t)e^{-t}\}=1$ at $t=0$, hence for all $t\in\mathbb{R}$:


Substitution of $t=\pm x^2$, leads us to:

$$(1-x^2)e^{x^2}<1 \ \ \ \ \text{and} \ \ \ \ \ (1+x^2)e^{-x^2}<1 $$


$${1-x^2} <e^{-x^2}<\frac{1}{1+x^2} \ \ \ \ \ \ (x>0) $$

Now, at the left inequality we restrict our $x$ to be in $(0,1)$ (so that, $1-x^2>0$), and in the right inequality let $x>0$. Raising all the inequalities with natural number $n$, we get,

$$\underset{x\in (0,1)}{(1-x^2)^n<e^{-nx^2}} \ \ \ \ \text{and} \ \ \ \ \ \underset{x>0}{e^{-nx^2}<\frac{1}{(1+x^2)^n}}$$

Integrating the first inequality from $0$ to $1$, and the second inequality from $0$ to $+\infty$ we'll get:

$$\int_0^1({1-x^2})^ndx <\int_0^1 e^{-nx^2} dx<\int_0^{\infty} e^{-nx^2} dx<\int_0^{\infty}\frac{dx}{(1+x^2)^n}$$


$$\int_0^{\infty} e^{-nx^2}dx=\frac{1}{\sqrt{n}}K \ \ \ \ \ \ (\text{substitution} \ \ u=\sqrt{nx}),$$

$$\int_0^1({1-x^2})^ndx=\int_0^{\frac{\pi}{2}}\sin^{2n+1}(v)dv=\frac{(2n)!!}{(2n+1)!!} \ \ \ (\text{substitution} \ \ x=\cos(v))$$

and, finally,

$$\int_0^{\infty}\frac{dx}{(1+x^2)^n}=\int_0^{\frac{\pi}{2}}\sin^{2n-2}(v)dv=\frac{(2n-3)!!}{(2n-2)!!}\frac{\pi}{2} \ \ \ (\text{substitution} \ \ x=\text{ctg}(v))$$

Hence, our unknown, $K$ is bound:




Now, the final step - Wallis Formula :


Then, when $n$ tends to $\infty$ in our last inequality, we get:



$$K=\frac{\sqrt{\pi}}{2} \ \ \ \ \ \text{as}\ K>0 $$

  • 1
    I learned this proof a while ago and I really like it (I actually answered with a link to it). – Pedro Tamaroff Apr 4 '12 at 0:54

By using Beta and Gamma functions properties we may simply obtain that: $$\operatorname B\left(\tfrac 12,\tfrac12\right)=\frac{\left[\Gamma(\tfrac{1}{2})\right]^{2}}{\Gamma{(1)}}=\left[\Gamma(\tfrac{1}{2})\right]^{2}$$ $$\operatorname B\left(\tfrac{1}{2},\tfrac{1}{2}\right)=\frac{\pi}{\sin{\frac{\pi}{2}}}=\pi$$ In other words we have that: $$\Gamma(\tfrac{1}{2})=\sqrt{\pi}\longrightarrow \space\int\limits_0^\infty x^{\frac{-1}{2}} e^{-x} \,\mathrm dx = \sqrt{\pi}$$

By substitution $x=t^2$ we get the final result:

$$2\int\limits_0^\infty e^{-t^2} \,\mathrm dt=\sqrt{\pi} \longrightarrow \int\limits_0^\infty e^{-t^2} \,\mathrm dt = \frac{\sqrt{\pi}}{2}.$$

Q.E.D. (Chris)

First, we notice that $$n!\ =\ \int_0^\infty e^{-\sqrt[n]x}\ dx\quad\iff\quad\tfrac1n!\ =\ \int_0^\infty e^{-x^n}dx\quad\rightarrow\quad\tfrac12!\ =\ \int_0^\infty e^{-x^2}dx$$ Then we further notice that $$\int_0^1\Big(1-\sqrt[n]x\Big)^m\,dx\ =\ \int_0^1\Big(1-\sqrt[m]x\Big)^n\,dx\ =\ \frac1{C_{m+n}^n}\ =\ \frac1{C_{m+n}^m}\ =\ \frac{m!\,n!}{(m+n)!}$$ From where we deduce that $$\frac\pi4\ =\ \int_0^1\sqrt{1-x^2}\,dx\ =\ \frac{\Big(\frac12!\Big)^2}{\Big(\frac12 + \frac12\Big)!}\ =\ \Big(\tfrac12!\Big)^2$$ Which leads us to conclude that $$\int_0^\infty e^{-x^2}dx\ =\ \tfrac12!\ =\ \sqrt{\pi\over4}\ =\ \frac{\sqrt\pi}2$$ QED

  • @Lucian I didn't know this one. – Olivier Oloa Aug 8 '14 at 3:20

The following argument, similar to Bryan Yock's, is a Feynman parameter trick I invented in Integrating $\int^{\infty}_0 e^{-x^2}\,dx$ using Feynman's parametrization trick

Let $$I(b) = \int_0^\infty \frac {e^{-x^2}}{1+(x/b)^2} \mathrm d x = \int_0^\infty \frac{e^{-b^2y^2}}{1+y^2} b\,\mathrm dy$$ so that $I(0)=0$, $I'(0)= \pi/2$ and $I(\infty)$ is the thing we want to evaluate.

Now note that rather than differentiating directly, it's convenient to multiply by some stuff first to save ourselves some trouble. Specifically, note

$$\left(\frac 1 b e^{-b^2}I\right)' = -2b \int_0^\infty e^{-b^2(1+y^2)} \mathrm d y = -2 e^{-b^2} I(\infty)$$

Then usually at this point we would solve the differential equation for all $b$, and use the known information at the origin to infer the information at infinity. Not so easy here because the indefinite integral of $e^{-x^2}$ isn't known. But we don't actually need the solution in between; we only need to relate information at the origin and infinity. Therefore, we can connect these points by simply integrating the equation definitely; applying $\int_0^\infty \mathrm d b$ we obtain

$$-I'(0)= -2 I(\infty)^2 \quad \implies \quad I(\infty) = \frac{\sqrt \pi} 2$$

Another way is to make use of the Poisson summation formula. I will work with the Fourier transform $$\hat{f}(\xi) = \int_{-\infty}^{\infty} f(x) \exp(-2 \pi i \xi x) dx$$ The Poisson summation formula states that $$\sum_{\xi \in \mathbb{Z}} \hat{f}(\xi) = \sum_{n \in \mathbb{Z}} f(n).$$ Now take $f(x) = \exp(-\pi x^2)$. We then get that \begin{align} \hat{f}(\xi) & = \int_{-\infty}^{\infty} \exp(- \pi x^2) \exp(-2 \pi i \xi x) dx\\ & = \int_{-\infty}^{\infty} \exp(-\pi(x+i \xi)^2 - \pi \xi^2) dx\\ & = \exp( - \pi \xi^2)\int_{-\infty}^{\infty} \exp(-\pi(x+i \xi)^2) dx\\ & = \exp( - \pi \xi^2)\int_{-\infty + ic}^{\infty+ic} \exp(-\pi x^2) dx \end{align} By integrating from $-\infty+ic$ to $\infty + ic$, I mean integrate along the line Im$(x) = c$ from left to right. Now since the integrand is analytic, we can move this contour to $X$ axis and conclude that $$\int_{-\infty + ic}^{\infty+ic} \exp(-\pi x^2) dx = \int_{-\infty}^{\infty} \exp(-\pi x^2) dx$$ Hence, we get that $$\hat{f}(\xi) = C \exp( - \pi \xi^2)$$where $C = \displaystyle \int_{-\infty}^{\infty} \exp(-\pi x^2) dx$. Now make use of the Poisson summation formula to get that $$C \left(\sum_{\xi \in \mathbb{Z}} \exp(-\pi \xi^2) \right) = \left(\sum_{x \in \mathbb{Z}} \exp(-\pi x^2) \right)$$ We can afford to cancel $\displaystyle \left(\sum_{x \in \mathbb{Z}} \exp(-\pi x^2) \right)$ since it converges and hence we can conclude that $$C = \displaystyle \int_{-\infty}^{\infty} \exp(-\pi x^2) dx = 1$$ Suitable scaling gives you the integral and answer you are looking for.

Change variables. Let $z=x^2$. We find $\int_{0}^{\infty} e^{-x^2} dx = \frac{1}{2} \Gamma(\frac{1}{2}) = \frac{\sqrt{\pi}}{2}$.

Addendum: Setting $z=1/2$ in Euler's reflection formula, $\Gamma(1-z)\Gamma(z) = \pi/\sin \pi z$, we find $\Gamma(1/2) = \sqrt{\pi}$.

  • 3
    This is circular if you don't use the double argument formula of $\Gamma$ or something of the sort. – Pedro Tamaroff Apr 4 '12 at 0:53
  • Of course, this is a sledgehammer and fly proof. It is still one of my favorites! I simply think of the gamma function as more fundamental than the integral. – user26872 Apr 4 '12 at 1:46
  • This "trick" also works for many integrals, not just one! – user26872 Apr 6 '12 at 0:30
  • 2
    can you explain how this argument is circular @Peter Tamaroff – Elements in Space Jan 6 '13 at 15:41
  • 1
    $$\begin{align*} \frac{\sqrt\pi}2\operatorname{erf}(\infty)&=\int\limits_0^\infty e^{-x^2}\mathrm dx&\\ \text{let }x^2=t\\ x= t^{1/2}\\ \mathrm dx=\frac{t^{-1/2}}2\mathrm dt\\ &=\int\limits_0^\infty e^{-t}\frac{t^{-1/2}}{2}\mathrm dt\\ &=\frac12\int\limits_0^\infty t^{(1/2)-1}e^{-t}\mathrm dt\\ &=\frac12\operatorname \Gamma(1/2)\\ &=\frac{\sqrt\pi}2 \end{align*}$$ – Elements in Space Jan 13 '13 at 3:44

Here you have a solution using Wallis' formula for $\pi$ and the squeeze theorem which I learned. It's from a post I made in a forum.

Consider the mapping $\eta\! : \mathbb{R}^2\to \mathbb{R}$ given by $$ \eta((x,y)) = \sqrt{x^2+y^2},\quad (x,y)\in\mathbb{R}^2. $$ (1) Show that the image-measure $\lambda_2\circ\eta^{-1}$ is the measure on $(\mathbb{R},\mathcal{B}(\mathbb{R}))$ with density $$ f(z)=2\pi z 1_{(0,\infty)}(z),\quad z\in\mathbb{R}, $$ by using Dynkin's Lemma.

(2) Show that $$ \int_{\mathbb{R}^2} e^{-x^2-y^2}\,\lambda_2(\mathrm{d}x,\mathrm{d}y)=\pi $$ by using the formula for integration under measurable transformations.

(3) Use Tonelli's theorem to conclude that $$ \int_{\mathbb{R}}e^{-x^2}\,\lambda(\mathrm{d}x)=\sqrt{\pi}, $$ and now your result follows.

Consider the integral: $$ \int_0^\infty t^{-1/2}{e^{-t}} dt $$ We perform a change of variables $u=t^{1/2}$ and $du= \frac{1}{2}t^{-1/2} dt$. The integral then becomes: $$ \int_0^\infty t^{-1/2}{e^{-t}} dt=\int_0^\infty 2{e^{-u^2}} du. $$ Now let us consider the well-known integral: $$ \frac{\pi}{2}=\int_0^\infty \frac{1}{1+x^2} dx $$ We can expand the right hand side into a double integral: $$ \int_0^\infty \frac{1}{1+x^2} dx= \int_0^\infty \int_0^\infty e^{-y(1+x^2)}dy dx=\int_0^\infty \int_0^\infty e^{-y-yx^2}dy dx $$ Reversing the order of integration: $$ \int_0^\infty \int_0^\infty e^{-y-yx^2}dy dx=\int_0^\infty \int_0^\infty e^{-y-yx^2}dx dy $$ Now, we can perform a change of variables $x^2=\frac{u^2}{y}$ and $2xdx=\frac{2u}{y}du$ or $dx=y^{-1/2}du$ $$ \int_0^\infty \int_0^\infty e^{-y-yx^2}dx dy=\int_0^\infty \int_0^\infty y^{-1/2} e^{-y-u^2}du dy= \int_0^\infty y^{-1/2} e^{-y} dy\int_0^\infty e^{-u^2}du $$ Because of what was established earlier: $$\int_0^\infty y^{-1/2}{e^{-y}} dy=\int_0^\infty 2{e^{-u^2}} du $$

$$ \frac{\pi}{2}=\int_0^\infty \frac{1}{1+x^2} dx= 2 \left(\int_0^\infty {e^{-u^2}} du\right)^2 $$ Thus, $$ \frac{\pi}{4}=\left(\int_0^\infty {e^{-u^2}} du\right)^2 $$ The desired result follows upon taking the square root of both sides.


  • The integral considered at the start of the solution is $\Gamma \left(\frac{1}{2} \right).$
  • We essentially evaluated $$\int_{0}^{\infty} \frac{1}{1+x^2} \ dx$$ in two different ways; we know the closed form recognizing it is an arctangent integral, but the crux of the proof is to show it is the same as $\frac{\Gamma(\frac{1}{2})^2}{2}.$ This same arctangent integral appears in proofs 2,3, and 4 of
  • Tonelli's Theorem enables us to reverse the order of integration in the expanded double integral. See

Using Normal density:

$$ \int_0^\infty e^{-x^2}dx=\sqrt \pi \int_0^\infty \frac{1}{\sqrt \pi}e^{-x^2}dx=\sqrt \pi P(X\geq0), $$

where $X\sim \mathrm{Normal}(0,\frac{1}{2})$. Remember that the normal distribution is symmetric around its mean, so $P(X>0)=P(X>E(X))=\frac{1}{2}$, and the result follows.

  • 25
    This one feels a bit circular to me. It relies on the fact that $\frac{1}{\sqrt{\pi}} e^{-x^2}$ is actually a valid probability density function. That in turn requires showing that $\int_{-\infty}^\infty \frac{1}{\sqrt{\pi}} e^{-x^2}dx = 1$, which is the same as the OP's question. – Mike Spivey Nov 20 '12 at 20:20

This is similar to user17762's answer, but uses Plancherel's Theorem instead of Poisson summation. Define the Fourier transform by

$$\mathcal{F}[f](y) = \hat{f}(y) = \frac{1}{\sqrt{2\pi}}\int_{-\infty}^\infty f(x) e^{-i xy}\;dx$$


$$\mathcal{F}[e^{-\frac{1}{2}x^2}]= \frac{1}{\sqrt{2\pi}}\int_{-\infty}^\infty e^{\frac{1}{2}x^2} e^{-i xy}\;dx = \frac{e^{-\frac{1}{2}y^2}}{\sqrt{2\pi}}\int_{-\infty}^\infty e^{\frac{1}{2}(x+iy)^2}\;dx$$

Now, consider the contour integral of $e^{-\frac{1}{2}z^2}$ over the rectangular contour with corners at $\pm R$ and $\pm R + iy$. This integral must be $0$, since $e^{-\frac{1}{2}z^2}$ is analytic. Taking the limits as $R \to +\infty$, the contributions from the vertical edges go to $0$, so we find that $$\int_{-\infty}^\infty e^{-\frac{1}{2}x^2}\;dx = \int_{-\infty}^\infty e^{-\frac{1}{2}(x+iy)^2}\;dx$$

Thus, $$\mathcal{F}[e^{-\frac{1}{2}x^2}](y) = \frac{e^{-\frac{1}{2}y^2}}{\sqrt{2\pi}}\int_{-\infty}^\infty e^{-\frac{1}{2}x^2}\;dx$$

By Plancherel's Theorem, $$\int_{-\infty}^\infty e^{x^2}\;dx = \int_{-\infty}^\infty e^{-y^2} \frac{1}{2\pi}\left(\int_{-\infty}^\infty e^{-\frac{1}{2}x^2}\;dx\right)^2\;dy = \frac{1}{2\pi}\left(\int_{-\infty}^\infty e^{-\frac{1}{2}x^2}\;dx\right)^2\int_{-\infty}^\infty e^{-y^2}\;dy$$ dividing through by $\int_{-\infty}^\infty e^{-x^2}\;dx$, we find $$1 = \frac{1}{2\pi}\left(\int_{-\infty}^\infty e^{-\frac{1}{2}x^2}\;dx\right)^2$$ so, $$\sqrt{2\pi} = \int_{-\infty}^\infty e^{-\frac{1}{2}x^2}\;dx$$ Changing variables and observing that $\int_0^\infty e^{-x^2}\;dx = \frac{1}{2}\int_{-\infty}^\infty e^{-x^2}\;dx$, we find that $$\int_0^\infty e^{-x^2}\;dx = \frac{\sqrt{\pi}}{2}$$

I will add an additional Solution to this problem because it is using a powerful integral that Euler derived in one of his famous books about complex analysis (Euler's derivation).

$$\frac{\Gamma(s)}{n(a^2+b^2)^{s/2}}\cos(\alpha s)=\int_0^{\infty}u^{ns-1}e^{-au^n}\cos(bu^n) du$$, where $\tan(\alpha)=b/a$.

Plug in $a=1$, $b=0$ ($\alpha =0$),$n=2$ and $s=1/2$ to get:


Evaluate Eulers reflection formula $\Gamma(s)\Gamma(1-s)=\frac{\pi}{\sin(\pi s)}$ for $s=1/2$ to get $\Gamma(1/2)=\sqrt{\pi}$.

With that we conclude: $$\int_0^{\infty}e^{-u^2}du=\frac{\sqrt{\pi}}{2}$$

  1. Note that there is a similar formula, containing $\sin$ instead of $\cos$. Both formulas can be used for many special integrals like the Fresnel Integral or the Sinc Integral and much more.

  2. Note that one could directly derive this result from $\Gamma(1/2)$ by substitution, but the formula is far more powerful.

Long time ago in a galaxy far far away ... Ouch, not so far, it was at some shopping centre in Prague, I stumbled upon a question wheather is the integral above derivable in sense of elementary (in some sense) functions to obtain. I claim no originality, but this is what I get :

Let us denote our integral $I$, via substitution $x=\sqrt{-\ln y}$ we have :

$$I=\int_{-\infty}^{\infty}e^{-x^2}\mathrm{d}x=2\int_{0}^{\infty}e^{-x^2}\mathrm{d}x=\int_{0}^{1}\frac{1}{\sqrt{-\ln y}}\,\mathrm{d}y$$

Step back for a second and dream about another meaning of definite integration - namely area under the curve, the area under curve can be approximated by rectangles, if we divide it so that maximum widht goes to zero the sum in the limit goes to original integral - let us choose clever division, namely geometrical sequence $\{y=q^n\}$ with maximal widht equal to the width of ist first rectangle (ergo $1-q$) :

Riemannian summation over geometrical sequence domain division

Clearly from the picture above (note : could be generalised) :

$$S_n = \left(q^{n-1}-q^n\right)f(q^n) = q^{n-1}\frac{1-q}{\sqrt{-n\ln q}}$$

Then by riemannian summation on geometrical sequence domain division :

$$\int_{0}^{1}\frac{1}{\sqrt{-\ln y}}\,\mathrm{d}y=\lim_{\; q\to 1^-}\sum_{n=1}^{\infty}S_n=\lim_{\; q\to 1^-}\frac{1-q}{\sqrt{-\ln q}}\sum_{n=1}^{\infty}\frac{q^n}{\sqrt{n}}$$

Hence (with some estetics by limit of a product) :

$$ I = \lim_{\; q\to 1^-}\sqrt{1-q}\,\sum_{n=1}^{\infty}\frac{q^n}{\sqrt{n}}$$

So, if we are able to manage deriving exact value of this limiting summation, we are done, however, there does not exist an exact sum in terms of elementary functions, the sloppiness of the sequence $1/\sqrt{n}$ is slowing our progress. But, if we find a sequence not so different maybe it will clear out itself! The key is : keep it as simple as possible :

I shall start, with this observation at - the method describes an assymptotical finding of the values of definite integrals and is very common and useful in some application, I will use similar technique to find such sequence decribed earlier, in all discussion however, I will pretend, if $I$ pops up somewhere, that we don't know it yet, let's see ...

$$\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}}\cos^n\!\theta\, \mathrm{d}\theta =\frac{1}{\sqrt n}\int_{-\frac{\pi}{2}\sqrt n}^{\frac{\pi}{2}\sqrt n}\cos^n\!\frac{\theta}{\sqrt n} \, \mathrm{d}\theta =\frac{1}{\sqrt n} \int_{-\frac{\pi}{2}\sqrt n}^{\frac{\pi}{2}\sqrt n}\left(1-\frac{\theta^2}{2n}+O\left(\frac{1}{n^2} \right)\right)^n \, \mathrm{d}\theta \\ =\frac{1}{\sqrt n}\left( \int_{-\infty}^{\infty}e^{-\frac{\theta^2}{2}} \, \mathrm{d}\theta + O\left(\frac{1}{n}\right)\right) = I\sqrt{\frac{2}{n}} + O\left(\frac{1}{n^{3/2}}\right)$$

We are now fully prepared to attack the integral from the side, pluggin in the result above, ie. interchange the $1/\sqrt n$ term by integral fo $n$ large :

$$I^2 = \frac{1}{\sqrt 2} \lim_{\; q\to 1^-}\sqrt{1-q}\,\sum_{n=1}^{\infty}\left( O\left(\frac{q^n}{n^{3/2}}\right) + \int_{-\frac{\pi}{2}}^{\frac{\pi}{2}}q^n\cos^n\!\theta\, \mathrm{d}\theta\right) $$

The first term in the sum converges for $q\to 1$, so the multiplication with $\sqrt{1-q}$ kills this terms out (!!!), we don't have at all worry about its values any more, hence, the limit is simply (after summing infinite convergent $\left(|q \cos\theta| <1\right)$ geometric series) :

$$I^2 = \frac{1}{\sqrt 2} \lim_{\; q\to 1^-}\sqrt{1-q}\,\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} \frac{q \cos\theta}{1-q\cos\theta}\, \mathrm{d}\theta \qquad (*)$$

One can easily compute it him/herself, of course, but for sake of completeness I will do it here : At first simplify the fraction (where at the last step $\theta \to \theta - \pi/2$ substitution has been made) :

$$\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} \frac{q\cos\theta}{1-q\cos\theta}\, \mathrm{d}\theta = \int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} \frac{1-1+q\cos\theta}{1-q\cos\theta}\, \mathrm{d}\theta = -\pi\! +\!\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} \frac{\mathrm{d}\theta}{1-q\cos\theta} = -\pi\! +\!\int_{0}^{\pi}\! \frac{\mathrm{d}\theta}{1-q\sin\theta} $$

Via the same argument as in the vanishment of $O(1/n^{3/2})$ we disregard also $-\pi$ (Important note : this is equivalent to say we are summing the terms from $n=0$, since we can add finite number of terms, results stays the same). Using standard $t = \tan(\theta/2)$ substitution we can exactly compute the integral we have been left with :

$$\int_{0}^{\pi} \frac{\mathrm{d}\theta}{1-q\sin\theta} = \int_{0}^{\infty} \frac{\frac{2\mathrm{d}t}{1+t^2}}{1-q\frac{2t}{1+t^2}} = 2\int_{0}^{\infty} \frac{\mathrm{d}t}{t^2-2qt+1} = 2\int_{0}^{\infty} \frac{\mathrm{d}t}{(t-q)^2+1-q^2} =\\ \frac{2}{\sqrt{1-q^2}}\arctan\frac{t-q}{\sqrt{1-q^2}}\bigg{|}_0^\infty = \frac{2}{\sqrt{1-q^2}}\left(\frac{\pi}{2}+\arctan\frac{q}{\sqrt{1-q^2}}\right) $$

Throwing the result back into $(*)$ we get the great return :

$$I^2 = \frac{1}{\sqrt 2} \lim_{\; q\to 1^-}\frac{2\sqrt{1-q}}{\sqrt{1-q^2}}\left(\frac{\pi}{2}+\arctan\frac{q}{\sqrt{1-q^2}}\right) = \pi $$


$$\int_{-\infty}^{\infty}e^{-x^2}\mathrm{d}x = \sqrt{\pi}$$

Addendum : About two months after this text had been written I have come up with another choice to be made to assymptotically converge towards $1/\sqrt{n}$ sequence, namely

$$\int_{-1}^{1}\left(1\!-\!x^2\right)^n\!\mathrm{d}x \!=\!\frac{1}{\sqrt n}\int_{-\sqrt n}^{\sqrt n}\left(1-\frac{x^2}{n}\right)^n\!\mathrm{d}x\!=\!\frac{1}{\sqrt n}\left( \int_{-\infty}^{\infty}e^{-x^2}\mathrm{d}x\!+\!O\left(\!\frac{1}{n}\!\right)\right)\!=\!\frac{I}{\sqrt{n}}\!+\!O\left(\!\frac{1}{n^{3/2}}\!\right)$$

So then (where the summation in the last term was changed as counting from $n=0$)

$$I^2\!=\!\lim_{\; q\to 1^-}\!\sqrt{1-q}\,\sum_{n=1}^{\infty}\left( O\left(\!\frac{q^n}{n^{3/2}}\!\right)\!+\!\int_{-1}^{1}q^n\left(1\!-\!x^2\right)^n\, \mathrm{d}x\right)\!=\!\lim_{\; q\to 1^-}\sqrt{1-q}\int_{-1}^{1} \frac{\mathrm{d}x}{1\!-\!q(1\!-\!x^2)}$$

And this is just a piece of cake ! So :

$$I^2=\lim_{\; q\to 1^-} \frac{2\sqrt{1-q}}{\sqrt{q}\sqrt{1-q}}\arctan{\sqrt{\frac{q}{1-q}}}=\pi$$

Moreover, there is even another $$\int_{-\infty}^{\infty}\frac{\mathrm{d}x}{\left(1\!+\!x^2\right)^n} \!=\!\frac{1}{\sqrt{n}}\int_{-\infty}^{\infty}\frac{\mathrm{d}x}{\left(1\!+\!\frac{x^2}{n}\right)^n} \!=\!\frac{1}{\sqrt n}\left( \int_{-\infty}^{\infty}e^{-x^2}\mathrm{d}x\!+\!O\left(\!\frac{1}{n}\!\right)\right)\!=\!\frac{I}{\sqrt{n}}\!+\!O\left(\!\frac{1}{n^{3/2}}\!\right)$$

Hence $$I^2\!=\!\lim_{\; q\to 1^-}\!\sqrt{1-q}\,\sum_{n=1}^{\infty}\left( O\left(\!\frac{q^n}{n^{3/2}}\!\right)\!+\!\int_{-\infty}^{\infty}\frac{q^n}{\left(1\!+\!x^2\right)^n}\, \mathrm{d}x\right)\!=\!\lim_{\; q\to 1^-}\sqrt{1-q}\int_{-\infty}^{\infty} \frac{q\,\mathrm{d}x}{1\!-\!q\!+\!x^2}$$

This integral arisen is the simplest of all of them, since

$$\int_{-\infty}^{\infty} \frac{\mathrm{d}x}{1\!-\!q\!+\!x^2}=\frac{\pi}{\sqrt{1-q}}$$

The result is now obvious...

Little bonus : from the steps throughout the text we can also conclude that $$\sum_{n=1}^{\infty}\frac{x^n}{\sqrt n}\sim\sqrt{\frac{\pi}{1-x}}\qquad \mathrm{as}\qquad x\rightarrow 1$$ an assymptote for the series.

Note : I'm really curious about knowing whether one can resolve also the Basel problem this way (i.e. summing $\sum_{n=1}^{\infty}\frac{1}{n^2}$)

  • 1
    I haven't read the whole thing yet, but am confused about why after the equality tagged "$n \to \infty$" do the following expressions still contain an $n$? – Bungo Apr 26 '16 at 17:01
  • Yes, the major problem of the attemp, but you can carefully remove all O() powered cosine estimates, I belive, by some sort of functional inequalities, like used in answer by Salech Alhasov, than showing both limits converge from above and from below to the same value – Machinato Apr 27 '16 at 19:32
  • You may be interested to know that this is a bit like Kortram's proof here: , which also uses ideas from number theory and what one might call an Abelian theorem about power series. – Chappers Dec 15 '17 at 20:48
  • @Chappers please send me a copy of that article since I was unable to open the page, I would love to see it indeed... – Machinato Dec 17 '17 at 3:41
  • The full reference is Ronald A. Kortram. 'Another Computation of $\int_0^{\infty} e^{-u^2}du$'. Elemente der Mathematik 48 (1993), pp. 170–172, DOI: . An alternative link is – Chappers Dec 17 '17 at 4:04

No entender mucho el idioma pero aqui dejo mi solucion en una imagen didactica. enter image description here

  • 2
    This essentially duplicates Ross Millikan's answer, so I don't think it's worth the effort to translate it and write the computation in MathJax markup. But considering the hundreds of answers in English this question has received, I don't think it does much harm to leave one in Spanish here, so I'm not deleting it. – Daniel Fischer May 28 '15 at 14:35
  • 3
    \begin{align} \underline{Line\ 1}: & \mbox{I don't understand the language 'too much'. Anyway, I leave my solution over here as a didactic image.} \\ \underline{Line\ 2}:& \mbox{By means of Fubini Theorem, we can join the integrands in a single double integral.} \\ \underline{Line\ 3}: & \mbox{Lets switch to polar coordinates. ( $\color{#f00}{RED}$ text ).} \\ \underline{Line\ 4}: & \mbox{We'll do... :$u = -\alpha r^{2}\ldots$.} \\ \underline{Line\ 5}: & \mbox{Now, we integrate$\ldots$} \end{align} – Felix Marin Jul 22 '16 at 3:27

Your Answer


By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.