Mean squared value of the Gaussian

Click For Summary

Homework Help Overview

The discussion centers around the calculation of the average value of ##x^2## for a probability distribution proportional to ##P(x) \propto e^{-x^2/2\sigma^2}##. Participants are tasked with showing that the average ##\langle x^2\rangle = \sigma^2##, using integration techniques and properties of even and odd functions.

Discussion Character

  • Mixed

Approaches and Questions Raised

  • Participants explore integration by parts and the limits of integration, questioning how to correctly apply these limits in the context of the problem. There is discussion about the nature of the integrals involved and whether they diverge or converge.

Discussion Status

Some participants have provided guidance on the use of limits and the properties of even and odd functions, suggesting that this may simplify the integration process. There is an ongoing exploration of the correct setup for the integrals, with no clear consensus reached yet.

Contextual Notes

There is a noted confusion regarding the original statement of the problem, with one participant acknowledging a typo in the exponent of the probability distribution. The discussion also highlights the importance of specifying limits for the integrals involved.

A Cheeky Llama

Homework Statement


If ##P(x)\propto e^{x^2/2\sigma^2}##, show that the average ##\langle x^2\rangle = \sigma^2##.

Homework Equations


##\langle x\rangle = \frac {\int xP(x) \, dx} {\int P(x) \, dx}##

The Attempt at a Solution


##I = \int x^2e^{x^2/2\sigma^2} \, dx = \int (-\sigma^2x)(\frac {-x} {\sigma^2} e^{-x^2/2\sigma^2}) \, dx##
let ##u = -\sigma^2x##, let ##dv = \frac {-x} {\sigma^2} e^{-x^2/2\sigma^2}##
##I = -\sigma^2xe^{-x^2/2\sigma^2} + \sigma^2\int e^{-x^2/2\sigma^2} \, dx##
Therefore ##\langle x^2 \rangle = \frac {-\sigma^2xe^{-x^2/2\sigma^2} + \sigma^2\int e^{-x^2/2\sigma^2} \, dx} {\int e^{-x^2/2\sigma^2} \, dx}##
##= \sigma^2 - \frac {\sigma^2xe^{-x^2/2\sigma^2}} {\int e^{-x^2/2\sigma^2} \, dx}##
At this point I'm stuck and not sure where to go. If I am to show the above, then the right hand term must equal zero, but I cannot see how this can be.
This question is just part of my individual study (from A Cavendish Quantum Mechanics Primer), I originally moved on from the question when I couldn't get it, but have kept trying to come back to it and have gotten no where.
 
Physics news on Phys.org
A Cheeky Llama said:

Homework Statement


If ##P(x)\propto e^{x^2/2\sigma^2}##, show that the average ##\langle x^2\rangle = \sigma^2##.

Homework Equations


##\langle x\rangle = \frac {\int xP(x) \, dx} {\int P(x) \, dx}##

The Attempt at a Solution


##I = \int x^2e^{x^2/2\sigma^2} \, dx = \int (-\sigma^2x)(\frac {-x} {\sigma^2} e^{-x^2/2\sigma^2}) \, dx##
let ##u = -\sigma^2x##, let ##dv = \frac {-x} {\sigma^2} e^{-x^2/2\sigma^2}##
##I = -\sigma^2xe^{-x^2/2\sigma^2} + \sigma^2\int e^{-x^2/2\sigma^2} \, dx##
Therefore ##\langle x^2 \rangle = \frac {-\sigma^2xe^{-x^2/2\sigma^2} + \sigma^2\int e^{-x^2/2\sigma^2} \, dx} {\int e^{-x^2/2\sigma^2} \, dx}##
##= \sigma^2 - \frac {\sigma^2xe^{-x^2/2\sigma^2}} {\int e^{-x^2/2\sigma^2} \, dx}##
At this point I'm stuck and not sure where to go. If I am to show the above, then the right hand term must equal zero, but I cannot see how this can be.
This question is just part of my individual study (from A Cavendish Quantum Mechanics Primer), I originally moved on from the question when I couldn't get it, but have kept trying to come back to it and have gotten no where.

Your left over term should be the difference between the limit of ##-\sigma^2xe^{-x^2/2\sigma^2}## as ##x \to \infty## and the limit as ##x \to -\infty##. Both those limits are zero. Review what happens to that term in integration by parts.
 
  • Like
Likes   Reactions: A Cheeky Llama
A Cheeky Llama said:

Homework Statement


If ##P(x)\propto e^{x^2/2\sigma^2}##, show that the average ##\langle x^2\rangle = \sigma^2##.

Homework Equations


##\langle x\rangle = \frac {\int xP(x) \, dx} {\int P(x) \, dx}##

The Attempt at a Solution



Therefore ##\langle x^2 \rangle = \frac {-\sigma^2xe^{-x^2/2\sigma^2} + \sigma^2\int e^{-x^2/2\sigma^2} \, dx} {\int e^{-x^2/2\sigma^2} \, dx}##
##= \sigma^2 - \frac {\sigma^2xe^{-x^2/2\sigma^2}} {\int e^{-x^2/2\sigma^2} \, dx}##
At this point I'm stuck and not sure where to go. If I am to show the above, then the right hand term must equal zero, but I cannot see how this can be.
This question is just part of my individual study (from A Cavendish Quantum Mechanics Primer), I originally moved on from the question when I couldn't get it, but have kept trying to come back to it and have gotten no where.

As written, your question is completely wrong: all your integrals are very badly divergent. If you had written ##P(x) = K e^{-x^2/\;2/\sigma^2}## you would have been OK, but with ##+ x^2/2 \sigma^2## in the exponent, everything blows up (unless ##\sigma^2 < 0##, making ##\sigma## an imaginary number).

Anyway, you need to put limits ##-\infty## and ##+\infty## on your integrals, and then you need to remember that ##P(x)## is an even function of ##x##.
 
  • Like
Likes   Reactions: A Cheeky Llama
Dick said:
Your left over term should be the difference between the limit of ##-\sigma^2xe^{-x^2/2\sigma^2}## as ##x \to \infty## and the limit as ##x \to -\infty##. Both those limits are zero. Review what happens to that term in integration by parts.

Ray Vickson said:
As written, your question is completely wrong: all your integrals are very badly divergent. If you had written ##P(x) = K e^{-x^2/\;2/\sigma^2}## you would have been OK, but with ##+ x^2/2 \sigma^2## in the exponent, everything blows up (unless ##\sigma^2 < 0##, making ##\sigma## an imaginary number).Anyway, you need to put limits ##-\infty## and ##+\infty## on your integrals, and then you need to remember that ##P(x)## is an even function of ##x##.

Hi, sorry yeah that's a typo the question is supposed to be if ##P(x)\propto e^{-x^2/2\sigma^2}##, etc

You can see further down in my working that that is what I was using, I just typed the question incorrectly on here :P

And yeah I was wondering if I was meant to put in those limits, thanks to both of you for pointing it out. I'm a little confused as to how they apply over the equation though:

Is ##\int -x^2e^{x^2/2\sigma^2} \, dx## equivalent to this: ##\left. (-\sigma^2xe^{-x^2/2\sigma^2} + \sigma^2\int e^{-x^2/2\sigma^2} \, dx) \right|_{-\infty}^{\infty}##
or this: ##-\sigma^2x\left. (e^{-x^2/2\sigma^2})\right|_{-\infty}^{\infty} + \sigma^2\int_{-\infty}^{\infty} \left.(e^{-x^2/2\sigma^2})\right|_{-\infty}^{\infty}\, dx##
I expect it would be the first case as I can see how that would cancel down to the answer.
Thanks for your help!
 
A Cheeky Llama said:
Hi, sorry yeah that's a typo the question is supposed to be if ##P(x)\propto e^{-x^2/2\sigma^2}##, etc

You can see further down in my working that that is what I was using, I just typed the question incorrectly on here :P

And yeah I was wondering if I was meant to put in those limits, thanks to both of you for pointing it out. I'm a little confused as to how they apply over the equation though:

Is ##\int -x^2e^{x^2/2\sigma^2} \, dx## equivalent to this: ##\left. (-\sigma^2xe^{-x^2/2\sigma^2} + \sigma^2\int e^{-x^2/2\sigma^2} \, dx) \right|_{-\infty}^{\infty}##
or this: ##-\sigma^2x\left. (e^{-x^2/2\sigma^2})\right|_{-\infty}^{\infty} + \sigma^2\int_{-\infty}^{\infty} \left.(e^{-x^2/2\sigma^2})\right|_{-\infty}^{\infty}\, dx##
I expect it would be the first case as I can see how that would cancel down to the answer.
Thanks for your help!

Since ##P(x)## is an "even" function (meaning that ##P(-x) = P(x)##) and ##x^2## is an even function, so is ##x^2 P(x)##. Therefore,
$$\int_{-\infty}^{\infty} x^2 P(x) \, dx = 2 \int_0^{\infty} x^2 P(x) \, dx,$$
which may be a bit easier to deal with (less chance of making a simple error, etc.)

Also: ##F(x) = x P(x)## is an ""odd" function (meaning that ##F(-x) = -F(x)##)---because ##P## is even and ##x## is odd. Therefore, without doing any calculations at all we have ##\int_{-\infty}^{\infty} x P(x) \, dx = 0.##
 
Ray Vickson said:
Since ##P(x)## is an "even" function (meaning that ##P(-x) = P(x)##) and ##x^2## is an even function, so is ##x^2 P(x)##. Therefore,
$$\int_{-\infty}^{\infty} x^2 P(x) \, dx = 2 \int_0^{\infty} x^2 P(x) \, dx,$$
which may be a bit easier to deal with (less chance of making a simple error, etc.)

Also: ##F(x) = x P(x)## is an ""odd" function (meaning that ##F(-x) = -F(x)##)---because ##P## is even and ##x## is odd. Therefore, without doing any calculations at all we have ##\int_{-\infty}^{\infty} x P(x) \, dx = 0.##

Yup I can see that, but at what point in my working do I use it? I think I'm a little confused as to what order I'm meant to apply the limits. Do I apply the limits (i.e. evaluate the expression with the limits) at the very end, after simplifying everything, or do I apply them right at the very start when I'm integrating dv/dx for the by parts integration?
Thanks
 
A Cheeky Llama said:
Yup I can see that, but at what point in my working do I use it? I think I'm a little confused as to what order I'm meant to apply the limits. Do I apply the limits (i.e. evaluate the expression with the limits) at the very end, after simplifying everything, or do I apply them right at the very start when I'm integrating dv/dx for the by parts integration?
Thanks
Definite integration-by-parts reads as
$$\int_a^b u\, dv = \left. u v \right|_a^b - \int_a^b v \, du$$
We need to take the limits ##a \to -\infty, \: b \to + \infty## afterwards.
 
  • Like
Likes   Reactions: A Cheeky Llama
Ray Vickson said:
Definite integration-by-parts reads as
$$\int_a^b u\, dv = \left. u v \right|_a^b - \int_a^b v \, du$$
We need to take the limits ##a \to -\infty, \: b \to + \infty## afterwards.

Ahhh perfect that's exactly what I was looking for, thanks again for all your help :)
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 15 ·
Replies
15
Views
2K
  • · Replies 105 ·
4
Replies
105
Views
11K
  • · Replies 7 ·
Replies
7
Views
6K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 17 ·
Replies
17
Views
3K
Replies
4
Views
2K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K