Let $\{x\_i\mid i\in \mathbb{Z}\}$ be a partition of $\mathbb{R}$ with equal distance $h>0$, and a given function $f\in L^2(\mathbb{R})$. I approximate $f$ by $P\_hf$, the $L^2$ projection of $f$ on piecewise constant function defined as
$$P\_hf(x)=\sum\_j a\_j 1\_{(x\_j,x\_{j+1}]}(x),\; x\in \mathbb{R},\quad a\_j=\frac{1}{h}\int\_{x\_j}^{x\_{j+1}}f(y)\,dy.$$


I have shown $h\to 0$, $\|P\_hf-f\|\_{L^2(\mathbb{R})}\to 0$. Moreover, if $f\in H^1(\mathbb{R})$, using Poincare inequality on each subinterval, I get a order 1 convergence. If I require $f$ has higher regularity, is it possible to get a convergence rate higher than 1?


I asked the same question on [MSE](https://math.stackexchange.com/questions/1878581/approximation-rate-of-l2-function-by-piecewise-constant-functions). But I haven't got any response yet.




---


What I have tried:


By using Cauchy-schwarz on each subinterval and summizing them up (basically the proof of Poincare inequality), I get
$$\|P\_hf-f\|\_{L^2(\mathbb{R})}\le h\|f\|\_{H^1(\mathbb{R})},$$
but I am not sure whether this is the best approximation rate I can get. Is there any reference about this problem?



Approximation rate of $L^2$ function by piecewise constant functions
Additional smoothness will typically not improve the rate of convergence. If you have a well behaved smooth function with a derivative $f'$ that doesn't vary wildly on the intervals $I\_j=(x\_j,x\_j+h)$, then $|f(x)-a|\gtrsim |f'(x\_j)|h$ on a substantial portion of $I\_j$, so this interval makes a contribution $\gtrsim |f'(x\_j)|^2 h^3$ to $\|P\_hf-f\|^2$.


Since (under our assumption that $f'$ doesn't vary much over $I\_j$) $|f'(x\_j)|^2 h \simeq \|f'\|^2\_{L^2(I\_j)}$, you also have a lower bound $\|P\_hf-f\|\_2\gtrsim h\|f'\|\_2$ for such functions $f$.


If that sounds too abstract, then you can also work an example such as $f(x)=x$ (on $-1\le x\le 1$, say, and $f\in C\_0^{\infty}$) to confirm that the rate of convergence need not improve with additional smoothness.


