Incorrect integral calculation using numerical accounting

I'm interested in calculating Incorrect integral for a function. In particular, this is Gauss Integral . Using numerical integration makes sense for definite integrals, but how am I supposed to deal with improper integrals?

Is there any way to extrapolate the function "around" negative infinity, or should I just remove that part and start the integration from a certain value, because the sum near "negative infinity" is almost non-existent for the Gaussian integral? Perhaps there are some algorithms that I am not aware of.

+2


source to share


1 answer


In C ++, you can use the Boost statistics library , which includes routines for dealing with normal distributions (closely related to Gaussian integrals). In particular, the cumulative access distribution function can be used to calculate improper integrals that interest you.



Working with normal distributions this way is such a common operation that I'm sure you can find a comparable library function in most other languages. All you have to do is express the integration limit in terms of a Z-score, then take the cumulative distribution using that limit (maybe subtract that value from 1.0, depending on whether you integrate from -infinity or + infinity).

+2


source







All Articles