3.5.9 Integrals over Regions| This does an integral over the unit circle. | |
In[1]:=
Integrate[If[x^2 + y^2 < 1, 1, 0], {x, -1, 1}, {y, -1, 1}]
|
Out[1]=
|
|
| Here is an equivalent form. | |
In[2]:=
Integrate[Boole[x^2 + y^2 < 1], {x, -1, 1}, {y, -1, 1}]
|
Out[2]=
|
|
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. | |
In[3]:=
Integrate[Exp[x] Boole[x^2 + y^2 < 1], {x, -1, 1}, {y, -1, 1}]
|
Out[3]=
|
|
Integrate[f Boole[cond], {x, , }, {y, , }]
| | integrate f over the region where cond is True |
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 . | |
In[4]:=
Integrate[Boole[a x < y], {x, 0, 1}, {y, 0, 1}]
|
Out[4]=
|
|
| With two parameters even this breaks into quite a few cases. | |
In[5]:=
Integrate[Boole[a x < b], {x, 0, 1}]
|
Out[5]=
|
|
| This involves intersecting a circle with a square. | |
In[6]:=
Integrate[Boole[x^2 + y^2 < a], {x, 0, 1}, {y, 0, 1}]
|
Out[6]=
|
|
| The region can have an infinite number of components. | |
In[7]:=
Integrate[Boole[Sin[x] > 1/2] Exp[-x], {x, 0, Infinity}]
|
Out[7]=
|
|
| Integrate effectively does Lebesgue integration. | |
In[8]:=
Integrate[Boole[Element[x, Rationals]], {x, 0, 1}]
|
Out[8]=
|
|
|