How to show that $\int_{X}f\mathrm{d}\mu=\int_{A}f\mathrm{d}\mu$ if $\mu(X\setminus A)=0$ Just a quick question. Apologies if it sounds dumb question. I am recently starting to learn about the basic measure theory. Suppose that $\mu$ is a measure on $(X,\mathcal{A})$, and let $f$ be a function. If it is known that $A\in \mathcal{A}$ with $\mu(X\setminus A)=0$, how would you show that
$$
\int_{X}f\mathrm{d}\mu=\int_{A}f\mathrm{d}\mu
$$
mathematically? The thing I am unsure about is to show that $\int_{X\setminus A}f\mathrm{d}\mu=0$. If there are some missing details, which conditions should there have been to make the above expression sense?
 A: What might be helpful is to unpack what it means to integrate over $X\backslash A$. Showing the equality in question is equivalent to saying that
$$\int_X fd\mu - \int_A fd\mu = 0$$
which is precisely the integral of $f$ over $X$ while excluding the set $A$. To see this, let $\mathcal{L}(S)$ be the set of linear combinations of indicator functions (functions that take 1 on a subset of $S$ and 0 off of it). Now first observe that:
$$\Big|\int_X fd\mu - \int_A fd\mu\Big| = \Big|\int_{X\backslash A} fd\mu\Big| \leq \int_{X\backslash A} |f|d\mu.$$
From here, we can bound this non-negative integral like so:
$$\int_{X\backslash A} |f|d\mu = \sup\Big\{\int_{X\backslash A}\phi : 0 \leq \phi \leq |f|,\phi\in \mathcal{L}(X\backslash A)\Big\} \leq \sup \phi \cdot \mu(X\backslash A) = 0$$
by the assumption that $\mu(X\backslash A) = 0$, hence proving the claim. I hope that was helpful!
A: With no loss of generality, suppose $f$ is positive. If not, work on $f^+$ and $f^-$ separately. If $f$ is positive, for each $n$ let us set $f_n = n \land f$. The sequence $(f_n)$ is increasing and converges towards $f$. Now if $\mu(X\setminus A) = 0$, then
$$
0 \le \int_{X\setminus A}f_n\,\mathrm d\mu \le \int_{X\setminus A} n\,\mathrm d\mu =n\mu({X\setminus A}) = 0 \Rightarrow \int_{X\setminus A} f_n\,\mathrm d\mu = 0.
$$
Applying Beppo Levi’s Theorem ($0\le f_n \uparrow f \Rightarrow \int f_n\,\mathrm d \mu \uparrow \int f\,\mathrm d \mu$):
$$
\int_{X\setminus A} f\,\mathrm d\mu = \lim_{n\to\infty} \int_{X\setminus A} f_n\,\mathrm d\mu = 0
$$
