# Integrating this complicated integral for statistics [duplicate]

I want to show that :

$$\int_{-\infty}^{\infty} e^\frac{-u^2}{2} du = \sqrt{2\pi}$$

Is there an elementary way using the tools of Calculus II to do this type of integration? I have not studied numerical analysis yet.

## marked as duplicate by user61527, Bruno Joyal, Sujaan Kunalan, Lord_Farin, azimutNov 28 '13 at 8:09

• Integrating this requires a tool from two-variable calculus and a transition from rectangular to polar coordinates. – ncmathsadist Nov 28 '13 at 2:30
• This is a very well known integral. But I have never seen a proof that uses only Calculus II methods. There is no closed formula for the indefinite integral. – Stephen Montgomery-Smith Nov 28 '13 at 2:34
• @ncmathsadist It doesn't require it, is is an option. – Pedro Tamaroff Nov 28 '13 at 3:01
• This question or an equivalent has been asked and answered in this forum many, many, times. Here are three examples: math.stackexchange.com/questions/204669/… , math.stackexchange.com/questions/66084/… , math.stackexchange.com/questions/34767/… . I'm sorry, I don't know which one is the best. – Stefan Smith Nov 28 '13 at 3:01
• @user111019 : by the way, I think that your wording "integrating this complicated integral" is preferable to "solving this complicated integral", but most mathematicians would phrase this "evaluating this complicated integral". Also, numerical methods are not needed at all, since you can evaluate the integral exactly. You can see from the answers that you need integration using polar coordinates, which is probably not in Calculus II. – Stefan Smith Nov 28 '13 at 3:04

The usual trick is to let $I=\int_{-\infty}^\infty e^{-u^2/2}\,du.$ Then \begin{align}I^2 &= I\int_{-\infty}^\infty e^{-x^2/2}\,dx\\ &= \int_{-\infty}^\infty e^{-x^2/2}\cdot I\,dx\\ &= \int_{-\infty}^\infty e^{-x^2/2}\int_{-\infty}^\infty e^{-y^2/2}\,dy\,dx\\ &= \int_{-\infty}^\infty\int_{-\infty}^\infty e^{-x^2/2}e^{-y^2/2}\,dy\,dx\\ &= \int_{-\infty}^\infty\int_{-\infty}^\infty e^{-(x^2+y^2)/2}\,dy\,dx\end{align}

At that point, we switch to polar coordinates, and note that the plane is covered by $0\le r<\infty$ and $0\le \theta<2\pi,$ so that the new integral is $$I^2=\int_0^{2\pi}\int_0^\infty e^{-r^2/2}\cdot r\,dr\,d\theta=\int_0^\infty e^{-r^2/2}\cdot r\,dr\cdot\int_0^{2\pi}\,d\theta=2\pi\int_0^\infty e^{-r^2/2}\cdot r\,dr.$$

Through a substitution, you should be able to see that $\int_0^\infty e^{-r^2/2}\cdot r\,dr=1,$ so that $I^2=2\pi,$ and so $I=\sqrt{2\pi},$ as desired.

A nice proof is the following.

Let $$\vartheta(t)=\left(\int_0^t e^{-x^2}dx\right)^2$$

Then $$\vartheta'(t)=2\int_0^t e^{-(x^2+t^2)}dx$$

Now let $x=tu$, so that we get $$\vartheta'(t)=2t\int_0^1 e^{-t^2(1+u^2)}du$$ But this gives $$\vartheta (t) = - \int_0^1 {\frac{{{e^{ - {t^2}(1 + {u^2})}}}}{{1 + {u^2}}}} du$$

It follows that the function $$F(t)=\left(\int_0^t e^{-x^2}dx\right)^2+\int_0^1 {\frac{{{e^{ - {t^2}(1 + {u^2})}}}}{{1 + {u^2}}}} du$$ is constant.

Letting $t=0$ we get it is constantly $\dfrac{\pi}4$. As $t\to\infty$ the second integral vanishes, and we get that $$\left(\int_0^\infty e^{-x^2}dx\right)^2=\frac{\pi}4$$

• But the square root was supposed to be $\sqrt {2\pi}$, not $\sqrt{\pi}/2$? – user99680 Nov 28 '13 at 3:35
• @user99680 Look at my integral, and look at the post's integral again. Then perform an appropriate change of variables. – Pedro Tamaroff Nov 28 '13 at 3:39
• Sorry for my needless nitpick; it is perfectly fine. – user99680 Nov 28 '13 at 6:08

You can use this:

Let $I:= \int e^{-x^2}$. Then: $I^2$= $\int e^{-x^2}dx \int e^{-y^2}dy=\int\int e^{-(x^2+y^2)}dxdy$. Then you can work in polar coordinates, using the fact that $x^2+y^2=r^2 ; x=rcos\theta; y=rsin\theta$, and then find the right region of integration.

Using the substitution:

$I^2= \int_{r=0}^ {\infty}\int_{\theta=0}^{2\pi} e^{-r^2}rdrd\theta$ , gives you the result $2\pi$, so that $I^2=2\pi$ , and then $I= \sqrt{2\pi}$ , which is what you wanted.

• So, what's wrong with this? – user99680 Nov 28 '13 at 3:19
• Is it really too much to ask for you to tell me what you find wrong and then let me reply? – user99680 Nov 28 '13 at 3:36
• Oh, don't take it hard, @user99580 . Here and there some bored members downvote questions and answers mainly for sport. Your answer is fine. +1 – DonAntonio Nov 28 '13 at 5:07
• @DonAntonio, thanks. I agree with you, unfortunately. – user99680 Nov 28 '13 at 5:10
• Ah, I forgot to say, for fairness, that I did edit this, and the downvote may have happened before the edit. – user99680 Dec 1 '13 at 0:37

There is indeed such “a way”, but it's not quite “elementary”, and it requires quite a bit of stretch of the imagination, to be quite honest. You must have probably studied factorials and combinations by now, am I correct ? Know then, that it can be proven, for natural numbers, using induction and other primitive methods, that $$n!=\int_0^\infty e^{-\sqrt[n]x}dx$$ and that $$\int_0^1(1-\sqrt[n]x)^mdx=\int_0^1(1-\sqrt[m]x)^ndx=\frac1{C_{m+n}^n}=\frac1{C_{m+n}^m}=\frac{m!\cdot n!}{(m+n)!}$$

Now, let us do something really insane and take the apparently non-sensical case $m=n=\frac12$ . What would we get ? Well, we'd have the following results: $$\tfrac12!=\int_0^\infty e^{-x^2}dx$$ and $$\int_0^1\sqrt{1-x^2}dx=\frac{\frac12!\cdot\frac12!}{\left(\frac12+\frac12\right)!}=\left(\tfrac12!\right)^2$$ But we know that the value of the former integral is $\frac\pi4$ , inasmuch as it describes the area of a quarter of a disc or circle with radius $r=1$ . From which we gather that $$\int_0^\infty e^{-x^2}dx=\tfrac12!=\sqrt\frac\pi4=\frac{\sqrt\pi}2$$ Then we use this result to compute the integral you wanted, by making the simple substitution to the new variable $x=\frac{\sqrt u}2$ .

There is another way which could be used but may be you never heard about this "elementary" function. The antiderivative of your integrand is Sqrt[Pi / 2] Erf[u / Sqrt[2]]. Taking the values at the infinite bounds leads to Sqrt[2 Pi].