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

MathGroup Archive 2007

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

Search the Archive

Discrepancy between Integrate and NIntegrate

  • To: mathgroup at smc.vnet.net
  • Subject: [mg83385] Discrepancy between Integrate and NIntegrate
  • From: chuck009 <dmilioto at comcast.com>
  • Date: Mon, 19 Nov 2007 06:11:54 -0500 (EST)

I first use Integrate and then evaluate the results with  n=3 and the limits t=pi and t=0.  I then numerically evaluate the same integrand and the results are very different.  Can anyone help me with this problem?

Clear[n]
val1 = n*Pi*I*Integrate[(Cos[n*Pi*Exp[I*t]]/
            Cosh[n*Pi*Exp[I*t]])*Exp[I*t], t]
N[(val1 /. {n -> 3, t -> Pi}) - (val1 /. {n -> 3, t -> 0})]

n = 3; 
i1 = NIntegrate[n*Pi*I*(Cos[n*Pi*Exp[I*t]]/Cosh[n*Pi*Exp[I*t]])*
       Exp[I*t], {t, 0, Pi}]

-1.2522017302861566 + 0.*I
7757.4213022137155 + 0.*I


  • Prev by Date: Mathematica 6.0 and SELinux?
  • Next by Date: Dynamic InputField wont work with Symbolized variables - is there a solution?
  • Previous by thread: Mathematica 6.0 and SELinux?
  • Next by thread: Re: Discrepancy between Integrate and NIntegrate