# Integrating exp(-x^2) and some other stuff

## Main Question or Discussion Point

Hello everybody
I'm very much interested in the thread about "Feynmans Calculus" (having read the books, too). The problem is I don't understand quite some of the stuff, because I don't have the necessary fundamental knowledge.
So I thought to confront you with some lower level questions:

How do you solve this: $$\int\ e^{(-x^2)} dx$$ ?
It seems that $$\int_{-\infty} ^\infty e^{(-x^2)} dx=\sqrt{\Pi}$$. Why is that?

I honestly have no clou.

I would be very thankful if somebody could explain this to me (then I could also continue to see wether the rest of my questions still makes sense...).
Best regards and thank you in advance
cliowa

dextercioby
Homework Helper
cliowa said:
Hello everybody
I'm very much interested in the thread about "Feynmans Calculus" (having read the books, too). The problem is I don't understand quite some of the stuff, because I don't have the necessary fundamental knowledge.
So I thought to confront you with some lower level questions:

How do you solve this: $$\int\ e^{(-x^2)} dx$$ ?
By defining the error function

$$\mbox{erf} (x)=: \frac{2}{\sqrt{\pi}}\int_{0}^{x} \exp\left(-t^{2}\right) \ dt$$

cliowa said:
It seems that $$\int_{-\infty} ^\infty e^{(-x^2)} dx=\sqrt{\pi}$$. Why is that?
Because a certain trick is performed using Fubini's theorem and a change of variables in the parametrization of an arbitrary point in $\mathbb{R}^{2}$.

Daniel.

$$$\begin{array}{l} {\rm let }J = \int\limits_{{\rm - }\infty }^\infty {{\rm e}^{{\rm - x}^{\rm 2} } } dx \\ {\rm then }J^2 = \int\limits_{{\rm - }\infty }^\infty {{\rm e}^{{\rm - x}^{\rm 2} } } dx\int\limits_{ - \infty }^\infty {e^{ - y^2 } } dy \\ {\rm by \: fubini's \: theorem:} \\ J^2 = \int\limits_{ - \infty }^\infty {\int\limits_{ - \infty }^\infty {e^{ - (x^2 + y^2 )} } dxdy} \\ {\rm now \: employing \: a \: common \: change \: of \: variables:} \\ J^2 = \int\limits_0^{2\pi } {\int\limits_0^\infty {e^{ - r^2 } rdrd\theta } } \\ {\rm this \: is \: now \: easily \: evaluated} \\ J^2 = 2\pi \mathop {\lim }\limits_{b \to \infty } \int\limits_0^b {e^{ - r^2 } } rdr \\ J^2 = - \pi (\mathop {\lim }\limits_{b \to \infty } e^{ - b^2 } - e^0 ) = \pi \\ {\rm so }J = \sqrt \pi \\ \end{array}$$$

dextercioby said:
By defining the error function

$$\mbox{erf} (x)=: \frac{2}{\sqrt{\pi}}\int_{0}^{x} \exp\left(-t^{2}\right) \ dt$$
I'm sorry to say this, but I've never heard of that before. Exactly how does this work? The whole thing (error function) is new to me. Could you explain this to me? Thank you very much.

@Cinncinnatus: How is that "common change of variables" performed?

Thanks to everybody helping me out.
Best regards
Cliowa

LeonhardEuler
Gold Member
e^(x^2) has no elementary antiderivitve. In probability int[e^(x^2)dx] is important because the normal probability density function is in the form e^(x^2) (with some constants in there). To get the distribution function you have to integrate it, so people make tables of numerical approximations for the integral over various intervals and call it the error function.
To compute the integral exactly over the whole real line you can do that trick someone else showed. The change of variables is moving the double integral from rectangular to polar coordinates.

dextercioby
Homework Helper
In probability we use the minus in the exponential.

Daniel.

James R
Homework Helper
Gold Member
Cinncinnatus: How is that "common change of variables" performed?
Define $r^2 = x^2 + y^2[/tex] This is a change to polar coordinates. The integration from negative infinity to positive infinity in the (x,y) plane is equivalent to an integration from 0 to infinity over r and 0 to 2 pi in [itex]\theta$, in the $(r,\theta)$ plane.

The area element in cartesian coordinates is dx dy.
The area element in plane polar coordinates is $r dr d\theta$.

James R. beat me too it, thats what I did.

I'm sure someone else could explain better than I how it actually works though...

Thank you all very much. It seems a lot clearer now.

Now here's how I got to the problems mentioned above:

How to solve this (for x?):
$$\int_{-\infty} ^\infty e^{(-ax^2)} dx=\sqrt{\frac{\Pi}{a}}$$

Having read the Feynman thread I would try the differentiation under the integral. So I take the derivative with respect to a]. I get
$$-\int_{-\infty} ^\infty x^2 e^{(-ax^2)} dx=-\frac{1}{2}\sqrt{\frac{\Pi}{a^3}}$$.
And now? how do I continue?

What do you mean "solve this for x"?
Isn't x a dummy variable in that equation?

@Cinncinnatus: I don't know where I got the problem from, but when I saw it and had no clou how to do it, I wrote it down, and here it is. What would you solve for?

Curious3141
Homework Helper
cliowa said:
Thank you all very much. It seems a lot clearer now.

Now here's how I got to the problems mentioned above:

How to solve this (for x?):
$$\int_{-\infty} ^\infty e^{(-ax^2)} dx=\sqrt{\frac{\Pi}{a}}$$

Having read the Feynman thread I would try the differentiation under the integral. So I take the derivative with respect to a]. I get
$$-\int_{-\infty} ^\infty x^2 e^{(-ax^2)} dx=-\frac{1}{2}\sqrt{\frac{\Pi}{a^3}}$$.
And now? how do I continue?
There is nothing to solve for. It is an identity.

Do you know how to make substitutions to evaluate integrals ? Try substituting $u = x\sqrt{a}$ to evaluate the integral on the left hand side, and see what you get.

matt grime
Homework Helper
change the variable in the integral, say ax^2=y^2, than apply what you already know.

lurflurf
Homework Helper
There are lots of ways to do this integral.
The most common is (as has been mentioned) to consider the 2-D integral and change to polar form.
Here is one using differentiation relative a parameter
$$F(x)=\displaystyle{(}\int_0^xe^{-t^2}dt\displaystyle{)}^2+\int_0^1\frac{e^{-x^2(t^2+1)}}{t^2+1}dt$$

$$F'(x)=0$$
hint: do a change of variable u=xt after differentiating
then use
$$\lim_{x\rightarrow\infty}F(x)=F(0)$$
to solve for the integral
Another that is generally useful when finding an integral that would be easy were the integrant multiplied by x is to multiply two integrals together, then change the variable in one so that it is multiplied by x then perform integrations. In this case
$$I=\int_0^\infty e^{-x^2}dx$$
so
$$I^2=\int_0^\infty\int_0^\infty e^{-(x^2+y^2)}dx dy$$
let y=zx so
$$I^2=\int_0^\infty\int_0^\infty x e^{-x^2(1+z^2)}dx dz$$
do x integral
$$I^2=\frac{1}{2}\int_0^\infty \frac{1}{1+z^2}dz$$
do z integral
$$I^2=\frac{\pi}{4}$$
hence
$$I=\frac{\sqrt{\pi}}{2}$$

Last edited:
mathwonk
Homework Helper
this famous computation is apparently due to liouville.

NSX
Cincinnatus said:
$$$\begin{array}{l} {\rm let }J = \int\limits_{{\rm - }\infty }^\infty {{\rm e}^{{\rm - x}^{\rm 2} } } dx \\ ... {\rm so }J = \sqrt \pi \\ \end{array}$$$
Since $J = \int\limits_{{\rm - }\infty }^\infty {{\rm e}^{{\rm - x}^{\rm 2} } } dx$, why is $J^2 = \int\limits_{{\rm - }\infty }^\infty {{\rm e}^{{\rm - x}^{\rm 2} } } dx\int\limits_{ - \infty }^\infty {e^{ - y^2 } } dy$ instead of $J^2 = \int\limits_{{\rm - }\infty }^\infty {{\rm e}^{{\rm - x}^{\rm 2} } } dx\int\limits_{ - \infty }^\infty {e^{ - x^2 } } dx$?

[hm .. infinity doesn't show on the upper bound, but pretend it's there]

lurflurf
Homework Helper
NSX said:
Since $J = \int\limits_{{\rm - }\infty }^\infty {{\rm e}^{{\rm - x}^{\rm 2} } } dx$, why is $J^2 = \int\limits_{{\rm - }\infty }^\infty {{\rm e}^{{\rm - x}^{\rm 2} } } dx\int\limits_{ - \infty }^\infty {e^{ - y^2 } } dy$ instead of $J^2 = \int\limits_{{\rm - }\infty }^\infty {{\rm e}^{{\rm - x}^{\rm 2} } } dx\int\limits_{ - \infty }^\infty {e^{ - x^2 } } dx$?

[hm .. infinity doesn't show on the upper bound, but pretend it's there]
You can use any variable for the integration, it does not matter. Different variables are used because in subsequent steps using the same variable is bound to lead to confusion. In particular we like to write a product of integrals as an iterated integral. When this is done different variables must be used to make clear which varible corisponds to which integration.

NSX
lurflurf said:
You can use any variable for the integration, it does not matter. Different variables are used because in subsequent steps using the same variable is bound to lead to confusion. In particular we like to write a product of integrals as an iterated integral. When this is done different variables must be used to make clear which varible corisponds to which integration.
ah!