Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*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 2005

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

Search the Archive

issues with integrating Boole

  • To: mathgroup at smc.vnet.net
  • Subject: [mg61861] issues with integrating Boole
  • From: Mark Fisher <mark at markfisher.net>
  • Date: Wed, 2 Nov 2005 04:09:29 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

I suspect a bug. I'm using 5.2 for Microsoft Windows (June 20, 2005).

In what follows, boole1 and boole2 describe the same region (which can 
be confirmed with a contour plot): a triangle with a base of length 4, a 
height of length 2, and thus an area of 4. Although Integrate returns 4 
for boole1, it returns 4/3 for boole2. NIntegrate (using the default 
method) returns answers that agree with Integrate. Nevertheless, 
NIntegrate with Method -> MonteCarlo returns the correct result (up to 
the numerical error). On the other hand, with Method -> QuasiMonteCarlo, 
NIntegrate evaluates boole1 but not boole2.

boole1 = Boole[a+b<1 && b-a<1 && b>-1]

boole2 = Boole[And@@Thread[Abs[x/.Solve[1 - a x - b x^2 == 0, x]]>1]]

Integrate[{boole1, boole2}, {a,-2,2}, {b,-1,1}]

NIntegrate[{boole1, boole2}, {a,-2,2}, {b,-1,1}]

NIntegrate[{boole1, boole2}, {a,-2,2}, {b,-1,1}, Method -> MonteCarlo]

NIntegrate[{boole1, boole2}, {a,-2,2}, {b,-1,1}, Method -> QuasiMonteCarlo]

FYI, there is a reason for using expressions such as boole2. In 
time-series analysis, the stationarity of an autoregressive process 
depends on the condition and all of the roots of a certain polynomial 
lie outside the unit circle. For first- and second-order autoregressive 
processes, it is easy to describe the region of stationarity in more 
direct ways (such as boole1), but for higher-order processes it becomes 
much harder. So I was just trying this out for a simple case.

--Mark


  • Prev by Date: statistics questions
  • Next by Date: Re: 2.9.2 How Input and Output Work
  • Previous by thread: Re: statistics questions
  • Next by thread: Re: issues with integrating Boole