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?
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?
On
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}$.
On
Here is an approach. First the sum admits the closed form
$$ S = \sum_{i=1}^{n}\frac{1}{i} = \psi(n+1)+\gamma, $$
where $\gamma$ is the Euler–Mascheroni constant and $\psi(x)$ is the digamma function. Now jut use the well known expansion of the $\psi(x)$
$$ \psi(x) = \ln(x) - \frac{1}{2x} + O\left(\frac{1}{x^{2}}\right).$$
Note that your constant $c$ can be determined exactly.
Abel's summation formula is the standard tool: $$\begin{eqnarray*}\sum_{n=1}^{N}\frac{1}{n}&=&1+\int_{1}^{N}\frac{\lfloor x\rfloor}{x^2}\,dx=1+\log N-\int_{1}^{N}\frac{\{x\}}{x^2}dx\\&=&\log N+\left(1-\int_{1}^{+\infty}\frac{\{x\}}{x^2}dx\right)+\int_{N}^{+\infty}\frac{\{x\}}{x^2}.\end{eqnarray*}\tag{1}$$ Since $\{x\}\in[0,1)$, the last term is positive and bounded by $\int_{N}^{+\infty}\frac{dx}{x^2}=\frac{1}{N}.$