Using Riemann sums to show that $\sum_{i=1}^n 1/i = \log{n} +c+O(1/n)$ I want to show that there exists a constant $c$ such that:
$$
\sum_{i=1}^n 1/i = \log{n} +c+O(1/n)
$$
I am thinking about Riemann sums. Any hints on that?

Consider integral $\displaystyle \int_{1}^{n}\frac{1}{x} dx=\log n$. Divide $[1,n]$ to $n$ subintervals in form $[k,k+1]$ for $k=1,2, \cdots, n-1$. You have two inequalities:
$$\int_{1}^{n}\frac{1}{x} dx = \sum_{i=1}^{n-1}\int_{i}^{i+1}\frac{1}{x}dx \leq \sum_{i=1}^{n-1}\frac{1}{i}$$
And
$$\int_{1}^{n}\frac{1}{x} dx = \sum_{i=1}^{n-1}\int_{i}^{i+1}\frac{1}{x}dx \geq \sum_{i=1}^{n-1}\frac{1}{i+1}$$
It's because for $x \in [k,k+1]$ you have $\frac{1}{k} \geq \frac{1}{x} \geq \frac{1}{k+1}$.
