MathGroup Archive 2009

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

Search the Archive

NIntegrate & Integrate

  • To: mathgroup at
  • Subject: [mg100048] NIntegrate & Integrate
  • From: Konstantin <kzhuravl at>
  • Date: Fri, 22 May 2009 01:47:50 -0400 (EDT)

Hello everybody,

Easy question for Mathematica. Evaluate definite integral: 2*Cos[x] from 8.76 to 4.56. 

I have evaluated it three different ways: Integrate, NIntegrate and Integral sign from basic math input palette.

Here is the code(without Integral sign from basic math input palette):
    {a, b} = {8.76, 4.56};
    NIntegrate[2*Cos[x], {x, a, b}]
    Integrate[2*Cos[x], {x, a, b}]

My output is:

The right answer is -3.21059. 

Why does NIntegrate gave me wrong answer? Any help is appreciated. Thanks


  • Prev by Date: Re: Rotating a list of 3D point coordinates in one shot
  • Next by Date: Trying to get closed form solution to simple recurrence.
  • Previous by thread: Re: Can I determine which method NMinimize used when Method->Automatic?
  • Next by thread: Re: NIntegrate & Integrate