MathGroup Archive 2007

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

Search the Archive

Numerical integration

  • To: mathgroup at smc.vnet.net
  • Subject: [mg78761] Numerical integration
  • From: José Carlos Santos <jcsantos at fc.up.pt>
  • Date: Mon, 9 Jul 2007 01:30:38 -0400 (EDT)

Hi all:

I detected a problem concerning numerical integration under Mathematica
5.1. Consider this function:

h[t_] := Exp[I t](Exp[I t] - 1)Sec[Exp[I t] - 1]

If I compute:

N[Integrate[h[t], {t, 0, 2Pi}]]

I get -3.58642. But if I compute

N[Integrate[Re[h[t]], {t, 0, 2Pi}] + Integrate[Im[h[t]], {t, 0, 2Pi}]I]

instead of getting the same answer, I get -9.869604401106042 +
2.2377264147293624^(-16)I. Of course, the imaginary part doesn't bother
me, but why are the results so different? BTW the difference is equal
to 2*pi.

Best regards,

Jose Carlos Santos


  • Prev by Date: Re: Working with factors of triangular numbers.
  • Next by Date: Re: Re: Mathematica 6.0.1 Now Available
  • Previous by thread: Re: A Note of Thanks
  • Next by thread: Re: Numerical integration