# Does my method to construct a step function correct?

Here is my homework. $f\in L([a,b]),\epsilon>0$.Prove that exist a step function $S(x)$ such that $$\int_{a}^{b}|f(x)-S(x)|dx<\epsilon$$ My method:

Assume that $f$ is non-negative, or we will discuss $f_{+}$ and $f_{-}$ of $f$.