It is well know trivial to find an upper or lower bound for a sum by estimating it as an integral, for example $$\sum\limits_{k=1}^n f(k) \leq \int\limits_1^n f(x)\mathrm{d}x$$ if $f$ is monotone increasing. However, I wonder if its possible to determine the error term we put up with this estimation. I suspect it should be something like $$\sum\limits_{k=1}^n f(k) = \int\limits_1^n f(x)\mathrm{d}x + O(f(n))$$ but I am unable to proof this rigerously by definition of Big-O.
I would appreciate any help or hints on this.