I have a question as I look at the example 8.9(a) in Rudin's Real and Complex Analysis:
Let $X$ and $Y$ be the closed unit interval $[0,1]$, let $\{\delta_n\}$ be an increasing sequence of distinct points in $[0,1]$ that converges to $1$, and to each positive integer $n$, let $g_n$ be a real continuous function on $[0,1]$ with support in $(\delta_n,\delta_{n+1})$, and such that $\int_{0}^{1} g_n(t)~dt=1$. Define $f$ over $X\times Y$ as follows: $$ f(x,y):=\sum_{n=1}^\infty[g_n(x)-g_{n+1}(x)]g_n(y). $$
It is easy to check that the Fubini Theorem does not apply for $f(x,y)$. And the book says that this is because the function of $f(x,y)$ is not integrable, i.e.
$$\int_0^1\,dx\int_0^1|f(x,y)|\,dy=\infty$$
But I could not easily see why it is not integrable.
You are probably familiar with the following example of a non-integrable function
If you integrate over $x$ and then over $y$ you get $0$, but if you integrate first over $y$ and then over $x$ you get $1$. Here it is easy to see that the integral of the absolute value diverges and therefore the function is not integrable.
If you think about it, your function captures essentially the same idea. Yes, in your case the horizontal and vertical lines would be the sequence $\delta_{n}$ (and would not extend to infinity), and the function won't necessarily be constant on those squares (rectangles in your case). The integral of your $f$ would still evaluate to $1$ on each cell
$$\int_{\rm cell}f\left(x,y\right){\rm d}A=1$$
Therefore
$$\int_{\rm cell}\left|f\left(x,y\right)\right|{\rm d}A\geq\left|\int_{\rm cell}f\left(x,y\right){\rm d}A\right|=1$$
and it is clear that $f$ is not integrable, since there is an infinite number of such cells.