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

  • Thread starter Thread starter BucketOfFish
  • Start date Start date
  • Tags Tags
    Function Gaussian
Click For Summary

Homework Help Overview

The discussion revolves around evaluating the expectation value of \( x^2 \) for a Gaussian function, specifically the integral \(\int^{\infty}_{-\infty} e^{-x^2}x^2dx\). Participants explore various approaches to this integral within the context of Gaussian distributions.

Discussion Character

  • Exploratory, Mathematical reasoning, Assumption checking

Approaches and Questions Raised

  • The original poster attempts integration by parts and u-substitution but encounters difficulties. Some participants suggest considering the derivative of a related integral with respect to a parameter, while others question the correctness of signs in the calculations.

Discussion Status

Participants are actively engaging with the problem, providing hints and corrections. There is acknowledgment of errors in the original calculations, and some guidance has been offered regarding the differentiation of integrals. However, there is no explicit consensus on the final approach or outcome.

Contextual Notes

There is a discussion about the implications of sign errors in the context of the integral, as well as the independence of variables involved in the differentiation process. The original poster's attempts reflect the constraints of homework rules and the need for careful mathematical reasoning.

BucketOfFish
Messages
60
Reaction score
1

Homework Statement



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

\int^{\infty}_{-\infty} e^{-x^2}x^2dx

Homework Equations



Integration by parts:

\int udv = uv - \int vdu

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:

2\int^{\infty}_{0} e^{-x^2}x^2dx

Letting a = x^2, da = 2xdx, we get:

\int^{\infty}_{0} e^{-a}\sqrt{a}da

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

\int e^{-a}\sqrt{a}da = -\sqrt{a}e^{-a} + \int e^{-a}\frac{1}{2\sqrt{a}}da

And here I get stuck. Anybody have hints?
 
Physics news on Phys.org
Think about \int^{\infty}_{-\infty} e^{- a x^2} dx. You can work that out, right? Now what is d/da of that when a=1?
 
Nice hint.
 
Ok, so I think I've got it. Basically, you take:

\int^{\infty}_{-\infty} -\frac{de^{-ax^2}}{da}dx

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

\frac{d}{da}\int^{-\infty}_{\infty} e^{-ax^2}dx

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

I didn't offend any mathematicians with egregiously bad calculus, did I?
 
Last edited:
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?
 
Yep, I realized my terrible error and fixed it. Does it look alright now?
 
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.
 

Similar threads

  • · Replies 105 ·
4
Replies
105
Views
11K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 21 ·
Replies
21
Views
2K