NIntegrate fails to converge near a point that is not inside my definite integral?

ぃ、小莉子 提交于 2019-12-04 04:43:13

The <<156>> does not mean that the integral is being evaluated at x=156. <<>> is called Skeleton and is used to indicate that a large output was suppressed. From the documentation:

Skeleton[n] represents a sequence of n omitted elements in an expression printed with Short or Shallow. The standard print form for Skeleton is <<n>>.


Coming to your integral, here's the error that I get:

So you can see that this long number was suppressed in your case (depending on your preferences). The last >> is a link that takes you to the corresponding error message in the documentation.

If you try the advice in the document, which is to increase MaxRecursion, you'll eventually get a new error ::slwcon

So this now tells you that either your WorkingPrecision is too small or that you have a singularity (which is brought on by a small working precision). Increasing WorkingPrecision to 200 gives the following output:


You can look a little further into the nature of your expressions.

num = Numerator@Expr@3;
den = Denominator@Expr@3;
Plot[{num, den}, {x, 0, 1}, WorkingPrecision -> 100, PlotRange -> All]

So beyond 0.7ish, your expression has the potential for serious stability issues, resulting in singularities. It is the numerator rather than the denominator, that requires high precision to converge to the right value.

num /. x -> 0.99
num /. x -> 0.99`100

Out[1]= -0.015625
Out[2]= 1.2683685178049112809413795626911317545171610885215799438968\
06379991565*10^-14

den /. x -> 0.99
den /. x -> 0.99`100

Out[3]= 1.28786*10^-14
Out[4]= 1.279743968014714505561671861369465844697720803022743298030747945923286\
915425027352809730413954909*10^-14

You can see here the difference between the numerator and denominator when you don't have sufficient precision, causing a near singularity.

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