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.

13 comments:

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

    ReplyDelete
  2. This comment has been removed by the author.

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

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

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

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

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

    ReplyDelete
  8. Wow these are great! Followed! alphabetalife.blogspot.com

    ReplyDelete
  9. my head hurts

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

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

    ReplyDelete
  11. Wow. That's some serious maths.

    ReplyDelete