使用数值积分进行积分计算不当
我对函数的不正确积分的计算感兴趣。 特别是它是一个高斯积分。使用数值积分对于定积分确实有意义,但我应该如何处理不正确的积分?
是否有任何方法可以推断“围绕”负无穷大的函数,或者我应该删除这部分并从某个特定值开始积分,因为对于高斯积分来说,接近“负无穷大”的累积和几乎不存在?也许有一些我不知道的算法。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 C++ 中,您可以使用 Boost 统计库,其中包括处理正态分布的例程(与高斯积分密切相关)。特别是,累积分布访问器函数可用于计算您感兴趣的不正确积分。
以这种方式处理正态分布是一种常见的操作,我相信您可以在大多数其他语言中找到类似的库函数。您需要做的就是用 Z 分数表示积分限制,然后使用该限制获取累积分布(可能从 1.0 中减去该值,具体取决于您是否
从-无穷大或到+无穷大积分)。
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).