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!

Homework Help: Integrating Gaussian functions with erf

  1. Oct 19, 2008 #1
    1. The problem statement, all variables and given/known data

    I'm doing a problem on Gaussian functions (there are other constants to make it interesting, but I've removed them here):

    1. [tex] \int_{0}^{x} e^{-x^2} dx [/tex]
    2. [tex] \int_{0}^{x} x e^{-x^2} dx [/tex]
    3. [tex] \int_{0}^{x} x^2 e^{-x^2} dx [/tex]

    We know that

    [tex] erf(z) = \frac{2}{\sqrt{\pi}} \int_{0}^{x} e^{-x^2} dx [/tex]

    I can use the error function to solve 1. For 2, I integrate by parts:

    [tex] \int_{0}^{x} x e^{-x^2} dx = \big[ \frac{\sqrt{\pi}}{2} x.erf(x) \big]_0^{x} - \int_{0}^{x} e^{-x^2} dx =\frac{\sqrt{\pi}}{2} x . erf(x) - \frac{\sqrt{\pi}}{2} . erf(x) [/tex]

    Now I want to integrate part 3, and an obvious route to go is integration by parts, but is there a simpler way? Surely I'm not going to do IBP if I was given an integral of an even higher power? I'm doing a question in a (physics) textbook with all the constants and that to make it interesting, but it really boils down to this. My book gives a one line working, which is as follows:

    [tex] \int_{0}^{32} x^2 e^{-x^{2}/4} = - \frac{64}{256} + 2 \sqrt{\pi} erf[16] [/tex]

    2. Relevant equations

    Is there a simple, obvious way to do this integral without IBP? I do know that

    [tex] \int_{-\infty}^{\infty} x^{2n} e^{-x^2} dz = \sqrt{\pi} \frac{1.3.5...(2n-1)}{2^n} [/tex]

    3. The attempt at a solution

    Well, I tried doing the integration by parts, which was fine, but seeing as my book provides a one-line working for this integral, I figure it should be even easier than that.
    1. The problem statement, all variables and given/known data

    2. Relevant equations

    3. The attempt at a solution
    Last edited: Oct 20, 2008
  2. jcsd
  3. Oct 19, 2008 #2
    Hey, what happened to my Tex??

Share this great discussion with others via Reddit, Google+, Twitter, or Facebook