How do I evaluate <x^2> for a Gaussian function?

  • Thread starter Thread starter BucketOfFish
  • Start date Start date
  • Tags Tags
    Function Gaussian
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
6 replies · 2K views
BucketOfFish
Messages
60
Reaction score
1

Homework Statement



For some Gaussian distribution, let's say [itex]e^{-x^2}[/itex] times a constant, I want to find the expectation value of [itex]x^2[/itex]. In other words, I want to evaluate:

[tex]\int^{\infty}_{-\infty} e^{-x^2}x^2dx[/tex]

Homework Equations



Integration by parts:

[tex]\int udv = uv - \int vdu[/tex]

The Attempt at a Solution



I tried a few things actually, but none of them got anywhere. One of the routes I attempted was u-substitution followed by integration by parts. First, since the function is even, you set it equal to:

[tex]2\int^{\infty}_{0} e^{-x^2}x^2dx[/tex]

Letting [itex]a = x^2, da = 2xdx[/itex], we get:

[tex]\int^{\infty}_{0} e^{-a}\sqrt{a}da[/tex]

Then, letting [itex]u = \sqrt{a}, dv = e^{-a}da, du = \frac{1}{2\sqrt{a}}da, v = -e^{-a}[/itex]:

[tex]\int e^{-a}\sqrt{a}da = -\sqrt{a}e^{-a} + \int e^{-a}\frac{1}{2\sqrt{a}}da[/tex]

And here I get stuck. Anybody have hints?
 
Physics news on Phys.org
Ok, so I think I've got it. Basically, you take:

[tex]\int^{\infty}_{-\infty} -\frac{de^{-ax^2}}{da}dx[/tex]

Then since x and a are independent of each other, you can bring the d/da outside the integral:

[tex]\frac{d}{da}\int^{-\infty}_{\infty} e^{-ax^2}dx[/tex]

Then you do that integral to get [itex]-\sqrt{\pi/a}[/itex], and after taking the derivative with respect to a, you get [itex]\frac{\sqrt{\pi}a^{-3/2}}{2}[/itex]. Plugging in a=1, you end up with [itex]\frac{\sqrt{\pi}}{2}[/itex] for your final answer.

I didn't offend any mathematicians with egregiously bad calculus, did I?
 
Last edited:
Yep, I realized my terrible error and fixed it. Does it look alright now?