MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: NInegrate Bug


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


  • Prev by Date: Re: weibull plot on weibull scaled paper
  • Next by Date: Re: Interpolation difficulty
  • Previous by thread: Re: NInegrate Bug
  • Next by thread: ndsolve of coupled equation