Why does integrate.quad(lambda x: x*exp(-x**2/2)/sqrt(2*pi), 0.0, 100000) give 0?

£可爱£侵袭症+ 提交于 2019-12-02 07:47:10

For x larger than approx. 39, exp(-x**2/2) gives 0.0. When the upper limit of integration is 100000, the fraction of the interval of integration where the function is nonzero is so small that the quad algorithm never sees it. As far as quad is concerned, the function is identically 0.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!