Approximation by simple functions for $f\in L^1(\mu)$ I'm solving a problem about measure space.
Let $(X,\mathcal{M}, \mu)$ be a measure space, and let $f \in L^1(\mu)$. Prove that, for all $\epsilon >0$, there exist a simple measurable function $s$ such that
$$\int_X |f-s| d\mu < \epsilon.$$
The simple function $s$ can assume negative value as well.
My solution is using a decomposition, $f = f^+ + f^-$, where $f^+ = max(f,0)$ and $f^- = max(-f,0)$.
Let $s_n^+ = \sum_{k=1}^{n2^n} \frac{k-1}{2^n} I(\frac{k-1}{2^n} \leq f^+< \frac{k}{2^n})$. Then $s_n^+ \rightarrow f^+$, and $s_n^+$ is non decreasing simple function.
By def of $s_n^+$, for given $\epsilon >0$, we can take $N$ large enough so that $N > f^+(x), \frac{1}{2^N}<\frac{\epsilon}{2\mu(X)}$.
$n > N, \;\;|S_n^+ - f^+| \leq \frac{1}{2^n} < \frac{1}{2^N} < \frac{\epsilon}{2\mu(X)}, \;\; \int_X |f^+ - s_n^+ | d\mu \leq \frac{1}{2^n}\mu(X) < \epsilon.$
Apply same procedure on $s^-_n$. And since
\begin{align*}
\int_X | f-s|d\mu &= \int_X | f^+-f^- -s^+ +s^-|d\mu \\
& < \int_X |f^+-s^+| d\mu + \int_X |f^- - s^-|d\mu
\end{align*}
We can have the conclusion.
I think If $\mu(X) = \infty$, my solution is bit awkward I guess.
But I'm not sure how can I show that $\mu(X) < \infty$ on this condition or
maybe I do not need that $\mu(X) < \infty$.
Am I wrong about my thought? or My solution is completely lost?
 A: Assume $f$ is non-negative.
Then you have an increasing sequence of non-negative simple functions $s_{n}$ such that $s_{n}\to f$ .
Then Using Monotone Convergence Theorem:-
$$\int_{X}\lim_{n\to\infty} s_{n}\,d\mu = \int_{X}f\,d\mu=\lim_{n\to\infty}\int_{X}s_{n}\,d\mu$$
So for $\epsilon>0$ we have a $N$ such that
$$\int_{X}f\,d\mu-\int_{X}s_{n}\,d\mu<\epsilon\,,\forall n\geq N$$.
So in particular
$\int_{X}(f-s_{N})\,d\mu<\epsilon$.
So in particular for a general measurable function $f$.
$f=f^{+}-f^{-}$
You have $s$ and $s'$ such that $\int_{X}(f^{+}-s)<\frac{\epsilon}{2}$. and $s,s'$ are non-negative and lesser than equal to $f^{+}$ and $f^{-}$(By construction above)
And $\int_{X}(f^{-}-s')\,d\mu<\frac{\epsilon}{2}$
So $|f-(s-s')|=|f^{+}-s-(f^{-}-s')|\leq |f^{+}-s|+|f^{-}-s'|=f^{+}-s+f^{-}-s'$
So $$\int_{X}|f-(s-s')|\,d\mu\leq \int_{X}(f^{+}-s+f^{-}-s')\,d\mu$$
$$=\int_{X}(f^{+}-s)\,d\mu+\int_{X}(f^{-}-s')\,d\mu\leq \frac{\epsilon}{2}+\frac{\epsilon}{2}$$
$s-s'$ is a simple function as difference of simple function is simple.
A: You showed that $s_n^+\rightarrow_n f^+$. Since it converges increasingly, you have $|s_n^+|\leq f^+$ for all $n$, and since $f$ is $L^1$, you can use Lebesgue theorem (valid for infinite measures).
