Consider the rectangles
B1 defined by 0< x <=1, 0<=y<=1
B2 defined by 1<=x<=2, -1<=y<=1
and the function
f(x,y) = { 2x -y if x< 1
{ x^2 + y if x>=1
Compute integral (B1 U B2) of f(x,y)dxdy
Start by drawing the two sets on a graph. It should be easy to see that and overlap only on the boundaries so the integral over both is just the sum of the integrals over each, as Fernando Revilla says.