I would like to know how to prove that staircase functions with compact support are dense in $L^1.$ the hint I got was to use the fact that continuous functions with compact support are dense in $L^1.$ So far I couldn't approximate continuous functions with compact support by staircase function. thanks. staircase function: http://en.wikipedia.org/wiki/Step_function
Continuous function $f$ on a compact interval (say of length $L$) is uniformly continuous. So for every $\epsilon / L > 0$ you can find $\delta > 0$ so that whenever $|x-y| < \delta$ it holds that $|f(x) - f(y)| < \epsilon / L$.
So, whenever you want to approximate the continuous function with step function to the precision of $\epsilon$, just use the previous argument to find some $\delta$, use it to partition the original interval into $[L/\delta]$ subintervals and define a step function $g$ having for every interval of the partition constant value $f(x)$ where $x$ belongs to the interval. Then $$\int |f(x) - g(x)| dx \leq L \cdot (\epsilon / L) = \epsilon.$$