Integral x^2*e^(-x^2) running into error function

In summary, the homework statement asks for the expectation value of a function that takes the value -2am/h for hbar and integrates from -∞ to ∞. The attempt at a solution uses the gamma function to simplify the integral, but the solution still uses the gamma function and is not solvable using what the student currently knows. The final solution is to use integration by parts or a standard trick to get the answer, either of which require no error function.
  • #1
oddjobmj
306
0

Homework Statement



I am trying to find the expectation value of <x2> of the following function:

ψ[(x,t)]=([itex]\frac{2am}{πh}[/itex])[1/4]e[-a([itex]\frac{mx^2}{h}[/itex]+it)], where h is hbar and the integral is from -∞ to ∞

Homework Equations



<x2>=[itex]\int[/itex]x^2|ψ[(x,t)]|2dx

The Attempt at a Solution



The resulting integral:

[itex]\sqrt{\frac{c}{π}}\int[/itex]x2e[-cx^2]dx where c=[itex]\frac{2am}{h}[/itex]

I am having a very hard time solving this! I have a solution to the problem but it uses the gamma function which I'm not familiar with: [itex]\Gamma[/itex](n)

Using mathematica (and other similar software) yields error functions (erf and erfi) which I don't know how to resolve.

Using a u-substitution I can simplify the integral to [itex]\int[/itex][itex]\sqrt{u}[/itex]e-udu but that's also not solvable given methods I currently know.

Any suggestions? Thanks!
 
Last edited:
Physics news on Phys.org
  • #2
oddjobmj said:

Homework Statement



I am trying to find the expectation value of <x2> of the following function:

ψ[(x,t)]=([itex]\frac{2am}{πh}[/itex])[1/4]e[-a([itex]\frac{mx^2}{h}[/itex]+it)], where h is hbar and the integral is from -∞ to ∞

Homework Equations



<x2>=[itex]\int[/itex]x^2|ψ[(x,t)]|2dx

The Attempt at a Solution



The resulting integral:

[itex]\sqrt{\frac{2am}{πh}}\int[/itex]x2e[[itex]\frac{-2amx^2}{h}[/itex]]dx

I am having a very hard time solving this! I have a solution to the problem but it uses the gamma function which I'm not familiar with: [itex]\Gamma[/itex](n)

Using mathematica (and other similar software) yields error functions (erf and erfi) which I don't know how to resolve.

Using a u-substitution I can simplify the integral to [itex]\int[/itex][itex]\sqrt{u}[/itex]e-udu but that's also not solvable given methods I currently know.

Any suggestions? Thanks!

Step 1: simplify the notation during the work. So, you want to compute
[tex] F(c) = \int_{-\infty}^{\infty} x^2 e^{-c x^2} \, dx [/tex]
for some constant ##c##; the fact that ##c = 2am/h## in this case is not important at the start. Once you have your final answer in terms of ##c## you can restore the actual value at that time. Of course, you also have a constant ##\sqrt{2am/\pi h}## in front of the integral but it is a waste of time and energy to keep writing it during your work; just put it in at the end.

So, you can get ##F(c)## using integration by parts---no error function needed---or you can use a standard trick to get it from
[tex] I(c) \equiv \int_{-\infty}^{\infty} e^{-c x^2} \, dx [/tex]
which, itself, is doable in terms of a standard Gaussian integral.
Hint: how would you compute the derivative ##I'(c)##?
 
  • Like
Likes 1 person
  • #3
One technique is to use
$$\int_0^\infty x^2e^{-\alpha x^2}\,dx = -\int_0^\infty \frac{\partial}{\partial \alpha} e^{-\alpha x^2}\,dx = -\frac{\partial}{\partial \alpha} \int_0^\infty e^{-\alpha x^2}\,dx.$$ The last integral you should know how to do. If you don't, you should learn how to do it now.
 
  • Like
Likes 1 person
  • #4
oddjobmj said:

Homework Statement



I am trying to find the expectation value of <x2> of the following function:

ψ[(x,t)]=([itex]\frac{2am}{πh}[/itex])[1/4]e[-a([itex]\frac{mx^2}{h}[/itex]+it)], where h is hbar and the integral is from -∞ to ∞

Homework Equations



<x2>=[itex]\int[/itex]x^2|ψ[(x,t)]|2dx

The Attempt at a Solution



The resulting integral:

[itex]\sqrt{\frac{2am}{πh}}\int[/itex]x2e[[itex]\frac{-2amx^2}{h}[/itex]]dx

I am having a very hard time solving this! I have a solution to the problem but it uses the gamma function which I'm not familiar with: [itex]\Gamma[/itex](n)

Maybe it's time to correct this gap in your knowledge of functions:

http://en.wikipedia.org/wiki/Gamma_function
 
  • Like
Likes 1 person
  • #5
If I got it to e^(-cx^2) I could handle that. I did recently learn how to do that integral. But I can't seem to get there from integration by parts. If I try to use by parts to get rid of the x^2 term:

u=x^2

du=2xdx

dv=e[-cx^2]dx

v=[itex]\sqrt{\frac{π}{c}}[/itex]

I guess v would be the case if I take the integral and apply the limits but I don't know the general form of that integral. Is that what I need to find? If I can continue assuming v is correct as shown above then I get the vu-(-2)∫x*vdx, where v is just that constant. By symmetry this is 0 and we're left with vu which is wrong. I must be making a mistake somewhere.

Also, I'm sorry, I should have simplified the notation before typing it out so it was easier for you to read it. Thanks for the tip!

Vela, that's interesting, thank you. I am happy to learn that method but I don't know what to look for. Is there a name for that technique?

SteamKing, thanks for the suggestion. I did look it up and realized that I wouldn't have used that if I didn't see it in the solution. I am happy to learn (what I am here to do) but would you suggest that is the best way to solve this problem?

Thanks!

Edit: Vela's method worked. I believe that's what you were hinting at also, Ray. Thanks again!

I am still interested in knowing if the gamma function is a comparable way to solve the problem.
 
Last edited:
  • #6
oddjobmj said:
If I got it to e^(-cx^2) I could handle that. I did recently learn how to do that integral. But I can't seem to get there from integration by parts. If I try to use by parts to get rid of the x^2 term:

u=x^2

du=2xdx

dv=e[-cx^2]dx

v=[itex]\sqrt{\frac{π}{c}}[/itex]
Try ##u=x## and ##dv=x e^{-cx^2}\,dx##.
 
  • Like
Likes 1 person
  • #7
The differentiating under the integral sign is a good trick to pick up. For some reason it seems to never be taught in calc classes.

And the Gaussian intergrals come up ALL the time in physics.

It's interesting to think a little bit and figure out how to solve Gauss's Probability Intergral. Books seem to just give the answer directly so one night I decided to figure out how you could get it and after thinking a little I did this:

You have $$I=\int_0^\infty e^{-a x^2}\,dx=\frac{1}{2}\sqrt{\frac{\pi}{a}}.$$

Now imagine you took $$I^2$$ so we have $$I^2=\int_0^\infty e^{-a x^2}\,dx\int_0^\infty e^{-a y^2}\,dy=\int_0^\infty\int_0^\infty e^{-a (x^2 + y^2)}\,dx dy.$$

Now this is integrating e^{-etc.} over the surface of the Cartesian coordinate plane (although we are keeping x and y to positive values only so each coord is only intergrated over half) but how about we switch to polar coordinates instead?

And you can figure that from a right triangle with x^2 and y^2 edges and r^2 hypotenuse so we have our x^2 + y^2 term going to r^2.

And then imagine circles going around centered on the origin and the space between two going radially out is dr and around the circle you have dθ. To go all the way around the circle is 2 pi rad but draw a slice and you see that as r increases your dθ will need to scale as the circumferences of each circles increases, unit radius is 2pi and circumference is 2pi r and dθ scales up linearly with r so use r dθ.

Anyway we run r from 0 to ∞ and θ from 0 to 2 pi so we cover the whole plane.

so now we have $$=\int_0^\infty\int_0^{2 \pi} e^{- a r^2} r d\theta dr.$$
Then we get $$=\int_0^\infty e^{- a r^2} 2 \pi r dr = -\frac{\pi}{a} e^{-a r^2}$$ evaluated at ∞ and 0 so $$=0 + \frac{\pi}{a} = I^2$$ but don't forget that we covered the entire plane here but in the original we had cut each variable to only half plane so don't forget to toss in the $$\frac{1}{2} * \frac{1}{2} = \frac{1}{4}$$ factor so we get $$I^2 = \frac{\pi}{4 a}$$ so $$I = \frac{1}{2}\sqrt{\frac{\pi}{a}}.$$
 
Last edited:
  • Like
Likes 1 person
  • #8
I came across two videos that went over the solution to this integral as I was trying to solve the problem. Neither of them explained it in such an intuitive way. This makes sense, thank you!
 

FAQ: Integral x^2*e^(-x^2) running into error function

What is the integral of x^2*e^(-x^2)?

The integral of x^2*e^(-x^2) is a special function called the error function, denoted by erf(x). It is defined as the integral from 0 to x of the Gaussian function e^(-t^2).

How do we compute the error function?

The error function cannot be expressed in terms of elementary functions and thus cannot be computed using basic algebraic methods. It is typically calculated using numerical integration techniques or approximations using series expansions.

What is the significance of the error function in science?

The error function is commonly used in statistics, physics, and engineering to describe the probability distribution of a Gaussian or normal distribution. It is also used to solve differential equations in physics and to model diffusion processes in chemistry and biology.

How does the error function relate to the complementary error function?

The complementary error function, denoted by erfc(x), is closely related to the error function erf(x). It is defined as 1-erf(x) and represents the probability of a value falling outside of a certain range in a normal distribution. It is commonly used in statistical and engineering applications.

Can the error function be extended to complex numbers?

Yes, the error function can be extended to complex numbers using the complex error function, denoted by w(z). It is defined as the integral of e^(-t^2) from 0 to z, where z is a complex number. The complex error function has various applications in mathematical physics and signal processing.

Similar threads

Back
Top