Bounding series with integrals Let $f(r)$ be a positive, continuous real function on $[N, \infty)$.
Is it always true that
$$
\int^{\infty}_{N+1} f(r) dr \leq \sum\limits_{i=N}^{\infty} f(i) \leq \int_{N-1}^{\infty} f(r) dr?
$$
What would I need in order it to be true?
Note: I see how to prove it when f(r) is strictly increasing or strictly decreasing, but I am looking for for some bounds that holds for a general increasing function.
 A: There are presumably many different ways to generalize the usual Integral Test from calculus. So that we're on the same page, one form of the latter is as follows:

The Integral Test for Series: Suppose $f$ is a monotonically decreasing, real-valued function on an interval $I = (a,\infty)$ such that $f(x) \geq 0$ for all $x \in I$. Then for any choice of $N > a$, the series $\sum_{i=N}^\infty f(i)$ and integral $\int_{N}^\infty f(x)\,dx$ converge and diverge together. More precisely, $\int_{N+1}^\infty f(x)\,dx \leq \sum_{i=N}^\infty f(i) \leq \int_N^\infty f(x)\,dx$.

A "proof by pictures" which gives you the idea of why this works is summed up in the following two images (courtesy of Paul's Notes):


The key idea is that, for each $n \geq N$, the integral $\int_n^{n+1} f(x)\,dx$ is approximated from below by the rectangle of width $1$ and height $f(n+1)$ and from above by the rectangle of width $1$ and height $f(n)$. In the Integral Test, this is ensured by $f$ being positive and monotonically decreasing, but if you can find other conditions on $f$ that either (a) ensure these estimates still hold or (b) bound the value of $\int_n^{n+1} f(x)\,dx$ above and below by the values of $f$ at the integers in a reasonable way, then you've just found a new version of the integral test.
Going in another direction, the following generalized integral test is attributable to G.H. Hardy and can be really useful when the function $f$ is differentiable. Its proof is more complicated than the original integral test and relies on Abel summation, which you might not have seen before. Still, I'll present it here to give you an idea of the other "integral tests" that are out there. (A proof of this result can be found here if you have JSTOR access.)

Hardy's Generalized Integral Test: Suppose $f$ is a complex-valued function defined on an interval $[N,\infty)$ such that the derivative $f'$ exists on $[N,\infty)$ and satisfies $\int_N^x f'(t)\,dt = f(x) - f(N)$ for every $x \in [N,\infty)$. If $\int_N^\infty f'(t)\,dt$ is absolutely convergent, then the series $\sum_{i=N}^\infty f(i)$ and the integral $\int_N^\infty f(x)\,dx$ converge and diverge together.

