Re: SingularityDepth option to NIntegrate in Mathematica 6

*To*: mathgroup at smc.vnet.net*Subject*: [mg77779] Re: SingularityDepth option to NIntegrate in Mathematica 6*From*: antononcube <antononcube at gmail.com>*Date*: Sat, 16 Jun 2007 03:59:22 -0400 (EDT)*References*: <f4ojk5$67p$1@smc.vnet.net>

> Why is the SingularityDepth option no longer required / useful? Since NIntegrate has a number of methods to which SingularityDepth does not apply, SingularityDepth is a method suboption. It is a suboption of the methods GlobalAdaptive and LocalAdaptive. Here is an example: NIntegrate[1/Sqrt[x],{x,0,1},Method- >{"GlobalAdaptive","SingularityDepth"->Infinity}] > Does setting the value of SingularityDepth have any effect? Yes, setting the SingularityDepth has effect on the evaluation (for backward compatibility), as it can be seen from the results below: In[104]:= k = 0;NIntegrate[1/Sqrt[x], {x, 0, 1}, EvaluationMonitor :> k ++];k Out[106]= 132 In[107]:= k = 0;NIntegrate[1/Sqrt[x], {x, 0, 1}, SingularityDepth -> 10, EvaluationMonitor :> k++];k During evaluation of In[107]:= NIntegrate::ncvb: NIntegrate failed to \ converge to prescribed accuracy after 9 recursive bisections in x \ near {x} = {0.00193758}. NIntegrate obtained 1.997237951127453` and \ 0.004238324551439297` for the integral and error estimates. >> Out[109]= 209 If, for example, a non-adaptive integration algorithm is used, then specifying SingularityDepth does not have effect: In[117]:= k = 0; NIntegrate[1/Sqrt[x], {x, 0, 1}, Method -> DoubleExponential, EvaluationMonitor :> k++];k Out[119]= 33 In[120]:= k = 0; NIntegrate[1/Sqrt[x], {x, 0, 1}, SingularityDepth -> 10, Method -> DoubleExponential, EvaluationMonitor :> k++];k Out[122]= 33 Anton Antonov, Wolfram Research, Inc.