MathGroup Archive 2003

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

Search the Archive

Incorrect integral

  • To: mathgroup at smc.vnet.net
  • Subject: [mg43623] Incorrect integral
  • From: "Lars Rasmusson" <Lars.Rasmusson at hp.com>
  • Date: Fri, 26 Sep 2003 04:45:36 -0400 (EDT)
  • Organization: Hewlett-Packard Laboratories, Bristol, UK
  • Sender: owner-wri-mathgroup at wolfram.com

Hi, it seems like Integrate is not handling the Max[ ] function properly, or
am I mistaken?
Compare the two outputs
In[1]:=

fa[p_] := NIntegrate[Max[0, k - a p], {k, 0, 1}, {a, 0, 1}]
fb[p_] := Integrate[Max[0, k - a p], {k, 0, 1}, {a, 0, 1}]
fa[0.1]
fb[0.1]

Out[3]=
0.451667
Out[4]=
1.66667

The outputs differ.  NIntegrate returns the correct value.



In[5]:= $Version
Out[5]= 5.0 for Microsoft Windows (June 11, 2003)



Is there any way to get a correct behavior from Mathematica?  I would be
happy to receive the symbolic solution (to a more complicated integral of
this kind).

Thanks,

Lars







  • Prev by Date: NDSolve help
  • Next by Date: Re: Counting Twin Primes
  • Previous by thread: Re: NDSolve help
  • Next by thread: Re: Incorrect integral