# Help with integral of a gaussian function

• maxtor101
In summary, the conversation discusses the difficulty of computing the integral \int_0^\pi \exp(\frac{-x^2}{2c^2})\sin(\frac{m\pi x}{2}) dx and the possible approaches to solving it, including using integration by parts and converting to polar coordinates. However, it is noted that the integral may not have a solution in closed form and can only be expressed in terms of the error function. The conversation also mentions using Euler's identity and contour integrals to solve the integral, but notes that this may be difficult for those unfamiliar with complex analysis.
maxtor101
Hi all!

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

$$\int_0^\pi \exp(\frac{-x^2}{2c^2})\sin(\frac{m\pi x}{2}) dx$$

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

$$v = \int_0^\pi \exp(\frac{-x^2}{2c^2}) dx$$

Any help would be greatly appreciated
Max

Note that $\int$exp(-ax$^{2}$)dx x $\int$exp(-ay$^{2}$)dy = $\int$$\int$exp{-a[x$^{2}$+y$^{2}$]}dxdy.

Then change to polar coordinates.

Note that a lot of integrals of that form (including the normal probability density function) don't have solutions in closed form.

grzz said:
Note that $\int$exp(-ax$^{2}$)dx x $\int$exp(-ay$^{2}$)dy = $\int$$\int$exp{-a[x$^{2}$+y$^{2}$]}dxdy.

Then change to polar coordinates.

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

maxtor101 said:
Hi all!

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

$$\int_0^\pi \exp(\frac{-x^2}{2c^2})\sin(\frac{m\pi x}{2}) dx$$

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

$$v = \int_0^\pi \exp(\frac{-x^2}{2c^2}) dx$$

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

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

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

$$\sin x = \frac{e^{ix}-e^{-ix}}{2i},$$

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.

Hello Max,

Thank you for reaching out for help with this integral. The integral you have provided is known as the Gaussian integral and it is commonly used in probability and statistics. It can be a bit tricky to solve, but there are a few different methods you can use to compute it. One approach is to use the substitution u = x/c, which will simplify the integral to:

v = \int_0^\pi \exp(\frac{-u^2}{2}) du

This integral can then be solved using techniques from calculus, such as integration by parts or the substitution method. Another approach is to use a series expansion for the exponential term and then integrate each term separately. This can be a bit more tedious, but it can also be a good exercise in using series expansions.

I hope this helps and good luck with solving the integral! Remember to always check your work and make sure your answer makes sense in the context of the problem. Let me know if you have any further questions or if you need any clarification. Happy computing!

Best,

## 1. What is a gaussian function?

A gaussian function, also known as a normal distribution, is a mathematical function that describes a symmetrical bell-shaped curve. It is commonly used in statistics to represent the distribution of a set of data. In other words, it shows how likely a certain value is to occur within a given range.

## 2. Why is the integral of a gaussian function important?

The integral of a gaussian function is important because it allows us to calculate the area under the curve, which is useful in various fields such as statistics, physics, and engineering. It is also used in probability calculations, as the total area under the curve represents the total probability of all possible outcomes.

## 3. How do you solve for the integral of a gaussian function?

To solve for the integral of a gaussian function, you can use the technique of integration by parts or the substitution method. Alternatively, you can use a mathematical software or calculator to obtain the numerical value of the integral.

## 4. What are some real-life applications of the integral of a gaussian function?

The integral of a gaussian function has many real-life applications, such as in finance to model stock prices, in signal processing to filter out noise, and in physics to describe the motion of particles. It is also used in image processing to enhance and analyze images.

## 5. Are there any limitations to using a gaussian function?

While gaussian functions are used to model many natural phenomena, they may not always accurately represent complex or non-linear systems. In addition, gaussian functions assume that the data is normally distributed, which may not always be the case in real-life scenarios. It is important to carefully consider the appropriateness of using a gaussian function before applying it in any analysis.

• General Math
Replies
3
Views
201
• General Math
Replies
2
Views
1K
• General Math
Replies
1
Views
734
• General Math
Replies
6
Views
922
• General Math
Replies
2
Views
2K
• General Math
Replies
4
Views
393
• General Math
Replies
18
Views
2K
• General Math
Replies
13
Views
2K
• Quantum Physics
Replies
2
Views
511
• General Math
Replies
2
Views
1K