Re: NInegrate Bug

*To*: mathgroup at smc.vnet.net*Subject*: [mg116573] Re: NInegrate Bug*From*: Alexey <lehin.p at gmail.com>*Date*: Sun, 20 Feb 2011 05:26:10 -0500 (EST)*References*: <ijispp$2dp$1@smc.vnet.net>

On 17 =D1=84=D0=B5=D0=B2, 15:20, "Kurt TeKolste" <tekol... at fastmail.net> wrote: > Are the conditions under which the incorrect answer is returned known so > that a practitioner can implement a workaround of the form > > fixedNintegrate[function_,bounds_]:= > =C2 If[ conditions[function], > =C2 NIntegrate[function[t]*Sign[t],bounds],NIntegrate[function[t],bounds]] > > and be confident that one's analysis is not scrogged? At least in the case of NIntegrate[Sin[x^2], {x, -5, -2}] and similar switching symbolic preprocessing off does the trick: In[15]:= f[x_?NumericQ] := Sin[x^2] NIntegrate[f[x], {x, -5, -2}] Out[16]= -0.276859 In[6]:= NIntegrate[Sin[x^2], {x, -5, -2}, Method -> {"SymbolicPreprocessing", "SymbolicProcessing" -> 0}] Out[6]= -0.276859