MathGroup Archive 1999

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

Search the Archive

Strange results from Integrate

  • To: mathgroup at smc.vnet.net
  • Subject: [mg16022] Strange results from Integrate
  • From: Sergio Terrazas <sterraza at campus.cdj.itesm.mx>
  • Date: Sat, 20 Feb 1999 02:52:08 -0500
  • Sender: owner-wri-mathgroup at wolfram.com

Dear mathgroupers:
I was working with a probability density function when I got the following
strange result:

f[x_]= Exp[-20 (x-12.5)]

Integrate[f[x],{x,12.6,Infinity}]

Out= 6.51852 x 10^92 =A1=A1What?!!

NIntegrate[f[x],{x,12.6,Infinity}]

Out= 0.135335 (Correct!)

If I use exact numbers like 125/10 instead of 12.5, I get

f[x_]= Exp[-20 (x-12.5)] (Note the 12.5)

Integrate[f[x],{x,126/10,Infinity}] (Note the 126/10)

Out= 0 ( ???)

Now with both exact values:

f[x_]= Exp[-20 (x-125/10)] (Note the 125/10)

Integrate[f[x],{x,126/10,Infinity}] (Note the 126/10)

Out= 1/E^2 (Correct!)

Now using the fundamental theorem of calculus:
(Using the definition of f with reals)

f[x_]= Exp[-20 (x-12.5)]

g[x_]=Integrate[f[x],x]

Out= -E^(250-20x) (Correct)

g[Infinity]-g[12.6] = 0.135335

What is going on?
Is Integrate just unrelaiable with non exact numbers?? (Scary !!)

I will appreciate any comments from the insiders.
Thanks in advance ( Oh! by the way, I an using v. 3.0.1 for windows)

Sergio Terrazas
Juarez, Mexico



  • Prev by Date: Re: Pure Functions in rules
  • Next by Date: fonts and mathematica/publicon
  • Previous by thread: Re: Q: Union and SameTest Option
  • Next by thread: RE: Strange results from Integrate