Questions about Fubini's theorem 
*

*I was wondering  what theorem(s)
makes possible exchanging the order
of Lebesgue integrals, for instance,
in the following example:
$$\int\nolimits_0^1 \int_0^x \quad 1 \quad dy
dx = \int_0^1 \int_y^1 \quad 1 \quad
dx dy,$$ or more generally
$$\int_0^1 \int_0^x \quad f(x,y)
\quad dy dx = \int_0^1 \int_y^1
\quad f(x,y) \quad dx dy.$$ I am not
sure if it is Fubini's theorem because I have questions regarding it in the next part.


*In Fubini's theorem:

*

*Must the set over which the
double/overall integral is taken be
a "rectangle" subset, i.e. $I_1
    \times I_2$, instead of a general
subset in the product space?

*Must the set over which the inner
integral is taken not depend on the
dummy variable in the outer integral?



The answers  to the above two questions seem to be "must" and "must not", based on Wikipedia and Planetmath.
Thanks and regards!
 A: Imagine that we are trying to integrate some function $f(x,y)$ over some sort of strange-shaped (bounded, for now) region of the plane, which we can denote by $\Omega$. Then we know that this region is contained in some rectangle $R$ if we simply allow $R$ to be big enough. Then we can extend our function $f(x,y)$ over all of $R$ by setting $f \equiv 0$ on all points of $R$ not in $\Omega$.
Then the double integral over $\Omega$ is equal to the integral over $R$, if they exist. And so Fubini's theorem applies to oddly shaped regions as well.
A: $$
\int _0^1\int _0^xf(x,y)dydx=\int _0^1\int _0^1\chi _{[0,x]}(y)f(x,y)dydx
$$
Now apply Fubini to get
$$
\int _0^1\int _0^xf(x,y)dydx=\int _0^1\int _0^1\chi _{[0,x]}(y)f(x,y)dxdy=\int _0^1\int _y^1f(x,y)dxdy,
$$
where I have used the fact that $\chi _{[0,x]}(y)=0$ unless $y\leq x\leq 1$.
Techincally speaking, you can only apply Fubini (or Tonelli) for a rectangular region.  To do more general regions, you have to play around with characteristic functions as I just did (or possibly even do a change of variables) and then apply Fubini (or Tonelli).  However, in practice, with a bit of geometric intuition, you can figure out what the bounds should be without doing this.
