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;

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. Makes perfect I just need to go back and remember what the heck this was used for.

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

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

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

  8. Wow these are great! Followed!

  9. my head hurts

    An overwhelming dose of awesome can be found in my 4th electro set! Check it
    Electric Addict Set #4

  10. Wish I could understand half of that...

  11. Wow. That's some serious maths.