Suppose that $f:[0,\infty)\rightarrow \mathbb C$ is a $C^1$ function satisfying $f(0)=0$ and $\int_0 ^\infty (|f(y)| + |f^{'}(y)|)dy<\infty$. Show that $$\left\vert \sum_{0\leq n< \infty} f(n) - \int_0 ^\infty f(y)dy \right|\leq \int_0 ^\infty |f^{'}(y)|dy.$$
This problem is from Barry Simon's Basic Complex Analysis, A Comprehensive Course in Analysis, Part 2A, problem 2.3.6.
Thank you.
This is a deleted question. People with good reps decided to close it down. I am reposting it here with a solution below because I think the idea behind this could save some time for the others. Also, the additional condition $f(0)=0$ is sufficient for the exercises that depend on this problem in the book.