Convergence of piecewise constant/linear approximation to $L^1$ functions

289 Views Asked by At

I know that the class of piecewise constant/linear functions with finitely many pieces is dense in $L^1(\mathbb{R})$. I want to get a better understanding of convergence. Let us say that $g \in L^1(\mathbb{R})$ and let $h(x) = \sum_{i=1}^M h_i \mathbb{1}_{x \in [a_{i-1}, a_i)}$, with $h_i$ being constants. What is the convergence rate (in $M$) of $||h-g||$ if the $h_i$'s and $a_i$'s are chosen such that they minimize $||h-g||$.

I know for example that if $g$ is a hat-function, the convergence rate is $O(m)$. Are there any functions $g$ such that the convergence rate is very slow in $M$?