Integrals over Regions

This does an integral over the interior of the unit circle:

Integrate[If[x^2+y^2<1,1,0],{x,-1,1},{y,-1,1}]

Here is an equivalent form:

Integrate[Boole[x^2+y^2<1],{x,-1,1},{y,-1,1}]

Even though an integral may be straightforward over a simple rectangular region, it can be significantly more complicated even over a circular region.

This gives a Bessel function:

Integrate[Exp[x] Boole[x^2+y^2<1],{x,-1,1},{y,-1,1}]

Integrals over regions.

Particularly if there are parameters inside the conditions that define regions, the results for integrals over regions may break into several cases.

This gives a piecewise function of a:

Integrate[Boole[a x<y],{x,0,1},{y,0,1}]

With two parameters even this breaks into quite a few cases:

Integrate[Boole[a x<b],{x,0,1}]

This involves intersecting a circle with a square:

Integrate[Boole[x^2+y^2<a],{x,0,1},{y,0,1}]

The region can have an infinite number of components:

Integrate[Boole[Sin[x]>1/2] Exp[-x],{x,0,Infinity}]