MathGroup Archive 2002

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

Search the Archive

Re: Boole Function

  • To: mathgroup at
  • Subject: [mg37231] Re: Boole Function
  • From: Andrzej Kozlowski <andrzej at>
  • Date: Thu, 17 Oct 2002 00:09:32 -0400 (EDT)
  • Sender: owner-wri-mathgroup at

Boole (defined in the AddOn package Calculus`Integration`) is not 
written to deal with symbolic parameters. So you may do better to use 
better to use the built-in UnitStep function for which Mathematica 
knows more rules. In fact, if you do not mind getting an error message 
you can get something like your answer by mixing UnitStep and Boole:

<< Calculus`Integration`

FullSimplify[Integrate[Boole[0 < x < y < 1]*UnitStep[z - y],
    {z, 0, 1}],y>0]

 From In[2]:=
Integrate::region: The region defined by 0¡Âz¡Â1&&0<x<y<1&&-y+z¡Ã0 could 
not be \
broken down into cylinders.

-(-1+y) Boole[0<x<y<1] UnitStep[1-y]

Of course the UnitStep is not necessary since the condition y<1 is 
already included in Boole, but the Integration package does not have 
rules for combining Bool and UnitStep (don't forget that Boole is not a 
built in function!).

If you dispense with Bool altogether you get:


-(-1+y) UnitStep[x,1-y,-x+y]

Note that this expresses exactly the same condition as 

Andrzej Kozlowski
Yokohama, Japan

and also try to use proper Mathematica

On Thursday, October 17, 2002, at 03:26 AM, Janusz Kawczak wrote:

> Suppose f(x,y,z)=Boole[0<x<y<z<1]. Let's integrate this function
> over, say, z, i.e. Integrate[f[x,y,z],{z,0,1}]. One would expect to see
> the
> output like this (1-y)Boole[0<x<y<1] (or maybe simplified expression
> as an argument in  the Boole function). Instead, an error appears
> (warning) that the integration cannot be performed.
> How to resolve this issue so it produces a desired answer?
> Janusz.

  • Prev by Date: Re: How to speed up this calculation?
  • Next by Date: RE: grouping and averaging {x,y} pairs of data
  • Previous by thread: Mathematica Training Course in Amsterdam
  • Next by thread: Re: Re: Boole Function