The “rearrangement” of integrals This question comes from Fleming's book "Functions of Several Variables", which is a little bit like the rearrangement of convergent series:

Let $f$ be continuous on an open set $D$.Assume that the integrals of $f^+$ and $f^-$ over $D$ both diverge to $+\infty $.Show that given any number $l$ here is a sequence of compact sets $K_1\subset K_2\subset \cdots $ such that $D=K_1\cup K_2\cup \cdots $ and $lim_{n\to \infty}{\int_{K_n} fdV}=l$.

The following is my thought:
Since $\int_D f^+ dV=+\infty$, there exists compact set $K_{11}\subset D$ such that $$\int_{K_{11}} f^+ dV>l+1$$ Similarly,there exists compact set $K_{12}\subset D$ such that $$
\int_{K_{12}}{f^-dV}>\int_{K_{11}}{f^+}dV-\left( l+1 \right) 
$$
We can remove the part on which $f^+>0$ from $K_{12}$(This part can be open by the continuity of $f^+$),and then $K_{12}$ is still compact.The similar procedure should be acted on $K_{11}$.And then let $K_1=K_{11}\cup K_{12}$,we have $$
\int_{K_1}{f}dV=\int_{K_1}{f^+}dV-\int_{K_1}{f^-}dV<l+1
$$
By using the approach similar to the above process,we can get $K_1\subset K_2\subset \cdots$ with $\int_{K_n} fdV<l+\frac{1}{n}$ while $n$ is odd;$>l-\frac{1}{n}$ while $n$ is even.

*

*However, it still cannot show that $lim_{n\to \infty}\cdots =l$ and $\bigcup K_i =D$.

 A: Sketch of Proof. It is possible to create two non-decreasing families $\{ K^+_r \}_{r\in[1,\infty)}$ and $\{ K^-_r \}_{r\in[1,\infty)}$ of compact subsets of $D$ such that

*

*$\cup_{r\geq 1}K^+_r = \{f \geq 0\}$ and $\cup_{r\geq 1}K^-_r = \{f \leq 0\}$, and


*$r \mapsto \int_{K^+_r} f^+(x) \, \mathrm{d}x$ and $r \mapsto \int_{K^-_r} f^-(x) \, \mathrm{d}x$ are continuous.
Then by using the intermediate value theorem, we may choose $(s_n)$ and $(r_n)$ such that $s_n, r_n \to \infty$ and $\int_{K^+_{s_n} \cup K^-_{r_n}} f(x) \, \mathrm{d}x = l$. Then the choice $K_n = K^+_{s_n} \cup K^-_{r_n}$ will work.

Proof. Choose a sequence of compact subsets $K^0_1 \subset K^0_2 \subset K^0_3 \subset \dots $ of $D$ with $D = \cup_{n\geq 1} K^0_n$. Then, for each choice of sign $\varepsilon \in \{+, -\}$, define the family $\{ K^\varepsilon_{r} \}_{r \in [1, \infty)}$ as follows:

*

*Set $K^\varepsilon_1 = K^0_1 \cap \{ \varepsilon f \geq 0\} $.


*Next, if $n \in \{1, 2, \dots\}$ and $K^\varepsilon_n$ is defined, then for $r \in (0, 1]$,
$$K^\varepsilon_{n+r} := K^\varepsilon_n \cup \Bigl( K^0_{n+1} \cap \{ \varepsilon f \geq 0\} \cap \overline{B(0, nr)} \Bigr). $$
Also, we define
$$ \phi^\varepsilon(r) := \int_{K^\varepsilon_r} f^\varepsilon(x) \, \mathrm{d}x $$
Then it is easy to check that

*

*$K^\varepsilon_r$ is compact for each $ r \geq 1$. This is because each $K^\varepsilon_r$ is a closed subset of $K^0_{\lceil r \rceil}$. In particular, $\phi^\varepsilon$ is finite.


*$\phi^\varepsilon$ is non-decreasing, since $K^\varepsilon_s \subseteq K^\varepsilon_r$ for any $1 \leq s \leq r$.


*$\lim_{r\to\infty} \phi^\varepsilon(r) = \infty$. This follows from $\cup_{r \geq 1} K^\varepsilon_r = \{ \varepsilon f \geq 0\}$ and the assumption.


*$\phi^\varepsilon$ is continuous. Indeed, suppose $n \leq s \leq r \leq n+1$. Then the construction gives the bound
$$ 0 \leq \phi^\varepsilon(r) - \phi^\varepsilon(s) \leq M |B(0,1)| \bigl( (n(r-n))^d - (n(s-n))^d \bigr), $$
where $d$ is the dimension of $D$, $M = \sup_{K_{n+1}} |f|$, and $|B(0,1)|$ is the measure of the unit ball.


*For any $s, r \geq 1$, we have $ f \geq 0$ on $K^+_s$ and $f \leq 0$ on $K^-_r$. So,
$$ \int_{K^+_s \cup K^-_r} f(x) \, \mathrm{d}x = \phi^+(s) - \phi^-(r). $$
Now let $l $ be arbitrary. Then we may choose two increasing sequences $(s_n)$ and $(r_n)$ such that $s_n, r_n \to \infty$ and $\phi^+(s_n) - \phi^-(r_n) = \ell$. Finally, we may set $(K_n)$ as
$$ K_n = K^+_{s_n} \cup K^-_{r_n}. $$
