Question: Give an example of a Borel measurable function ${f: [0,1]^2 \rightarrow {\bf R}}$ such that the integrals ${\int_{[0,1]} f(x,y)\,\mathrm dy}$ and ${\int_{[0,1]} f(x,y)\,\mathrm dx}$ exist and are absolutely integrable for all ${x \in [0,1]}$ and ${y \in [0,1]}$ respectively, and that ${\int_{[0,1]} \left(\int_{[0,1]} f(x,y)\,\mathrm dy\right)\,\mathrm dx}$ and ${\int_{[0,1]} \left(\int_{[0,1]} f(x,y)\,\mathrm dx\right)\,\mathrm dy}$ exist and are absolutely integrable, but such that $$ \int_{[0,1]} \left(\int_{[0,1]} f(x,y)\,\mathrm dy\right)\,\mathrm dx \neq \int_{[0,1]} \left(\int_{[0,1]} f(x,y)\,\mathrm dx\right)\,\mathrm dy$$ are unequal. (Hint: adapt the doubly infinite sequence ${(x_{n,m})_{n,m \in {\bf N}}}$ such that ${x_{n,m}}$ equals ${+1}$ when ${n=m}$, ${-1}$ when ${n=m+1}$, and ${0}$ otherwise.) Thus we see that Fubini’s theorem fails when one drops the hypothesis that ${f}$ is absolutely integrable with respect to the product space.
Attempt: Partition the unit interval $[0,1]$ into $\left[\frac{1}{2^{k-1}}, \frac{1}{2^k}\right)$, $k=1, 2, \ldots$ as countably many sub-intervals of length $2^{-k}$. Denote by $I_n$ the $n^{\text{th}}$ interval in the $x$-axis, and $J_m$ the $m^{\text{th}}$ interval in the $y$-axis. Define $f:[0,1]^2 \rightarrow {\bf R}$ by $$f(x,y) := \sum_{n,m} x_{n,m} 1_{I_n \times J_m}(x,y).$$ It then seems that $$\int_{[0,1]} \left(\int_{[0,1]} f(x,y)\,\mathrm dy\right)\,\mathrm dx = \frac{1}{2} \neq 0 = \int_{[0,1]} \left(\int_{[0,1]} f(x,y)\,\mathrm dx\right)\,\mathrm dy.$$ But how about the part that emphasizes the absolute integrability of $f$ w.r.t. the product space?