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: Integration of a gaussian function

  1. Aug 27, 2011 #1
    Hey, all. I need help computing a particular integral that's come up in my quantum mechanics homework (Griffith 1.3 for anyone who's interested). It involves integration of a gaussian function:

    [tex]\sqrt{\frac{\lambda}{\pi}}\int_{-\infty}^{+\infty} \! {x}{e^{{-\lambda}{(x-a)^2}}} \, dx[/tex]

    Where [tex]\lambda[/tex] and [tex]a[/tex] are positive real constants.

    For the life of me I cannot figure out how to compute that integral... u-substitution doesn't seem to be an option, and integration by parts just makes things more confusing. Can someone please help me?
  2. jcsd
  3. Aug 27, 2011 #2

    Ben Niehoff

    User Avatar
    Science Advisor
    Gold Member

    You could do it easily if you had

    [tex]\sqrt{\frac{\lambda}{\pi}}\int_{-\infty}^{+\infty} \! {(x-a)}{e^{{-\lambda}{(x-a)^2}}} \, dx[/tex]
    right? Because then it would be a simple substitution. So write

    [tex]\sqrt{\frac{\lambda}{\pi}}\int_{-\infty}^{+\infty} \! {x}{e^{{-\lambda}{(x-a)^2}}} \, dx = \sqrt{\frac{\lambda}{\pi}}\int_{-\infty}^{+\infty} \! {(x-a)}{e^{{-\lambda}{(x-a)^2}}} \, dx + \sqrt{\frac{\lambda}{\pi}}\int_{-\infty}^{+\infty} \! {a}{e^{{-\lambda}{(x-a)^2}}} \, dx[/tex]
    and think about how to do the second piece. It should look familiar.
  4. Aug 27, 2011 #3
    I hadn't thought of that! That's a clever trick. Am I correct in thinking the second integral simplifies to:

    [tex]{\sqrt{\frac{\lambda}{\pi}}\int_{-\infty}^{+\infty} \! {a}{e^{{-\lambda}{(x-a)^2}}} \, dx}={a}[/tex]

    And so the integral:

    [tex]\sqrt{\frac{\lambda}{\pi}}\int_{-\infty}^{+\infty} \! {x}{e^{{-\lambda}{(x-a)^2}}} \, dx[/tex]

    is simply the first integral you wrote down (solvable by u-substitution) + a?
  5. Aug 27, 2011 #4


    User Avatar
    Homework Helper

    How did you obtain a from that? I'm not saying that's wrong, but you need to show how you got it.
  6. Aug 27, 2011 #5
    I'm sorry! Here's the process I went through:

    [tex]{\sqrt{\frac{\lambda}{\pi}}\int_{-\infty}^{+\infty} \! {a}{e^{{-\lambda}{(x-a)^2}}} \, dx}[/tex]

    Because a is a constant, it can be taken out of the integral:

    [tex]{{a}\sqrt{\frac{\lambda}{\pi}}\int_{-\infty}^{+\infty} \! {e^{{-\lambda}{(x-a)^2}}} \, dx}[/tex]

    Then I performed a u-substitution:

    [tex]{u ={x-a}},{du = dx}[/tex]

    [tex]{{a}\sqrt{\frac{\lambda}{\pi}}\int_{-\infty}^{+\infty} \! {e^{{-\lambda}{u^2}}} \, du}[/tex]

    I then used a second u-substitution:

    [tex]{v = {\sqrt{\lambda}u}}, {\frac{dv}{\sqrt{\lambda}} = du}[/tex]

    [tex]{{a}\sqrt{\frac{1}{\pi}}\int_{-\infty}^{+\infty} \! {e^{{-\lambda}{v^2}}} \, dv}[/tex]

    The integral is the well-known Gaussian integral:

    [tex]{\int_{-\infty}^{+\infty} \! {e^{{-\lambda}{v^2}}} \, dv}={\sqrt{\pi}}[/tex]

    And so I have:

  7. Aug 28, 2011 #6
    Now I'm a bit confused, though... I came across an integral on Wikipedia's list of integrals for exponential functions, and they have this:

    [tex]\int_{-\infty}^{\infty} \! {x}{e^{-a{(x-b)^2}}} \ dx={b\sqrt{\frac{\pi}{a}}}[/tex]

    How does the integral we've broken into two parts become that?
  8. Aug 30, 2011 #7
    Is anyone able to help? This is seriously stumping me.
  9. Aug 30, 2011 #8

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    You have already been given a complete solution, but it does require some final work on your part.

    Last edited: Aug 30, 2011
  10. Aug 30, 2011 #9
    I'm sorry, but I'm having difficulty "seeing" this complete solution and how to work it.

    I understand what was said earlier, that:

    [tex]{\sqrt{\frac{\lambda}{\pi}} \int_{-\infty}^{+\infty} \! {x}{e^{-\lambda{(x-a)^2}}} \ dx} = {\sqrt{\frac{\lambda}{\pi}} \int_{-\infty}^{+\infty} \! {(x-a)}{e^{-\lambda{(x-a)^2}}} \ dx} + {\sqrt{\frac{\lambda}{\pi}} \int_{-\infty}^{+\infty} \! {a}{e^{-\lambda{(x-a)^2}}} \ dx}[/tex]

    It seems to me that the first integral is solvable by u-substitution:

    [tex]{u=(x-a)}, {du=dx}[/tex]
    [tex]{\sqrt{\frac{\lambda}{\pi}} \int_{-\infty}^{+\infty} \! {(x-a)}{e^{-\lambda{(x-a)^2}}} \ dx} = {\sqrt{\frac{\lambda}{\pi}} \int_{-\infty}^{+\infty} \! {u}{e^{-\lambda{u^2}}} \ dx}[/tex]

    The antiderivative of that integral is:

    Evaluating that antiderivative at the limits of negative and positive infinity seems to yield 0.

    Meanwhile, as I've shown about, the second integral can be solved by two round of u-substitution, yielding the constant a. Altogether, then:

    [tex]{\sqrt{\frac{\lambda}{\pi}} \int_{-\infty}^{+\infty} \! {x}{e^{-\lambda{(x-a)^2}}} \ dx}=a[/tex]

    However, that doesn't mesh with the definite integral identity I found online (shown in an earlier reply). Have I gone awry somewhere in my calculations, or is the identity I found incorrect?

    EDIT: Nevermind... I realized that in examining the integral identity I found in an integral table, I'd been neglecting to apply the constant in front of the integral. Once I did that, it all clicked and became equivalent to the answer I derived (with help) above. Thank you all so much. I apologize for being a bit dense toward the end.
    Last edited: Aug 31, 2011
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook