Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

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

Search the Archive

Integrate vs NIntegrate

  • To: mathgroup at smc.vnet.net
  • Subject: [mg89129] Integrate vs NIntegrate
  • From: "Armen Kocharyan" <armen.kocharyan at gmail.com>
  • Date: Mon, 26 May 2008 06:23:35 -0400 (EDT)

Dear group,


Why do I get different results (Res1, Res2) in Mathematica 6.0.1.0?


*q=-1/2; a=0; b=3;*

*h[x_]=(1+x^3)^q;*

*f[x_]=Integrate[h[x],x];*

*Res1=N[f[b]-f[a]]*

*Res2=NIntegrate[h[x],{x,a,b}]*

**

*Res1 = -2.55387-2.42865 i*

*Res2 = 1.65267*



I'm assuming that Res2 is the correct answer.



Regards,

Armen



  • Prev by Date: Re: Re: Solve's Strange Output
  • Next by Date: Re: Multiplication of matrices
  • Previous by thread: NDSolve from negative to positive time
  • Next by thread: Re: Integrate vs NIntegrate