Re: NInegrate Bug
- To: mathgroup at smc.vnet.net
- Subject: [mg116507] Re: NInegrate Bug
- From: "Kurt TeKolste" <tekolste at fastmail.net>
- Date: Thu, 17 Feb 2011 05:20:14 -0500 (EST)
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_]:=
If[ conditions[function],
NIntegrate[function[t]*Sign[t],bounds],NIntegrate[function[t],bounds]]
and be confident that one's analysis is not scrogged?
Kurt TeKolste
On Wed, 16 Feb 2011 04:36 -0500, "Andrew Moylan" <amoylan at wolfram.com>
wrote:
> No, sorry. The fix is not available as a patch for version 7.
>
> Andrew Moylan
> Wolfram Research
>
>
>
> ----- Original Message -----
> From: "Kurt TeKolste" <tekolste at fastmail.net>
> To: "Andrew Moylan" <amoylan at wolfram.com>, "Mathgroup"
> <mathgroup at smc.vnet.net>
> Sent: Tuesday, February 15, 2011 11:47:43 PM
> Subject: [mg116466] Re: [mg116439] NInegrate Bug
>
> Comforting, but expensive. Do you have a patch for 7?
>
> On Tue, 15 Feb 2011 23:17 +1100, "Andrew Moylan" <amoylan at wolfram.com>
> wrote:
> > Hi Kurt,
> >
> > You should not encounter any problem in Mathematica 8. E.g.
> >
> > In[1]:= NIntegrate[Sin[x^2], {x, -5, -2}]
> >
> > Out[1]= -0.276859
> >
> > In[2]:= N[Integrate[Sin[x^2], {x, -5, -2}]]
> >
> > Out[2]= -0.276859
> >
> > Andrew Moylan
> > Wolfram Research
> >
> >
> >
> > On Feb 15, 2011, at 10:34 PM, Kurt TeKolste wrote:
> >
> > > Has there been a resolution of the NIntegrate bug?
> > >
> > > Apparently NIntegrate produces the negative of the right answer for
> > > integrations that start and end to the left of zero -- some of the time.
> > > (Cos[x] and Sin[x^2] get the wrong result, Sin[x] is good).
> > >
> > > Since it is not clear what criterion Mathematica uses in deciding to
> > > give the wrong answer it is not clear when to use NIntegrate[] and when
> > > to use NIntegrate[*Sign[independent variable]].
> > >
> > > And this calls into question any results for analysis that uses
> > > NIntegrate -- not a happy situation.
> > >
> > > Kurt TeKolste
> > >
> >
> >
>
>