# Let $\int$ denote Lebesgue integral . If $\int (\int f(x,y) \, dx ) \, dy$ exist . What can we say about $\int_{R^2} f(x,y) \, dxdy$

Let $$\int$$ denote Lebesgue integral . If $$\int_R \left(\int_R f(x,y) \, dx \right) \, dy\label{1}\tag{1}$$ exist , what can we say about $$\int_{R^2} f(x,y) \, dxdy \label{2}\tag{2}$$ and $$\int_R \left(\int_R f(x,y) \, dy \right) \, dx\label{3}\tag{3}\:\:?$$

My attempt:

1. First, if \eqref{2} exists, then by Fubini's theorem, both \eqref{1} and \eqref{3} exist.
2. Second , if we only assume \eqref{1} exists, then \eqref{2} or \eqref{3} might not exist.
Indeed, let $$\varphi \in \mathscr{S}(\Bbb R)$$ and assume $$\int \varphi(x) \,dx \neq 0$$, then by fourier transform we have $$\int \int \varphi(x)e^{-2\pi iyx}\, dx \, dy=\varphi(0)$$ However , with the simple observation, \eqref{2} and \eqref{3} do not exist.

My question:

a) If we want the integral \eqref{2} exist , then we must have \eqref{1}=\eqref{2}=\eqref{3}. However , can we found a function $$f(x,y)$$ , both \eqref{1} and \eqref{3} exist but \eqref{1}$$\neq$$\eqref{3}.

b) Can we found a function $$f(x,y)$$ such that \eqref{1}=\eqref{3} but \eqref{2} do not exist ?

Let $$(n,m)$$ denote the open cube $$x\in (n,n+1)$$ , $$y\in(m,m+1)$$ for some integer $$m,n$$ .
First we show that we can find a function $$f$$ which satisfied condition $$(b)$$ . We can construct $$f$$ as follow : $$f(z)= \left\{ \begin{array}{lcc} 1 & z\in (n,n) \,\,\text{for all nonegative } n \\ \\ -1 & z\in (n,n+1) \,\,\text{or }\,(n+1,n) \,\,\text{for all nonegative } \, n \\ \\ 0 & \text{otherwise} \end{array} \right.$$ Then $$\int_R\,f(z)\, dx=\int_R \, f(z) \,dy=0$$ So we have $$(1)=(3)=0$$ . However , $$(2)$$ do not exist since $$\int_{R^2} \, |f(z)| \, dxdy=+ \infty$$ .
To construct a function $$f$$ with satisfied condition $$(a)$$ , we need a slight modification of $$f$$ defined above . Let $$\{b_n \}_{n=0}^{\infty}$$ denote a sequence of nonegative number with $$b_0=0$$ and $$\sum_{n=0}^{\infty} b_n=s$$ exist . Then let $$a_N=\sum_{n=0}^N b_n$$ . Next we can construct funtion $$g$$ which satisfied condition $$(a)$$ . $$g(z)= \left\{ \begin{array}{lcc} a_n & z\in (n,n) \,\,\text{for all nonegative } n \\ \\ -a_n & z\in (n+1,n) \,\,\text{for all nonegative } \, n \\ \\ 0 & \text{otherwise} \end{array} \right.$$
For $$g$$ defined above , we see $$\int_R \,f(z)\, dx =0$$ and $$\int_R \, f(x,y) \,dy =b_n$$ whenever $$n\lt x \lt n+1$$ .So we have $$\int_R (\int_R f(x,y) \, dy ) \, dx=s$$ while $$\int_R (\int_R f(x,y) \, dx ) \, dy=0$$