I was messing around with the digamma function the other day, and I discovered this identity: $$\psi\left(\frac ab\right)=\sum_{\substack{\large\rho^b=1\\\large\rho\ne1}}(\rho^a-1)\ln(1-\bar\rho)-\gamma$$ when $0<\dfrac ab\le1$. It's unusual in that it sums over the $b$-eth roots of unity (which I don't see very often). (Note that $\bar\rho=\rho^{-1}$.) It also gives explicit values of the digamma function for all rational arguments, but no irrational ones.

Another thing that's interesting is that it's well-defined. For example, I know that $\psi\left(\dfrac12\right)=\psi\left(\dfrac24\right)$, but that's not immediately obvious if I plug those values into the RHS. It's also not immediately obvious—looking at the RHS—that the function is continuous.

Example: $\psi\left(\dfrac14\right)=(i-1)\ln(1+i)+(-1-1)\ln(1+1)+(-i-1)\ln(1-i)-\gamma=\\-3\ln2-\dfrac\pi2-\gamma$.

Since $H_n=\dfrac1n+\gamma+\psi(n)$, we can get a similar identity for the Harmonic numbers.

Is this identity well-known? Does it have a name?

(And, if so, is there a way to integrate it, so that I get a similar formula for the Gamma function?)

  • $\begingroup$ This might also be used to derive the reflection formula for digamma… $\endgroup$ Commented Oct 1, 2014 at 14:46
  • $\begingroup$ See Gauss's digamma theorem. $\endgroup$
    – Lucian
    Commented Oct 1, 2014 at 15:52
  • $\begingroup$ @Lucian Oh, wow, that's interesting. It's probably equivalent to my thing. I do feel like my version is "more elegant," though. It's also shorter. $\endgroup$ Commented Oct 1, 2014 at 16:19
  • $\begingroup$ Very nice! Another approach: math.stackexchange.com/questions/1357091/… $\endgroup$ Commented Jan 12, 2016 at 13:43
  • 2
    $\begingroup$ So I wrote this way back in 2014. In the five years since, I have completely forgotten how I found this equation, or why it's true. So, um, if anyone could rediscover my proof, I'd be pretty grateful. $\endgroup$ Commented Mar 29, 2019 at 12:13

1 Answer 1


Your formula can in fact be simplified a bit more by splitting off the term $$-\sum_{\substack{\large\rho^b=1\\\large\rho\ne1}}\ln(1-\bar\rho)=-\ln \prod_{\substack{\large\rho^b=1\\\large\rho\ne1}}(1-\bar\rho) \tag{1}$$ from the summation. Since $\bar\rho$ is also a root of unity if $\rho$ is, we may replace $\rho\to \bar\rho$ in each factor without changing the product. But the resulting product is the value of the polynomial $\dfrac{z^b-1}{z-1}$ evaluated at $z=1$, since this polynomial is monic with roots at all $b$th roots of unity save $z=1$. Hence the value of Eq. $(1)$ is $$-\ln\left(\frac{z^b-1}{z-1}\right)_{z\to 1}=-\ln(1+z+z^2+\cdots+z^{b-1})_{z\to 1}=-\ln b.$$ Thus the desired formula may be written as $$\psi\left(\frac ab\right)=\sum_{\substack{\large\rho^b=1\\\large\rho\ne1}}\rho^{-a}\ln(1-\rho)-\ln b-\gamma \tag{2}$$ where I have replaced $\rho\to \bar\rho=1/\rho$ as before. We now note that every root of unity $\rho$ can be written in the form $\rho=\omega^n$ for some $n=0,1,\cdots,b-1$ where $\omega=e^{2\pi i/b}$. Hence the sum over roots (other than unity) in Eq. $(2)$ may be written as

$$\psi\left(\frac ab\right)=\sum_{k=1}^{b-1}\omega^{-na}\ln(1-\omega)-\ln b-\gamma.$$

But this identity has already appeared on this site, in an answer showing how to derive Gauss's digamma theorem. (See the equation after "Let $t\to 1^{-}$", with $p/q$ instead of $a/b$). This validates the desired identity.

As such I'm inclined to consider your formula as being an equivalent form of the Gauss digamma function. The only substantial difference (aside from the $-\ln b$ term) is that the Gauss digamma function is explicitly real and has been written in the form of trigonometric functions.


You must log in to answer this question.

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