I'm asked the following:

Using the series that defines $\gamma$, Euler's constant, what's the minimum number of terms that we have to sum in order to calculate $\gamma$ with an error less than $2 \cdot 10^{-3}$?

$\gamma$ is the difference between the harmonic series and the natural logaritm:

$$\gamma := \lim_{n \to \infty} \left( H_n - \log n\right)$$

I rearrange and managed to get this expression:

$$\sum_{n=k}^{\infty} \frac{1}{n} - \int_k^{\infty} \frac{1}{t} \ dt \lt 2 \cdot 10^{-3}, \text{ for some value of } k.$$

But I don't know how to continue, and I suspect that there is a much simpler way of going on about it, as the question wasn't suppose to be very long.

  • $\begingroup$ Your rearranged expression works out to $\infty-\infty$, which is not well defined. $\endgroup$ Mar 15, 2015 at 13:47
  • $\begingroup$ @HenningMakholm Yeah I know, I decided to ask the question here because I don't know how to tackle the problem. $\endgroup$
    – Gonate
    Mar 15, 2015 at 13:50
  • 1
    $\begingroup$ Any idea what is meant by "the series that defines $\gamma$"? It can't be the limit in your first formula, because that is not a series. We could write something like $$\gamma = 1 + \sum_{n=2}^\infty \frac1n+ \log(1-\frac1n)$$ but that's not really useful for calculation ... so presumably the problem expects you to be familiar with a different series. $\endgroup$ Mar 15, 2015 at 13:53
  • $\begingroup$ @HenningMakholm I think you might be right, but I don't about the that series. I'll take a look, thanks! $\endgroup$
    – Gonate
    Mar 15, 2015 at 13:56
  • $\begingroup$ Wikipedia lists a number of possible series expansions that could be meant. $\endgroup$ Mar 15, 2015 at 13:57

2 Answers 2



It has been pointed out that the OP's problem statement reflects fundamental misunderstandings of the material; I agree. Therefore, the problem statement should be clarified as follows:

At what minimum value of $n$ does the following relation become true?

$$H_n - \log{n} - \gamma \le 2 \cdot 10^{-3}$$

It turns out that the result is quite simple. I will begin by defining the digamma function

$$\psi(z) = \frac{d}{dx} \log{\Gamma(z)} $$

When $z$ is a positive integer, $\psi(n+1) = H_n-\gamma$. Better yet, there is a nice asymptotic approximation to determine the expected error as a function of $n$:

$$\psi(z) = \log{z} - \frac1{2 z} + O \left ( \frac1{z^2} \right ) $$

This may be seen as a consequence of Stirling's series for the Gamma function, although I am hesitant to assume that one may derive the asymptotic series of $\psi$ by taking the derivative of the Stirling series.

It then follows immediately that

$$\begin{align}H_n -\gamma= \psi(n+1) &= \log{(n+1)} - \frac1{2 (n+1)} + O \left ( \frac1{(n+1)^2} \right ) \\ &= \log{n} + \log{\left ( 1+\frac1{n} \right )} - \frac1{2 n} \frac1{1+\frac1{2 n}} + O \left ( \frac1{n^2} \right ) \\ &= \log{n} +\frac1{2 n} + O \left ( \frac1{n^2} \right )\end{align}$$

That is,

$$(H_n - \log{n})-\gamma = \frac1{2 n} + O \left ( \frac1{n^2} \right ) $$

Thus, the error as a function of $n$ is about $1/(2 n)$. So the number of terms needed to achieve an error of $2 \cdot 10^{-3}$ is about $1/(4 \cdot 10^{-3}) = 250$.

  • $\begingroup$ The number of terms in which series? $\endgroup$ Mar 15, 2015 at 15:00
  • $\begingroup$ @HenningMakholm: I see you have a problem with the OP's problem statement. OK, but I don't see how I could be more clear. $H_n$ is standard notation for $$\sum_{k=1}^n \frac1{k} $$ What else is there to say? $\endgroup$
    – Ron Gordon
    Mar 15, 2015 at 15:01
  • $\begingroup$ @HenningMakholm: I edited my comment once I saw yours. Again, so that nobody misunderstands, the "series that defines gamma" according to the OP is $H_n-\log{n}$. The OP clearly meant this. $\endgroup$
    – Ron Gordon
    Mar 15, 2015 at 15:07
  • $\begingroup$ x @RonGordon: "The series that defines $\gamma$" is a quote from the OP's homework. He said in comments that he doesn't understand which series that means, and instead tried to work from the only definition of $\gamma$ he knows, namely the limit of $H_n-\log n$. However, "$H_n-\log n$" is not a series, and can't therefore have been what the author of the homework exercise meant. The first step in solving the exercise has to be identifying which series the author had in mind. We can't just ask the OP to clarify that, because he doesn't know what the author meant! $\endgroup$ Mar 15, 2015 at 15:09
  • $\begingroup$ @HenningMakholm: I understand the ridiculousness of the phrase in question. There are lots of series "defining", i.e., involving $\gamma$. But the OP did write was he meant in the first equation. I think that leaves no room for misinterpretation. (Yes, $H_n$ is the output of a series, although $H_n-\gamma$ is a sequence.) However, whatever the OP tried to say, I do not see how what I wrote could be misunderstood, or that the OP meant something else. Maybe you have an alternative that the OP might have meant? In any case, I will clarify. $\endgroup$
    – Ron Gordon
    Mar 15, 2015 at 15:15

Hint: You can write $$\log n=\sum_{k=2}^n (\log k -\log(k-1))=\sum_{k=2}^n\int_{k-1}^k \frac1x \ dx,$$ while you can write $$H_n=\sum_{k=1}^n \frac1k=\sum_{k=1}^n \int_{k-1}^k\frac1k\ dx$$ Try to get a bound for the difference $\frac1k-\frac1x$ on the interval $x\in[k-1,k]$.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .