Is it true for every $f$ that $\int f= \int f1_E+\int f1_{E^c}$? Suppose that $(X, M, \mu)$ is a measure space and that $f:X\to \overline{\mathbb R}$ is a measurable function. Let $E\in M$. Is the following true?
$$
\int f = \int f \, 1_E + \int f \, 1_{E^c}
$$
where $1_E$ represents indicator function.
It $f$ is non-negative valued, then I know that this result is true. It follows by monotone convergence theorem. The result is true even if $f$ is integrable. But I'm not sure if it holds in case of any measurable $f$.
$$
\int f = \int \bigl( f \, 1_E + f \, 1_{E^c} \bigr) 
\overbrace {=}^{?} \int f \, 1_E + \int f \, 1_{E^c}.
$$
Is the second equality true? If yes, then how does one prove it and when is it true in general (apart from the cases stated above)?
 A: To begin with, let us prove the linearity of the Lebesgue Integral for nonnegative measurable functions based on the MCT. I am going to assume that you have already proved the linearity of the Lebesgue Integral for nonnegative simple functions.
Let $(f_{n})_{n\in\mathbb{N}}$ be an increasing sequence of simple nonnegative functions which converges pointwise to $f$ and $(g_{n})_{n\in\mathbb{N}}$ be an increasing sequence of simple nonnegative functions which converges pointwise to $g$. Consequently, according to the Monotone Convergence Theorem, one gets that:
\begin{align*}
\int_{\Omega}(f + g)\mathrm{d}\mu & = \lim_{n\to\infty}\int(f_{n} + g_{n})\mathrm{d}\mu\\\\
& = \lim_{n\to\infty}\int_{\Omega}f_{n}\mathrm{d}\mu + \lim_{n\to\infty}\int_{\Omega}g_{n}\mathrm{d}\mu\\\\
& = \int_{\Omega}f\mathrm{d}\mu + \int_{\Omega}g\mathrm{d}\mu
\end{align*}
Now we are able to tackle the proposed exercise. In order to do so, notice the linearity applies to any measurable functions $f$ and $g$. With the purpose to conclude so, notice that
\begin{align*}
(f + g)^{+} - (f + g)^{-} = f + g = (f^{+} - f^{-}) + (g^{+} - g^{-})
\end{align*}
Hence we may deduce as well that
\begin{align*}
(f + g)^{+} + f^{-} + g^{-} = (f + g)^{-} + f^{+} + g^{+}.
\end{align*}
Due to the additivity of the Lebesgue integral, one concludes that
\begin{align*}
\int_{\Omega}(f + g)^{+}\mathrm{d}\mu + \int_{\Omega}f^{-}\mathrm{d}\mu + \int_{\Omega}g^{-}\mathrm{d}\mu = \int_{\Omega}(f + g)^{-}\mathrm{d}\mu + \int_{\Omega}f^{+}\mathrm{d}\mu + \int_{\Omega}g^{+}\mathrm{d}\mu.
\end{align*}
Therefore we arrive at the identity:
\begin{align*}
\int_{\Omega}(f + g)^{+}\mathrm{d}\mu - \int_{\Omega}(f + g)^{-}\mathrm{d}\mu = \int_{\Omega}f^{+}\mathrm{d}\mu - \int_{\Omega}f^{-}\mathrm{d}\mu + \int_{\Omega}g^{+}\mathrm{d}\mu +\int_{\Omega}g^{-}\mathrm{d}\mu
\end{align*}
and we are done.
Now, let us notice that $\Omega = A\cup A^{c}$, where $A\cap A^{c} = \varnothing$.
Hence $1 = 1_{\Omega} = 1_{A\cup A^{c}} = 1_{A} + 1_{A^{c}}$, whence we get:
\begin{align*}
\int_{\Omega}f\mathrm{d}\mu & = \int_{\Omega}f1_{\Omega}\mathrm{d}\mu\\
& = \int_{\Omega}f(1_{A} + 1_{A^{c}})\mathrm{d}\mu\\
& = \int_{\Omega}(f1_{A} + f1_{A^{c}})\mathrm{d}\mu\\
& = \int_{\Omega}f1_{A}\mathrm{d}\mu + \int_{\Omega}f1_{A^{c}}\mathrm{d}\mu\\
& = \int_{A}f\mathrm{d}\mu + \int_{A^{c}}f\mathrm{d}\mu
\end{align*}
Hopefully this helps!
