Mean squared value of the Gaussian

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 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 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 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 :)
 
Back
Top