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

  • #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?
 

Answers and Replies

  • #2
Dick
Science Advisor
Homework Helper
26,263
619
Think about [itex]\int^{\infty}_{-\infty} e^{- a x^2} dx[/itex]. You can work that out, right? Now what is d/da of that when a=1?
 
  • #3
LCKurtz
Science Advisor
Homework Helper
Insights Author
Gold Member
9,559
773
Nice hint.
 
  • #4
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:
  • #5
Dick
Science Advisor
Homework Helper
26,263
619
Maybe. But even physicists would be offended because the sign is obviously wrong. x^2*exp(-x^2) is a positive function. How can its integral be negative?
 
  • #6
Yep, I realized my terrible error and fixed it. Does it look alright now?
 
  • #7
Dick
Science Advisor
Homework Helper
26,263
619
The answer is right. I'm not sure you've put the sign correction in the right place everywhere. But I'm sure you can fix it.
 

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

  • Last Post
Replies
10
Views
853
Replies
5
Views
2K
  • Last Post
Replies
6
Views
286
  • Last Post
Replies
3
Views
4K
  • Last Post
Replies
3
Views
2K
  • Last Post
Replies
0
Views
2K
Replies
5
Views
4K
  • Last Post
2
Replies
46
Views
5K
Replies
1
Views
1K
Replies
13
Views
3K
Top