views:

97

answers:

1

I'm interested in calculation of Improper Integral for a function. Particularly it's a Gauss Integral. Using a numerical integration does make sense for a definite integrals but how should I deal with improper integrals ?

Is there any was to extrapolate the function "around" negative infinity or should I just remove this part and start integration from some particular value because cumulative sum near "negative infinity" is almost non-existent for Gauss integral? Perhaps there are some algorithms that I'm not aware about.

+2  A: 

In C++, you can use the Boost statistics library, which includes routines for working with normal distributions (closely related to Gaussian integrals). In particular, the cumulative distribution accessor function can be used to calculate the improper integrals you're interested in.

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

Jim Lewis