Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

How do I transform the integral $$\int_0^\infty e^{-x^2} dx$$ from 0 to $\infty$ to o to 1 and. I have to devise a monte carlo algorithm to solve this further, so any advise would be of great help

share|improve this question
Are you aware that this integral can be solved exactly? –  Alex Becker Apr 13 '13 at 19:38
If you would like to evaluate this integral, that may not be the best way to go. This is called the Gaussian integral, and its value is $\sqrt{\pi}/2$. en.wikipedia.org/wiki/Gaussian_integral –  Lord Soth Apr 13 '13 at 19:39
The idea is that $$\int_0^\infty e^{-x^2}dx=\frac12\sqrt{\int_{-\infty}^\infty e^{-x^2}dx\int_{-\infty}^\infty e^{-y^2}dy}=\frac12\sqrt{\int_0^{2\pi}\int_0^\infty re^{-r^2}drd\theta}=\frac12\sqrt{\pi}$$ –  Alex Becker Apr 13 '13 at 19:46
Thanks a lot for this, true can be solved straight away, but have to devise a MC based solution for the same, any thoughts would be of great help –  sleepybob Apr 13 '13 at 20:01

3 Answers 3

\begin{align} \int_0^{\infty} e^{-x^2}dx & = \int_0^{1} e^{-x^2}dx + \underbrace{\int_1^{\infty} e^{-x^2}dx}_{x \mapsto 1/x} = \int_0^1 e^{-x^2}dx + \int_1^0 e^{-1/x^2} \left(\dfrac{-dx}{x^2} \right)\\ &=\int_0^1 \left(e^{-x^2} + \dfrac{e^{-1/x^2}}{x^2}\right)dx \end{align}

share|improve this answer
could you provide some background on the transformation from x to 1/x as the limits goes from 1 to 0, after the transformation. Please could you advice –  sleepybob Apr 13 '13 at 20:00

Pick your favorite invertible, increasing function $f : (0,1) \to (0,+\infty)$. Make a change of variable $x = f(y)$.

Or, pick your favorite invertible, increasing function $g : (0,+\infty) \to (0,1)$. Make a change of variable $y = g(x)$.

share|improve this answer

This is a pretty weird integral. There is no elementary antiderivative for $e^{-x^2}$. However, the area under the entire curve is $\sqrt{\pi}$. The details escape me at the moment, but you can derive this be rotating the curve around the y axis, changing to polar, then integrating. So, if $$\int_{-\infty}^\infty e^{-x^2} = \sqrt{\pi}$$ what happens when the lower bound is $0$?

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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