1. Not finding help here? Sign up for a free 30min 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 of x^n e^(-x^2)

  1. Oct 9, 2011 #1
    1. The problem statement, all variables and given/known data
    Doing calculations for quantum mechanics, I have stumbled upon several integrals which I cannot solve by hand.
    All of these have the form:
    [tex]
    \int x^n exp[-x^2] dx
    [/tex]
    For instance, when calculating the expectation value for x^2, the integral reduces to
    [tex]
    \int_{-\infty}^{\infty} x^2 exp[-x^2] dx
    [/tex]
    multiplied by some constant factors.

    2. Relevant equations
    There is a standard integral given in the back of my book (Griffiths):
    [tex]
    \int_{0}^{\infty} exp[-\frac{x^2}{a^2}] dx = n! a^{n-1}
    [/tex]
    However, when I apply this to n=2, I arrive at a different answer than when I use Mathematica to compute it.

    Also, when I try WolframAlpha, it returns a function that involves the error function without explaining how it got there.
    3. The attempt at a solution

    There seems to be no way of simplifying or rearranging the integral. Integration by parts only works for taking the derivative of the exponential part, but that leaves higher and higher orders of n. Making substitution for x^2 still leaves a factor x in the denominator since u = x^2 implies du = 2 x dx. The result then would give a square root of u in the integral, which I cannot solve by integration by parts.
    Is there any way to find an explicit formula for this integral?
    1. The problem statement, all variables and given/known data



    2. Relevant equations



    3. The attempt at a solution
     
  2. jcsd
  3. Oct 9, 2011 #2

    SteamKing

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper

    For the case where n = 2, I would recommend u = x and dv = x * EXP (-x^2) for integration by parts.

    IIRC, some of the integrals, like for n = 2, have closed form solutions. Others, however, must be evaluated numerically.
     
  4. Oct 9, 2011 #3
    Thanks. Hence I arrive at the answer for n=2:
    [tex]
    \int_{-\infty}^{\infty} x^2 exp(-x^2) dx = 1/2 \int_{-\infty}^{\infty} exp(-x^2) dx - 1/2 [exp(-x^2)]_{-\infty}^{\infty} = \sqrt{\pi}/2
    [/tex]
     
  5. Oct 9, 2011 #4
    Integrals of the form you describe are particularly simple when n is odd. You can then use symmetry arguments to solve the integral by inspection. Do you follow me? (Hint: think of the integrand, is it even/odd?)
     
  6. Oct 9, 2011 #5
    The exponential factor is the gaussian distribution and is even. If n is odd, x^n is odd and therefore the integrand is odd. Integrating from -infinity to infinity will then always give 0.
     
  7. Oct 9, 2011 #6
    Also, I have noticed that for higher powers of n, in principle you van always use integration by parts to reduce the power by 2 each step, so n=4 is easily computed.
    Side question: why is
    [tex]
    [x^n exp(-x^2)]_{-\infty}^{\infty} = 0
    [/tex]?
    Or with other words, why is
    [tex]
    \lim_{x \rightarrow \infty} x^n exp(-x^2) = 0
    [/tex]?
     
  8. Oct 9, 2011 #7

    vela

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    The exponential dies off faster than any polynomial grows, so it always wins in the limit. You can show the limit is 0 by simply applying the Hospital rule repeatedly to xn/e-x2. When you differentiate enough times, the numerator will become 0, but the exponential will still be around.
     
  9. Oct 9, 2011 #8

    vela

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    By the way, another trick you can use to evaluate integrals like this is to note that
    [tex]x^{2n}e^{-\alpha x^2} = (-1)^n\frac{d^n}{d\alpha^n}e^{-\alpha x^2}[/tex]so that
    [tex]\int_{-\infty}^\infty x^{2n}e^{-\alpha x^2}\,dx = \int_{-\infty}^\infty (-1)^n\frac{d^n}{d\alpha^n}e^{-\alpha x^2}\,dx = (-1)^n\frac{d^n}{d\alpha^n}\int_{-\infty}^\infty e^{-\alpha x^2}\,dx[/tex]At the end, set [itex]\alpha = 0[/itex] to get the result you want.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Integral of x^n e^(-x^2)
  1. Integrating e^-ax^2 (Replies: 7)

  2. Integrate e^(8x^2) (Replies: 3)

Loading...