MathGroup Archive 2011

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

Search the Archive

Re: NInegrate Bug

  • To: mathgroup at
  • Subject: [mg116467] Re: NInegrate Bug
  • From: Bill Rowe <readnews at>
  • Date: Wed, 16 Feb 2011 04:36:12 -0500 (EST)

On 2/15/11 at 6:34 AM, tekolste at (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
>(Cos[x] and Sin[x^2] get the wrong result, Sin[x] is good).

You didn't say what version you found this issue with. But based
on the results I get below with Cos[x] and Sin[x^2] it appears
the issue has is not present in version 8

In[1]:= NIntegrate[Cos[x], {x, -3/2, 3/2}]

Out[1]= 1.99499

In[2]:= Integrate[Cos[x], {x, -3/2, 3/2}]

Out[2]= 2 sin(3/2)

In[3]:= % // N

Out[3]= 1.99499

In[4]:= NIntegrate[Sin[x^2], {x, -3/2, 3/2}]

Out[4]= 1.55648

In[5]:= Integrate[Sin[x^2], {x, -3/2, 3/2}]

Out[5]= Sqrt[2*Pi]*FresnelS[3/Sqrt[2*Pi]]

In[6]:= % // N

Out[6]= 1.55648

In[7]:= Integrate[Sin[x^2], x]

Out[7]= Sqrt[Pi/2]*FresnelS[Sqrt[2/Pi]*x]

In[8]:= $Version

Out[8]= 8.0 for Mac OS X x86 (64-bit) (November 6, 2010)

  • Prev by Date: Re: Another point about Mathematica 8.0
  • Next by Date: Re: Another point about Mathematica 8.0
  • Previous by thread: Re: NInegrate Bug
  • Next by thread: Re: NInegrate Bug