Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2003
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2003

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

Search the Archive

Re: Integrate...

  • To: mathgroup at smc.vnet.net
  • Subject: [mg44374] Re: [mg44257] Integrate...
  • From: Dr Bob <drbob at bigfoot.com>
  • Date: Fri, 7 Nov 2003 05:16:17 -0500 (EST)
  • Organization: Interstellar Corps of Engineers
  • Reply-to: drbob at bigfoot.com
  • Sender: owner-wri-mathgroup at wolfram.com

That's an appalling bug, of course. Always sanity-check your outputs in 
Mathematica!

However, NIntegrate gets it right without eliminating the floating point 
1's.

NIntegrate[Abs[1.0*Cos[r]+1.0*Sin[r]],{r,2.35,2.36}]

0.0000373731

Bobby



Integrate...
Subject: [mg44374] [mg44257] Integrate...
From: Sampo Smolander <sampo.smolander+news at helsinki.fi>
To: mathgroup at smc.vnet.net
Organization: University of Helsinki

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: autocorrelation
  • Next by Date: Part 2 of a recent post on Plot and v 5
  • Previous by thread: Fw: Integrate...
  • Next by thread: Re: Fw: Integrate...