Show that if $f$ is integrable over $S_1$ and $S_2$, then $f$ is integrable over $S_1-S_2$, and $\int_{S_1-S_2}f=\int_{S_1}f-\int_{S_1\cap S_2}f$. Let $S_1$ and $S_2$ be bounded sets in $\mathbb{R}^n$; let $f:S\to\mathbb{R}$ be a bounded function. Show that if $f$ is integrable over $S_1$ and $S_2$, then $f$ is integrable over $S_1-S_2$, and $\int_{S_1-S_2}f=\int_{S_1}f-\int_{S_1\cap S_2}f$. 
I know that $f$ is integrable in $S_1\cup S_2$ and in $S_1\cap S_2$ with $\int_{S_1\cup S_2}f=\int_{S_1}f+\int_{S_2}f-\int_{S_1\cap S_2}f$, so how can I use this to demonstrate the above? Could you consider cases like: if $S_1$ and $S_2$ are disjoint, if $S_2$ is a subset of $S_1$ and if both sets have elements in common? Thank you very much.
 A: Recall that given a bounded set $A\subset \mathbb{R}^n$ and $g:A\to \mathbb{R},$ we define
$g_A:\mathbb{R}^n\to \mathbb{R}$ by
$$ g_A(x)=\begin{cases}g(x), &x\in A,\\0 & \text{otherwise.}\end{cases}$$
First consider the case in which $f$ is non-negative.
Now let $S=S_1\cup S_2$ and $T=S_1\cap S_2.$  If $f$ is integrable over $S_1$ and $S_2$ then, applying Lemma 13.2 (Munkres Analysis on Manifolds), it is integrable over $S$ and $T$ because $f_S(x)=\max\{f_{S_1}(x),f_{S_2}(x)\}$ and $f_T(x)=\min\{f_{S_1}(x),f_{S_2}(x)\}.$
Now show the following:


*

*Show that $f_{S_1-S_2}(x)=\max\{0,f_{S_1}(x)-f_{S_1}(x)\}.$ For this you can consider the cases $x\in T,$ $x\in S_2,$ $x\in S_1-S_2,$ $x\not\in S.$ From this follows that $f$ is integrable over $S_1-S_2.$

*Show that $f_{S_1-S_2}(x)=f_{S_1}(x)-f_T(x).$ Again you can consider the cases $x\in T,$ $x\in S_2,$ $x\in S_1-S_2,$ $x\not\in S.$ This complete the result if $f$ is non-negative.


Finally, in the general case ($f$ not neccesarily non-negative), set
$$ f_+(x)=\max\{f(x),0\} \hspace{.3cm}\text{ and } \hspace{.3cm}f_-(x)=\max\{-f(x),0\}.$$
Both are non-negative and $f(x)=f_+(x)-f_-(x).$
A: Let $T:=S_1\cap S_2$.
Let $Q$ be a rectangle which contains $S_1\cup S_2$.
$f_{S_1-S_2}=f_{S_1}-f_{T}$ holds.
By Theorem 13.3(d), $f$ is integrable over $T$.
By Theorem 13.3(a), $f_{S_1-S_2}=f_{S_1}-f_{T}$ is integrable over $Q$.
So, $f$ is integrable over $S_1-S_2$.
The desired formula follows by applying Theorem 13.3(a) to the equation $$f_{S_1-S_2}(x)=f_{S_1}(x)-f_{S_1\cap S_2}(x).$$
