Help with integral of a gaussian function

  • Thread starter maxtor101
  • Start date
  • #1
24
0
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
 

Answers and Replies

  • #2
993
13
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.
 
  • #3
806
23
Note that a lot of integrals of that form (including the normal probability density function) don't have solutions in closed form.
 
  • #4
Mute
Homework Helper
1,388
10
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.
I don't think the OP is doing the integral you think he's doing.

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
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.
 

Related Threads on Help with integral of a gaussian function

  • Last Post
Replies
23
Views
22K
Replies
3
Views
3K
  • Last Post
Replies
1
Views
2K
  • Last Post
Replies
1
Views
5K
  • Last Post
Replies
5
Views
13K
  • Last Post
Replies
7
Views
3K
Replies
8
Views
769
Replies
4
Views
360
Replies
1
Views
965
  • Last Post
Replies
1
Views
3K
Top