Lebesgue integral and iterated integral I am learning lebesgue integral at the moment, and come across a question in homework, but find it really confused. The question states:

I first tried to compute the iterated integral by Riemann integral, and find that the iterated integral is infinite no matter which order I used. So I think probably here the result of Lebesgue integral is different. But how to compute the iterated integral using Lebesgue integral? The domain are split equally into 2 squares in the unit box if using Riemann integral. Do we still have this in Lebesgue integral? Maybe some sequence of simple functions is needed, but I am not sure how to construct that in an iterated case.
I think the double integral does not exist as the 2 functions are not measurable, and if we compute the integral we will probably find the 2 iterated integral different.
 A: Let's have a look at the iterated integral
$$I := \iint f(x,y) \, \lambda(dx) \, \lambda(dy).$$
(Here $\lambda$ denotes the (one-dimensional) Lebesgue measure.) Since $f(x,y)=0$ whenever $|x| \geq 1$ or $|y| \geq 1$, we have
$$I = \int_{(0,1)} \int_{(0,1)} f(x,y) \, \lambda(dx) \, \lambda(dy). \tag{1}$$
Now fix $y \in (0,1)$. By the very definition of $f$, we have
$$\begin{align*} \int_{(0,1)} f(x,y) \, \lambda(dx) &= \int_{(0,y)} \frac{1}{y^2} \, \lambda(dx) - \int_{(y,1)} \frac{1}{x^2} \, \lambda(dx) \\ &= \frac{1}{y^2} \cdot y - \int_{(y,1)} \frac{1}{x^2} \, \lambda(dx). \end{align*}$$
In order to calculate the second integral, we note that he mapping $[y,1] \ni x \mapsto \frac{1}{x^2}$ is continuous (as $y>0$!) and therefore Riemann-integrable. It is well-known that this implies that Riemann integral and Lebesgue integral coincide. Consequently, we obtain
$$\int_{(0,1)} f(x,y) \, \lambda(dx) = \frac{1}{y} + \left[\frac{1}{x} \right]_{y}^1 = 1.$$
Plugging this into $(1)$, we find $I=1$. A very similar argumentation shows that
$$J := \int_{(0,1)} \int_{(0,1)} f(x,y) \, \lambda(dy) \, \lambda(dx) = -1.$$
Since the iterated integrals $I$ and $J$ do not coincide, this already implies (by Fubini's theorem) that the double integral does not exist. (Note that this has nothing to do with measurability; the function $f$ is perfectly well measurable.)
