We know if $f\in C^1\left[a,b\right]$, the error term of rectangle method
$$R_n=\int_{a}^{b}fdx-\sum_{k=1}^{n}\frac{b-a}{n}f\left(a+\frac{k\left(b-a\right)}{n}\right)=O\left(\frac{1}{n}\right)$$
and my question is: we can construct a strange function $f$, differentiable everywhere, but having $R_n\ne O\left(\frac{1}{n}\right)$?
Perhaps $f\left(x\right)=x^2 \sin\left(\frac{1}{x^2}\right)$ on $\left[0,1\right]$ (defining $f\left(0\right)=0$ ) could make it, but I’m not sure if I can prove it.