Re: NIntegrate & Integrate
- To: mathgroup at smc.vnet.net
- Subject: [mg100102] Re: NIntegrate & Integrate
- From: Erik Max Francis <max at alcyone.com>
- Date: Mon, 25 May 2009 06:13:33 -0400 (EDT)
- References: <gv7r1l$asp$1@smc.vnet.net>
Bill Rowe wrote: > On 5/22/09 at 1:47 AM, kzhuravl at mtu.edu (Konstantin) wrote: >> My output is: > >> 3.21059(NIntegrate) >> -3.21059(Integrate) > >> The right answer is -3.21059. > >> Why does NIntegrate gave me wrong answer? > > I cannot reproduce your results above. I get the correct value > by simply pasting your code up to the line for NIntegrate into a > fresh session. That is: > > In[1]:= {a, b} = {8.76, 4.56}; > NIntegrate[2*Cos[x], {x, a, b}] > > Out[2]= -3.21059 > > In[3]:= $Version > > Out[3]= 7.0 for Mac OS X x86 (64-bit) (February 19, 2009) I also get the right answer on: In[6]:= $Version Out[6]= "7.0 for Linux x86 (32-bit) (January 30, 2009)" -- Erik Max Francis && max at alcyone.com && http://www.alcyone.com/max/ San Jose, CA, USA && 37 18 N 121 57 W && AIM, Y!M, Skype erikmaxfrancis Being in love for real / It ain't like a movie screen -- India Arie