Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Help with integral of a gaussian function

  1. Nov 16, 2011 #1
    Hi all!

    I'm curious as to how one would go about actually computing this integral

    [tex] \int_0^\pi \exp(\frac{-x^2}{2c^2})\sin(\frac{m\pi x}{2}) dx [/tex]

    I start off by using integration by parts but im unsure how to solve this integral

    [tex] v = \int_0^\pi \exp(\frac{-x^2}{2c^2}) dx [/tex]

    Any help would be greatly appreciated
    Max
     
  2. jcsd
  3. Nov 16, 2011 #2
    Note that [itex]\int[/itex]exp(-ax[itex]^{2}[/itex])dx x [itex]\int[/itex]exp(-ay[itex]^{2}[/itex])dy = [itex]\int[/itex][itex]\int[/itex]exp{-a[x[itex]^{2}[/itex]+y[itex]^{2}[/itex]]}dxdy.

    Then change to polar coordinates.
     
  4. Nov 16, 2011 #3
    Note that a lot of integrals of that form (including the normal probability density function) don't have solutions in closed form.
     
  5. Nov 16, 2011 #4

    Mute

    User Avatar
    Homework Helper

    I don't think the OP is doing the integral you think he's doing.

    You're not really going to have much luck with that integral. Without the sine, the integral can only be expressed in terms of the error function, but the error function is defined by

    [tex]\mbox{erf}(x) = \frac{2}{\sqrt{\pi}} \int_0^x dt~e^{-t^2},[/tex]

    so you haven't gained much except that you know you can express it as the error function, which mathematica, matlab, etc., have code to compute.

    If you through the sine back in there, that just makes it worse. wolframalpha calculates the integral in terms of functions related to the error function. I imagine the way it does this is to use Euler's identity and write

    [tex]\sin x = \frac{e^{ix}-e^{-ix}}{2i},[/tex]

    and then complete the square in the exponential, but there's some trickiness associated with that because you'll be introducing imaginary numbers into the limits of the integral. That's not really a problem if you know contour integrals and complex analysis, but if you don't writing the integral that way isn't really going to help you much.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Help with integral of a gaussian function
  1. Gaussian Function (Replies: 5)

  2. Gaussian functions? (Replies: 7)

  3. Gaussian Integration (Replies: 1)

Loading...