# Digamma function and Harmonic numbers

#### ZaidAlyafey

##### Well-known member
MHB Math Helper
Prove the following :

$\displaystyle \psi(n)= -\gamma \,+\,\sum^{n-1}_{k=1}\frac{1}{k}$​

#### chisigma

##### Well-known member
Prove the following :

$\displaystyle \psi(n)= -\gamma \,+\,\sum^{n-1}_{k=1}\frac{1}{k}$​
In...

http://www.mathhelpboards.com/f15/difference-equation-tutorial-draft-part-i-426/

... it has been demonstrated that, if $\displaystyle \phi(*)$ is the 'digamma function', then is ...

$\displaystyle \phi(n)= - \gamma + \sum_{k=0}^{n-1} \frac{1}{1+k}$ (1)

The little 'discrepancy' is probably justified from the fact that the definition of digamma function is a little controversial...

Kind regards

$\chi$ $\sigma$

#### ZaidAlyafey

##### Well-known member
MHB Math Helper
In...

http://www.mathhelpboards.com/f15/difference-equation-tutorial-draft-part-i-426/

... it has been demonstrated that, if $\displaystyle \phi(*)$ is the 'digamma function', then is ...

$\displaystyle \phi(n)= - \gamma + \sum_{k=0}^{n-1} \frac{1}{1+k}$ (1)

The little 'discrepancy' is probably justified from the fact that the definition of digamma function is a little controversial...

Kind regards

$\chi$ $\sigma$
Interesting , I will surely read that , thanks a lot ...

#### ZaidAlyafey

##### Well-known member
MHB Math Helper
The little 'discrepancy' is probably justified from the fact that the definition of digamma function is a little controversial...

$\chi$ $\sigma$
Can you please elaborate on that ?

#### chisigma

##### Well-known member
Can you please elaborate on that ?
In...

Digamma Function -- from Wolfram MathWorld

... the digamma function is defined as...

$\displaystyle \psi(x)= \frac{d}{d x} \ln \Gamma(x)$ (1)

... where...

$\displaystyle \Gamma (x)= \int_{0}^{\infty} t^{x-1}\ e^{-t}\ dt$ (2)

... that leads to write, after long efforts...

$\displaystyle \psi(n)= - \gamma + \sum_{k=1}^{n-1} \frac{1}{k}$ (3)

I adopted a slighty different approach defining the digamma function as...

$\displaystyle \phi(x) = \frac{d}{d x} \ln x!$ (4)

... where...

$\displaystyle x!= \int_{0}^{\infty} t^{x}\ e^{-t}\ dt$ (5)

... and after long efforts I arrived to write...

$\displaystyle \phi(n) = - \gamma + \sum_{k=0}^{n-1} \frac{1}{k+1}$ (6)

Of course is a trivial question of definitions...

Kind regards

$\chi$ $\sigma$

Last edited:

#### ZaidAlyafey

##### Well-known member
MHB Math Helper
$\displaystyle \psi(x)= - \gamma + \sum_{k=1}^{n-1} \frac{1}{k}$ (3)

$\displaystyle \phi(x) = - \gamma + \sum_{k=1}^{n} \frac{1}{k}$ (6)
I assumed you meant $\psi(n)$ and $\phi(n)$ , I know this is correct for all integers but let us try to find $\psi(1)$

From (3) it is $$\displaystyle -\gamma$$ but from (6) it is $$\displaystyle -\gamma+1$$

so which is correct !

#### chisigma

##### Well-known member
I have to confess one 'phobia' of my: I don't like the function $\displaystyle \Gamma (x)$ because any time I meet it I have to do terrible efforts to decide if it is $\displaystyle \Gamma(n)= (n-1)!$ or $\displaystyle \Gamma(n)= (n+1)!$... that's why I prefer the factorial function ...

$\displaystyle x!= \int_{0}^{\infty} t^{x}\ e^{-t}\ dt$ (1)

... that for $\displaystyle x=n$ of course is n!. The conclusion is that a digamma function descending from $\displaystyle \Gamma(x)$ is called $\displaystyle \psi(x)$ and the digamma function descending from $\displaystyle x!$ I called $\phi(x)$ and is...

$\displaystyle \psi(n)= \phi (n-1)$ (2)

Kind regards

$\chi$ $\sigma$

#### Klaas van Aarsen

##### MHB Seeker
Staff member
I have to confess one 'phobia' of my: I don't like the function $\displaystyle \Gamma (x)$ because any time I meet it I have to do terrible efforts to decide if it is $\displaystyle \Gamma(n)= (n-1)!$ or $\displaystyle \Gamma(n)= (n+1)!$... that's why I prefer the factorial function ...
I have never understood the reason for this -1 stuff with the gamma function.
Do you know where it came from?
Reading the wiki article makes it suggestive that it was a bad choice from the start.

On wiki I can see that there is also a pi function introduced by Gauss, that does behave like the factorial function.
Shouldn't that one be preferred over this gamma function?
$$\Pi(n) = \Gamma(n+1) = n!$$
Wiki only states the $\Gamma$ is dominant in literature.

#### chisigma

##### Well-known member
I assumed you meant $\psi(n)$ and $\phi(n)$ , I know this is correct for all integers but let us try to find $\psi(1)$

From (3) it is $$\displaystyle -\gamma$$ but from (6) it is $$\displaystyle -\gamma+1$$

so which is correct !
Your question is very useful because permits me to remark an important topic... from my definition of digammma function descends that for x = n is...

$\displaystyle \phi(n) = - \gamma + \sum_{k=0}^{n-1} \frac{1}{k+1}$ (1)

... so that...

$\displaystyle \psi(1) = \phi(0) = - \gamma$ (2)

... which is correct. From the 'standard definition' reported on 'MonsterWolfram' descends that for x=n is...

$\displaystyle \psi(n)= - \gamma + \sum_{k=1}^{n-1} \frac{1}{k}$ (3)

... so that...

$\displaystyle \psi(1) = - \gamma + \sum_{k=1}^{0} \frac{1}{k} = \infty$ (4)

Gulp! ...

Kind regards

$\chi$ $\sigma$

Last edited:

#### Klaas van Aarsen

##### MHB Seeker
Staff member
Your question is very useful because permits me to remark an important topic... from my definition of digammma function descends that for x = n is...

$\displaystyle \phi(n) = - \gamma + \sum_{k=0}^{n-1} \frac{1}{k+1}$ (1)

... so that...

$\displaystyle \psi(1) = \phi(0) = 1 - \gamma$ (2)

... which is correct. From the 'standard definition' reported on 'MonsterWolfram' descends that for x=n is...

$\displaystyle \psi(n)= - \gamma + \sum_{k=1}^{n-1} \frac{1}{k}$ (3)

... so that...

$\displaystyle \psi(1) = - \gamma + \sum_{k=1}^{0} \frac{1}{k} = \infty$ (4)

Gulp! ...

Kind regards

$\chi$ $\sigma$
Wait!
Wolfram says $\psi(1)=-\gamma + H_0 = -\gamma$.
See here.
A sum that has an upper bound below the lower bound is an empty sum.

#### ZaidAlyafey

##### Well-known member
MHB Math Helper
According to the Weierstrass representation of the gamma function we can get :

$$\displaystyle \psi(x) = -\gamma-\frac{1}{x}+\sum^{\infty}_{n=1}\frac{x}{(n+x)}$$

Now we can put x=1 so we have :

$$\displaystyle \psi(1) = -\gamma-1+\sum^{\infty}_{n=1}\frac{1}{n(n+1)}$$

We know that : $$\displaystyle \sum^{\infty}_{n=1}\frac{1}{n(n+1)}=1$$

so $$\displaystyle \psi(1)=-\gamma$$

I described some digamma values here post #19

#### chisigma

##### Well-known member
Wait!
Wolfram says $\psi(1)=-\gamma + H_0 = -\gamma$.
See here.
A sum that has an upper bound below the lower bound is an empty sum.
'MonsterWolfram' sometime seems a little in contradiction with himself... in...

Harmonic Number -- from Wolfram MathWorld

...the following definition of the $\displaystyle H_{n}$ is reported...

$\displaystyle H_{n}= \sum_{k=1}^{n} \frac{1}{k}$ (1)

... and few lines after the $\displaystyle H_{n}$ are defined as the solution of the difference equation...

$\displaystyle H_{n} = H_{n-1} + \frac{1}{n},\ H_{1}=1$ (2)

... so that the element $\displaystyle H_{0}$ is in any case undefined...

Avoiding any type of useless controversial I symply say that the function $\displaystyle \psi(*)$ is, in my opinion, badly defined and leads sometimes to difficulties so that I prefer to use the function $\displaystyle \phi(*)$ that leads to 'secure results'...

My opinion of course...

Kind regards

$\chi$ $\sigma$

#### Klaas van Aarsen

##### MHB Seeker
Staff member
Ah well, more specifically it says:
Based on their definition, harmonic numbers satisfy the obvious recurrence equation
 (3)

with
.

In other words, this is a consequence of the definition - not the definition itself.

The article only says about the definition
A harmonic number is a number of the form
arising from truncation of the harmonic series. A harmonic number can be expressed analytically as

Then in the article it is extended to more domains.

As I see it, the article doesn't say anything about $H_0$ and it doesn't specifically make it undefined.
It just leaves it sort of hanging.
So the article is a bit sloppy with the definition... and the wiki article is too.