Two functions agreeing except on set of measure zero 
Let $f,g:S\rightarrow\mathbb{R}$; assume $f$ and $g$ are integrable over $S$. Show that if $f$ and $g$ agree except on a set of measure zero, then $\int_Sf=\int_Sg$.

Since $f$ and $g$ are integrable over $S$, we have $f-g$ also integrable over $S$. So $(f-g)(x)=0$ except for a set of measure zero. If $(f-g)$ were bounded, we could choose a partition so that the volume covering the points $x$ such that $(f-g)(x)\neq 0$ is less than any $\epsilon$, which will imply that $\int_S(f-g)=0$, and so $\int_S f=\int_S g$. But here we don't have boundedness. How can we go from here?

If you want to go with all the details starting from the definition, do it like this : 
$$
\left| \int_S (f - g) \, d\mu \right| \le \int_S |f-g| d\mu = \sup \left\{ \left. \int_S \varphi  \, d\mu \, \right| \, 0 \le \varphi \le |f-g|, \varphi \in \mathcal L(S)\right\}
$$
where I wrote $\mathcal L(S)$ for the set of all linear combinations of characteristic functions (a characteristic function is a function which is $1$ on some measurable set and $0$ elsewhere). Since for these functions, the integral is defined as 
$$
\int_S \left( \sum_{i=1}^n a_i \mathbb 1_{A_i} \right) d\mu = \sum_{i=1}^n a_i \mu(A_i),
$$
the condition $0 \le \varphi \le |f-g|$ ensures that $a_i \neq 0 \implies \mu(A_i) = 0$, hence $\int_S \varphi d\mu = 0$ for every $\varphi$ with $0 \le \varphi \le |f-g|$. Taking the supremum over a bunch of zeros is zero.
Hope that helps,
