# Euler's Constant: The asymptotic behavior of $\left(\sum\limits_{j=1}^{N} \frac{1}{j}\right) - \log(N)$

I want to show that there exists a constant $\gamma\in\mathbb{R}$ such that

$$\sum_{j=1}^N \frac1{j} = \log(N)+\gamma+O(1/N).$$ I know how to prove that the Euler-Mascheroni constant exists (which I believe $\gamma$ to be), but I am having trouble with the big-$O$ notation and the subsequent bounding. I've considered

$$\left|\left(\sum_{j=1}^N \frac1{j}\right) - \log(N)-\gamma\right|\le |K/N|$$ for some $K$, and I was approaching this by trying to show the that the left side of the inequality decays faster, but so far am stuck. Any advice for this type of problem, or analogous ones, would be appreciated. Thanks!

-
In this special case there should be a geometric argument that bounds the error in the trapezoidal Riemann sum. In general, there's Euler-Maclaurin: en.wikipedia.org/wiki/Euler%E2%80%93Maclaurin_formula – Qiaochu Yuan Aug 3 '11 at 17:08

Here are some hints. Behind all this there is the absolutely convergent series $\displaystyle\sum_{n\ge1} u_n$ with general term $$u_n=\frac1n-\log\left(\frac{n+1}n\right).$$ You could first try to show that $\displaystyle\sum_{n=1}^{+\infty}u_n$ indeed converges, to a limit $u$ say. Then the quantity you are interested in is $$\left(\sum_{n=1}^N\frac1n\right)-\log(N)=\frac1N+\sum_{n=1}^{N-1}u_n=\frac1N+u-\sum_{n=N}^{+\infty}u_n,$$ hence you could then try to estimate the remaining term $R_N=\displaystyle\frac1N-\sum_{n=N}^{+\infty}u_n$. To do this, an estimate like $\displaystyle 0\le u_n\le\frac1{n(n+1)}$ would be enough, since one would have $$\frac1N\ge R_N\ge\frac1N-\sum_{n=N}^{+\infty}\left(\frac1n-\frac1{n+1}\right)=0,$$ implying that $R_n=O(1/N)$ and $u=\gamma$. Can you prove such an estimate, or a similar one?

-
Thanks Didier, that is very clear. I was close but did not think to pull one of the terms out of the series; I was looking at terms of the form $1/(N+1)-log((N+1)/N)$ instead of $1/N-log((N+1)/N)$ and wondering why my bounds weren't working. – user14201 Aug 3 '11 at 18:21
Thanks. You could have reached a conclusion with your premises as well, since $1/(N+1)-\log((N+1)/N)$ is of order $1/N^2$, hence summable as well. Not that it matters much... (But: did you check the estimate on $u_n$ that I rashly asserted?) – Did Aug 3 '11 at 18:46

You can observe that

$$\sum_{j=1}^n \log( 1+ \frac{1}{j} ) = \log\frac{2}{1} + \log\frac{3}{2}+ \ldots + \log \frac{n+1}{n} = \log{n+1}$$

Then observe that $\sum_{j=1}^n \frac{1}{j} = \log(n+1) + \sum_{j=1}^n \left( \frac{1}{j} - \log( 1+ \frac{1}{j} ) \right)$. The latter sum is actually convergent, since each term is bounded $0 < \frac{1}{j} - \log( 1+ \frac{1}{j} ) < \frac{1}{2j^2}$.

$$\sum_{j=1}^n \left( \frac{1}{j} - \log( 1+ \frac{1}{j} ) \right) = \sum_{j=1}^\infty \left( \frac{1}{j} - \log( 1+ \frac{1}{j} ) \right) - \sum_{j=n+1}^\infty \left( \frac{1}{j} - \log( 1+ \frac{1}{j} ) \right)$$

The sum from positive integers is a negative of the Mascheroni constant. The tail sums is of order $O(n^{-1})$.

-

Let $[x]$ denote the floor of $x$, and $\{x\}$ the fractional part. Then $$\sum_{k=1}^{N} \frac{1}{k} =1+\int_1^N \frac{[x]}{x^2}dx.$$ Then since $$\int_1^N \frac{[x]}{x^2}dx=\log N -\int_1^N \frac{\{x\}}{x^2}dx,$$ we have $$\sum_{k=1}^{N} \frac{1}{k}= \log N +1-\int_1^N \frac{\{x\}}{x^2}dx.$$

Now, $$\int_1^N \frac{\{x\}}{x^2}dx=\int_1^\infty \frac{\{x\}}{x^2}dx+O\left(\frac{1}{N}\right),$$ so we get the desired result.

-

By the MVT you have

$$\frac{\ln(k+1)- \ln(k)}{k+1-k}= \frac{1}{c_k} \,.$$

for some $k < c_k < k+1$.

Thus

$$\frac{1}{k+1} < \ln(k+1)- \ln(k) < \frac{1}{k} \,.$$

From here, it is trivial to prove that

$$a_n=1+\frac{1}{2}+..+\frac{1}{n} -\ln (n)$$ is decreasing to $\gamma$

while $$b_n =1+\frac{1}{2}+..+\frac{1}{n} -\ln (n+1)$$

is increasing to $\gamma$.

It follows immediately that

$$|a_n-\gamma| < |a_n -b_n| \,.$$

-