# Spivak “Calculus on Manifolds” remarks about Fubini Theorem

On Spivak "Calculus on Manifolds" p.58 he provides a general version of Fubini theorem. Which I present below (I omit parts that are not important to the question):

Let $$A\subset \mathbb{R}^n$$ and $$B\subset \mathbb{R}^n$$ be closed retangles, and let $$f:A\times B \rightarrow \mathbb{R}$$ be integrable. For $$x\in A$$ and $$y\in B$$, and let $$$$\mathscr{L}(x) = \mathbf{L} \int_B f(x, y) dy$$$$ denote the lower integral of $$f$$ on $$y\in B$$. Then $$\mathscr{L}$$ is integrable on $$A$$ and: $$$$\int_{A\times B} f = \int_A \mathscr{L} = \int_A \left(\mathbf{L} \int_B f(x, y) dy \right) dx$$$$

He gives the following remarks:

1. [Not relevant for this question]
2. In practive it is often the case that $$h(x) = \int_B f(x, y) dy$$ is integrable, so that: $$$$\int_{A\times B} f = \int_{A} \left(\int_B f(x, y) dy\right) dx$$$$ can be applied. This certainly occurs if $$f$$ is continuous.
3. The worst irregularity commonly encontered is that $$h(x)$$ is not integrable for a finite number of $$x\in A$$. In this case, $$\mathscr{L}(x) = \int_B f(x, y) dy$$ for all but these finitely many $$x$$. Since $$\int_A\mathscr{L}$$ remains unchanged if $$\mathscr{L}$$ is redefined at a finite number of points we can still write $$\int_{A\times B} f = \int_{A} \left(\int_B f(x, y) dy\right) dx$$, provided that $$\left(\int_B f(x, y) dy\right)$$ is defined arbitrarily, say as 0, when it does not exist.
4. Let $$f:[0, 1] \times [0, 1]\rightarrow \mathbb{R}$$ be defined by: $$$$f(x, y) = \begin{cases} 1 & \text{if }x\text{ is irrational} \\ 1 & \text{if }x\text{ is rational and }y\text{ is irrational}\\ 1-\frac{1}{q} & \text{if }x = p/q\text{ in lowest terms and }y\text{ is rational} \end{cases}$$$$ Then $$f$$ is integrable and $$\int_{[0, 1]\times[0, 1]} f = 1$$. Now $$\int_{0}^1 f(x, y) dy = 1$$ if $$x$$ is irrational and does not exist if $$x$$ is rational. Therefore $$h$$ is not integrable if $$h(x) = \int_{0}^1 f(x, y) dy$$ is set equal to zero when the integral does not exist.

My question are:

1. On remark 3, why does it need to be a finite number of points? If we had any set with measure 0, wouldn't that be enough to just define $$h(x) = 0$$ on those points, and in this case, the equality: $$$$\int_A \mathscr{L}(x) = \int_A h(x)$$$$ would still hold.
2. On remark 4, why $$\int_0^1 f(x, y) dy$$ does not exist for $$x$$ rational? The set of discontinuities in this case has measure 0 and by theorem 3-8 of the same book this would be enough to guarantee the existance of this integral, wouldn't it?
• In a nutshell: in Theorem 3-8 sets of two-dimensional measure $0$ are considered, whereas examples below Theorem 3-10 deal with sets of one-dimensional measure $0$. And the example in Remark 4 just shows what can happen if $h(x)$ is not integrable for $x$ belonging to a set of one-dimensional measure $0$. – user539887 Apr 21 at 9:22

Seeing as there is already an answer for your question (2), I'll address (1). Spivak already proved that $$\mathscr{L}$$ is integrable on $$A$$. The key thing is if you redefine $$\mathscr{L}$$ at finitely many points of $$A$$, then it is still integrable on $$A$$, and $$$$\int_A \mathscr{L}_{\text{new}} = \int_A \mathscr{L}_{\text{old}}.$$$$ However, if you redefine an integrable function at infinitely many points (even if it only has measure zero) the result may not be integrable, as the following example shows:
Consider $$\phi: [0,1] \to \mathbb{R}$$, $$\phi(x) = 0$$, which is clearly integrable, and its modification $$\psi: [0,1] \to \mathbb{R}$$, $$$$\psi(x) = \begin{cases} 1 & \text{if x \in \mathbb{Q}} \\ 0 & \text{if x \notin \mathbb{Q}} \end{cases}$$$$ Notice that $$\psi$$ is obtained from $$\phi$$ by redefining it on a subset of the rationals, which are countable and hence have measure zero. However, $$\psi$$ is nowhere continuous, and hence not integrable (I'm using the fact that Riemann-integrability is equivalent to set of discontinuities having measure zero). So it doesn't make sense to say $$$$\int_0^1 \phi = \int_0^1 \psi$$$$ If however, you can prove that even after redefining $$\mathscr{L}$$ on a set of measure zero, it remains integrable, then yes the equation you wrote is true.
For (2) if $$x$$ is a fixed rational, then the function $$g_x: [0,1] \to \mathbb{R}$$ where $$g_x(y) = f(x,y)$$ is given by
$$g_x(y) = \begin{cases}1, & y \in [0,1]\setminus\mathbb{Q} \\ 1- 1/q \neq 1, & y \in \mathbb{Q}\cap[0,1] \end{cases}$$
This is an everywhere discontinuous Dirichlet function and is not Riemann integrable. Note that $$g_x$$ is discontinuous at any irrational point $$\xi$$, since by the density of the rationals, there is a sequence of rationals $$r_n \to \xi$$ such that $$g_x(r_n) \not\to g_x(\xi)$$. Similarly $$g_x$$ is discontinuous at every rational point.