Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Someone asked me for a formula for the sum of the harmonic progression. So I did some calculations and gave him an approximate formula:

$$\int_1^n\frac{dx}{x} = \frac{y_1 + y_2}{2} + \frac{y_2 + y_3}{2} + \cdots +\frac{y_{n-1} + y_n}{2}$$ where $y_i$ is $i$th term of the HP $$\ln(n) = \frac{y_1}{2} + y_2 +y_3 + \cdots +\frac{y_n}{2}$$

so

$$\sum_{i=1}^n y_i = \ln(n) + \frac{y_1 + y_n}{2}$$

e.g. $1+1/2+\cdots+1/10 = 2.8525 $

actual result $= 2.9289$

My question is, how to correct this formula?

share|improve this question
    
in my opinion the sum of nth term of harmonic series cannot be accurately defined!! –  user60642 Feb 2 '13 at 7:13

3 Answers 3

up vote 12 down vote accepted

The partial sums of the harmonic series are called "harmonic numbers." The difference between the nth harmonic number and ln(n) tends to a limit as n increases, and that limit is called Euler's constant or gamma.

There's a great book about all this called Gamma: Exploring Euler's Constant.

share|improve this answer
    
It's not Euluer its Euler. –  anonymous Aug 12 '10 at 16:35
    
Thanks. I corrected the typo. –  John D. Cook Aug 13 '10 at 0:42
1  
@anonymous It's not its it's it's. –  Lee Sleek May 30 '13 at 22:26

A good quick approximation: $\log(n + 0.5) + \gamma$.

A yet more accurate approximation: $\log(n)+\gamma+1/2z+1/12z^2-1/120z^4+1/252z^6-1/240z^8+1/132z^{10}-691/32760z^{12}+\cdots$, taking as many terms as is convenient.


Error analysis:

The first formula above has maximum error of $1/24n^2$. uday's first answer has error of about 0.0024 ln n. Mine is a better approximation for all $n\neq6$.

The first formula is also better than uday's revised formula for all $n\ge46$. The expected error in uday's answer is about 0.000016.

share|improve this answer

Hey guys.... There is no correct simple general formula for sum to n terms of the series 1+1/2+1/3+1/4+ ............. + 1/n

but the following formula will be a good approximation for sum to n-terms of the above series when n>5

S = log(n+0.5) + 0.5772 + 0.04021/(n*n + 0.8848)

Deviation from the actual value fluctuates but remains relatively low..

so i guess this may be a good approximation

share|improve this answer
    
it would be interesting to see how you found these numbers if they are not just experimentally determined. –  anon Oct 13 '10 at 17:55
1  
@muad: To get close to the best approximation with constants in those places, 1.841 should be about $\exp(\gamma)$, 0.9973 should be about 1, and 0.6184 should be about 1/2. –  Charles Oct 13 '10 at 18:19
1  
@muad: Hi... i have taken values of n from 1 to 1000000 and found the values of S. Using curvefitting tool in matlab i came to that formula... –  uday kiran Oct 20 '10 at 11:21
1  
@charls: Hi... i totally agree with you but for smaller values of n,log(n+0.5)+γ has significant amount of error.. so for about n=30 my formula will give a better approximation... –  uday kiran Oct 20 '10 at 11:25
    
@uday kiran: Your new formula is worse than my simple formula for all n > 45. –  Charles Oct 24 '10 at 23:55

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.