1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

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

  1. Sep 7, 2014 #1
    1. The problem statement, all variables and given/known data

    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 ∞

    2. Relevant equations

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

    3. 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: Sep 7, 2014
  2. jcsd
  3. Sep 7, 2014 #2

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    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)##?
     
  4. Sep 7, 2014 #3

    vela

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    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.
     
  5. Sep 7, 2014 #4

    SteamKing

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper

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

    http://en.wikipedia.org/wiki/Gamma_function
     
  6. Sep 7, 2014 #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: Sep 7, 2014
  7. Sep 7, 2014 #6

    vela

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    Try ##u=x## and ##dv=x e^{-cx^2}\,dx##.
     
  8. Sep 7, 2014 #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: Sep 7, 2014
  9. Sep 7, 2014 #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!
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: Integral x^2*e^(-x^2) running into error function
  1. Error-function integral (Replies: 11)

Loading...