# How to find the sum of this series : $1+\frac{1}{2}+ \frac{1}{3}+\frac{1}{4}+\dots+\frac{1}{n}$

Problem :

How to find the sum of this series : $1+\frac{1}{2}+ \frac{1}{3}+\frac{1}{4}+\dots+\frac{1}{n}$

This is a Harmonic progression : So is this formula correct to sum the series :

$\frac{(number ~of ~terms)^2}{sum~ of~ all ~the~ denominators}$

$\Rightarrow$ if $\frac{1}{A} + \frac{1}{B} +\frac{1}{C}$ are in H.P.

Therefore the sum of the series can be written as :

$\Rightarrow \frac{(3)^3}{(A+B+C)}$

The exact expression for $$\displaystyle H_n:=1+\frac{1}{2}+\frac{1}{3}+\cdots\ +\frac{1}{n}$$ is not known, but you can estimate $$H_n$$ as below

Let us consider the area under the curve $$\displaystyle \frac{1}{x}$$ when $$x$$ varies from $$1$$ to $$n$$.

Now note that $$\displaystyle H_{n}-\frac{1}{n}=1+\frac{1}{2}+\frac{1}{3}+\cdots\ +\frac{1}{n-1}$$ is an overestimation of this area by rectangles. See below

And $$\displaystyle H_n-1=\frac{1}{2}+\frac{1}{3}+\cdots\ +\frac{1}{n}$$ is an underestimation of the area. See below

(source: uark.edu)

Hence $$\large H_n-1<\int_{1}^n\frac{1}{x}dx

Also, Euler discovered this beautiful property of harmonic number $$H_n$$ that $$\large \lim_{n\rightarrow \infty}\left(H_n-\ln n\right)=\gamma\approx 0.57721566490153286060651209008240243104215933593992…$$ $$\gamma$$ is called the Euler-Mascheroni constant.

• I wouldn't really call this a beautiful property of harmonic numbers, when this is in fact usually taken to be the definition of the Euler-Mascheroni constant. – Ethan Jul 25 '13 at 8:32
• But surely the fact that such a definition is allowed to EXIST is beautiful? – fretty Jul 25 '13 at 8:35
• Yes @fretty , the fact that such wonderful relation exists, makes the Harmonic series more interesting and intriguing. – Samrat Mukhopadhyay Jul 25 '13 at 9:39
• Yes, I know, I was trying to convince Ethan... – fretty Jul 26 '13 at 17:52
• And I think you succeeded in that :-) – Samrat Mukhopadhyay Jul 26 '13 at 17:53

There are other ways to represent the harmonic series, for example, recall the geometric sum:

$$\frac{1-r^n}{1-r}=1+r+r^2+\dots+r^{n-1}$$

And integrate both sides with respect to $r$ from $0$ to $1$:

\begin{align}\int_0^1\frac{1-r^n}{1-r}dr&=\int_0^11+r+r^2+\dots+r^{n-1}dr\\&=\left.\frac11r+\frac12r^2+\frac13r^3+\dots+\frac1nr^n\right|_0^1\\&=\frac11+\frac12+\frac13+\dots+\frac1n\end{align}

So we can rewrite the harmonic series as

$$1+\frac12+\frac13+\dots+\frac1n=\int_0^1\frac{1-r^n}{1-r}dr$$

Which is most useful for deriving many formulas. I used in deriving a representation of the gamma function, for example.

Note that:

$$\ln(\Gamma(n+1))=\ln(n\Gamma(n))=\ln(\Gamma(n))+\ln(n)$$

Take the derivative of both sides to get

$$\psi(n+1)=\psi(n)+\frac1n$$

Repeated application of this formula gives:

\begin{align}\psi(n+1)&=\psi(n)+\frac1n\\&=\psi(n-1)+\frac1{n-1}+\frac1n\\&=\psi(1)+1+\frac12+\frac13+\dots+\frac1n\\\psi(n+1)+\gamma&=1+\frac12+\frac13+\dots+\frac1n\end{align}

• simply beautiful :-) – gt6989b Oct 12 '18 at 15:00

That formula is not correct to sum the first few terms of the harmonic series. Trying it with even the first three would mean that $$\frac{3^2}{1+2+3} = \frac{9}{6} = 1.5 \neq \frac{1}{1} + \frac{1}{2} + \frac{1}{3}$$.

The harmonic series actually diverges, so the sum of the series as we let $n$ get large doesn't exist... You can, however, get partial sums as the harmonic numbers, however this is somewhat outside the scope of the algebra/precalculus topic you have it listed under. You can find more information here.

While I won't take any credit for this approximation as I don't know if someone else discovered it before myself, I did stumble upon this while playing around with the bound $ln(n)+\frac{1}{n} < H_n < 1+ln(n)$ for $n > 1$ which was mentioned above and the Euler-Mascheroni Constant.

Kudos to the person who first discovered this approximation (assuming there was one before myself) if they happen to see this post.

Approximation: $H_n \approx ln(n) + \frac{1}{n} + \gamma\left(1+ln\left(\frac{n}{n+1}\right)\right)$

where $\gamma = 0.577215664901532860606512...$ is the Euler-Mascheroni Constant.

Some calculations to back up this approximation

For $n = 100$

Actual Value: $H_{100} = 5.1873775...$

Approximation: $H_{100} \approx 5.1866423...$

Error: $-0.0007351...$

Percent Error: $0.0141719...$%

For $n = 1000$

Actual Value: $H_{1000} = 7.4854708...$

Approximation: $H_{1000} \approx 7.4853940...$

Error: $-0.0000768...$

Perent Error: $0.0010265...$%

I've also been able to stumble upon the fact that using the bound $ln(n+1) < H_n < 1+ln(n), n > 1$ (source: http://www.math.drexel.edu/~tolya/123_harmonic.pdf) allows you to get an approximation that is just a slight bit more inaccurate than the first one I presented at the top.

Approximation: $H_n \approx ln(n+1) + \gamma\left(1+ln\left(\frac{n}{n+1}\right)\right)$

This approximation is simpler, and a slight bit easier to calculate. However, it is slightly less accurate, so unless you are desiring extreme precision, this one may be more appealing.

The above two approximations are is relatively easy to calculate compared to some others you may find out there (like Ramanujan).

A very simplified form of Ramanujan's approximation is

$H_n \approx ln(n) + \gamma$

The above two approximations I presented are both quite a bit more accurate than this truly oversimplified version of Ramanujan's approximation. As @Winther pointed out, there is an error of approximately $\frac{0.077}{n}$ which implies that (just like pretty much all other approximations) the approximations are much closer to the actual value as $n$ gets larger. However, Ramanujan's approximation in its complete form is extremely accurate, though it is extremely complex.

If anyone wishes to know the motivation behind the derivation of these approximations (at least from how I did it), then I am happy to answer in the comments.

EDIT: I stumbled upon one that is more accurate, again kudos to whoever may have discovered it before me. Also, this is more accurate than the approximation $ln(n)+\gamma+\frac{1}{2n}$ up to some point.

$H_n = ln(n) + \gamma\left(1+\frac{50}{51n}+ln\left(\frac{n-\frac{\gamma}{10}}{n+\frac{\gamma}{10}}\right)\right)$

• Series approximations for the harmonic number (like this one) has been known since the 1700s (see e.g. en.wikipedia.org/wiki/Harmonic_number#Calculation). By series expanding the logarithm we can show that the error of your approximation is approximately $\frac{2(1-\gamma)-1}{2n} \approx - \frac{0.077}{n}$ which agrees well with what you find. You can do a bit better by simply using the approximation $H_n \approx \log(n) + \gamma + \frac{1}{2n}$. This also avoids the additional logarithm – Winther Nov 15 '16 at 3:45
• @Winther That's pretty cool! Yeah I just stumbled upon this while playing around with the bounds so as I said before I am not claiming that I am the first to discover either of these two approximations. Though, they do seem to differ from the ones you suggest. – Thomas Kim Nov 15 '16 at 4:15
• @Winther also, I know that these aren't the best approximations, but they are considerably good compared to some others that are out there. – Thomas Kim Nov 15 '16 at 4:29
• @Winther Could you actually show the calculation for error? I don't really follow on how that works w.r.t. what I initially found. – Thomas Kim Nov 23 '16 at 3:31
• It's based on using the approximation $\log((n+1)/n) \approx \frac{1}{n}$ valid for large $n$ and comparing this with the full series for $H_n$. Using this we see that your first approximation is $\approx \log(n) + \gamma + \frac{1}{n} - \frac{\gamma}{n}$ for large $n$ while the known series says that it's $\approx \log(n) + \gamma + \frac{1}{2n}$ so the difference (error) is $\approx \frac{2(1-\gamma) - 1}{2n}$ – Winther Nov 24 '16 at 13:41

There is a new formula, that I've created. It can be written in a few different ways, below are two of them:

$$\sum_{k=1}^{n}\frac{1}{k}=\frac{1}{2n}+\pi\int_{0}^{1} (1-u)\cot{\pi u}\left(1-\cos{2\pi n u}\right)\,du$$

$$\sum_{k=1}^{n}\frac{1}{k}=\frac{1}{2n}+\frac{\pi}{2}\int_{0}^{1} (1-u)\cot{\frac{\pi u}{2}}\left(1-\cos{\pi n u}\right)\,du$$

There is also a generalization that goes beyond the harmonic numbers. For a harmonic progression where $$a$$ and $$b$$ are integers:

$$\sum _{k=1}^n \frac{1}{a k+b}=-\frac{1}{2b}+\frac{1}{2(a n+b)}+2\pi\int_0^1 (1-u)\sin[\pi a n u]\sin[(a n+2b)\pi u]\cot[\pi a u]\,du$$

(Notice the formula at the top is a particular case where $$a=1$$, $$b=0$$.) For odd powers, the general formula is: $$\begin{multline} \sum_{j=1}^{n}\frac{1}{(a j+b)^{2k+1}}=-\frac{1}{2b^{2k+1}}+\frac{1}{2(a n+b)^{2k+1}}+(-1)^{k}(2\pi)^{2k+1}\\ \int_{0}^{1}\sum_{j=0}^{k}\frac{B_{2k-2j}\left(2-2^{2k-2j}\right)}{(2k-2j)!(2j+1)!}(1-u)^{2j+1}\sin{[\pi a nu]}\sin{[(a n+2b)\pi u]}\cot{[\pi au]}\,du \end{multline}$$

And for a harmonic progression where $$a$$ and $$b$$ are complex: $$\begin{multline}\nonumber \sum_{j=1}^{n}\frac{1}{(ai j+b)^k} =-\frac{1}{2b^k}+\frac{1}{2(ai n+b)^k}+ e^{-2\pi b/a}\left(\frac{2\pi}{a}\right)^k\\ \int_{0}^{1}\sum_{j=1}^{k}\frac{\phi\left(e^{-2\pi b/a},-j+1,0\right)(1-u)^{k-j}}{(j-1)!(k-j)!}e^{2\pi bu/a}\left(\frac{\sin{2\pi n u}}{2}+i \frac{1-\cos{2\pi n u}}{2}\right)\cot{\pi u}\,du \end{multline}$$

The proofs are on papers that I've posted to the arXiv.