MathGroup Archive 2003

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

Search the Archive

Re: Integrate...

  • To: mathgroup at smc.vnet.net
  • Subject: [mg44331] Re: Integrate...
  • From: "Curt Fischer" <crf3 at po.cwru.edu>
  • Date: Wed, 5 Nov 2003 10:01:19 -0500 (EST)
  • References: <bo5sl7$nr$1@smc.vnet.net> <bo7pur$aod$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

Forgive my top-posting.  To further support Jen's point, here're the results
of your calculations in Mathematica 5.0 (on Win XP):

In[24]:=
Integrate[Abs[Cos[r] + Sin[r]], {r, 2.35, 2.36}]
Out[24]=
0.000037373\[InvisibleSpace] + 0. \[ImaginaryI]

In[25]:=
Integrate[Abs[1.0*Cos[r] + 1.0*Sin[r]], {r, 2.35, 2.36}]
Out[25]=
-2.82839 + 0. \[ImaginaryI]

In[26]:=
NIntegrate[Abs[1.0*Cos[r] + 1.0*Sin[r]], {r, 2.35, 2.36}]
Out[26]=
0.0000373731

NIntegrate works better if you are interested in numeric evaluation.

--
Curt Fischer





"Jens-Peer Kuska" <kuska at informatik.uni-leipzig.de> wrote in message
news:bo7pur$aod$1 at smc.vnet.net...
> Hi,
>
> don't mix approximated numbers like 1.0 with symbolic
> computations.
> Use Rationalize[] to make exact numbers
> if you only have floating points.
>
> Regards
>   Jens
>
> Sampo Smolander wrote:
> >
> > Does anybody know why
> >
> >    Integrate[Abs[1.0*Cos[r] + 1.0*Sin[r]], {r, 2.35, 2.36}]
> >
> > gives
> >
> >    -2.82839
> >
> > whereas without those 1.0's,
> >
> >    Integrate[Abs[Cos[r] + Sin[r]], {r, 2.35, 2.36}]
> >
> > gives the correct
> >
> >    0.000037373
> >
> > ?
> >
> > (I'm running Mathematica 4.1 on win98.)
> >
> > --
> > Sampo Smolander ............... http://www.cs.helsinki.fi/u/ssmoland/
> > Rolf Nevanlinna Institute, University of Helsinki ...................
>
> ~
> ~
>



  • Prev by Date: Re: Simple Question -- Incrementing All Elemnts in A list by 1
  • Next by Date: Re: now, while loops construct errors
  • Previous by thread: Re: Integrate...
  • Next by thread: Fw: Integrate...