Wednesday, 9 March 2011

Integral of a Gaussian (continued)

Ok, so last post we derived (not so rigorously) that the integral of a standard Gaussian as;
$$\int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi}$$

and using a substitution of

$$x=\sqrt{a}y$$ and $$dx=\sqrt{a}dy$$
we obtain;$$\int_{-\infty}^{\infty} e^{-ax^2} dx = \sqrt{\frac{\pi}{a}}$$.

Now let's extend that to the more general form of;
$$I=\int_{-\infty}^{\infty} x^2 e^{-ax^2} dx$$ where a is some constant.

We can recognise (or at least be told to recognise) that the argument of the integral; $$x^2 e^{-ax^2}$$ is equal to
$$-\frac{\partial}{\partial a} e^{-ax^2}$$

Putting this together, we get;
$$I=\int_{-\infty}^{\infty}-\frac{\partial}{\partial a} e^{-ax^2} dx$$
We can swap the partial derivative and Integration sign (provided the variable we are integrating over is independent of a and the integrand is continuous)
We get; $$I= -\frac{\partial}{\partial a} \int_{-\infty}^{\infty} e^{-ax^2} dx = -\frac{\partial}{\partial a}\sqrt{\frac{\pi}{a}}$$
$$=\frac{1}{2a} \sqrt{\frac{\pi}{a}}$$
Therefore;  $$\int_{-\infty}^{\infty} x^2 e^{-ax^2} dx =\frac{1}{2a} \sqrt{\frac{\pi}{a}}$$

This technique can be extended for different powers of x - provided they are even.

1. I've heard Nicholas Taleb speak of this before in lectures. Still a lil over my head tho.

2. This comment has been removed by the author.

3. Still following. Your explanations make it so easy to understand. (At least for me, lol)

4. Following for interest :D

5. Makes perfect sense...now I just need to go back and remember what the heck this was used for.

6. I'm only able to use the easy-integral-one.
integral of an easy function like 2x²+x+2

7. I feel so nerdy/geeky for enjoying these ypes of posts but whatever.

8. Oh, what was it you majored in again btw? (Obviously maths but which area?)

9. Wow these are great! Followed! alphabetalife.blogspot.com