Proof of mutual information estimate from Kraskov et al. (2004) I'm reading the Kraskov et al. (2004) paper about estimating mutual information using the Kozachenko-Leonenko estimate for Shannon entropies. I'm trying to understand the last step in Eq. 17, which says that:
$$k\binom{N-1}{k}\int_0^1 \rm{d} pp^{k-1}(1-p)^{N-k-1}\log{p}= \psi(k)-\psi(N) \ ,$$
where $k$ and $N$ are positive integers, and $\psi(x) = \frac{\Gamma'(x)}{\Gamma(x)}$ is the digamma function.
I've been searching for integral representations of the digamma function, but I am not able to explain this last result (unlike the normalisation of Eq. 16, which I can understand). It seems like a standard result, but I could not find any clear reference. Could anyone please point me towards the solution, or to a paper that has more details about how this result is derived?

I was able to derive it; I'll leave the idea here in case it can be useful to others as well. I essentially followed this answer.
We can introduce a variable $\alpha$, generalising our integral to:
$$\frac{k}{k-1} \binom{N-1}{k} \int_0^1 \rm{d}p\frac{\partial{p^{\alpha (k-1)} (1-p)^{N-k-1}}}{\partial\alpha} \ .$$
If we can solve this integral, then we will just need to use $\alpha=1$. The integral above is quite easy, since we can take out the derivative and:
$$
\frac{k}{k-1}\binom{N-1}{k}\frac{\partial}{\partial \alpha} \int_0^1 \rm{d} p p^{\alpha (k-1)} (1-p)^{N-k-1} \ ,
$$
which is the standard Beta function. Thus:
$$
\frac{k}{k-1}\binom{N-1}{k}\frac{\partial}{\partial \alpha} \frac{\Gamma(\alpha(k-1)+1) \Gamma(N-k)}{\Gamma(\alpha(k-1)+1+N-k)} \ .
$$
At this point we can calculate the derivative of the ratio:
\begin{align}
&\frac{k}{k-1} \frac{(N-1)!}{k!(N-k-1)!} (N-k-1)!\frac{\partial}{\partial \alpha} \frac{\Gamma(\alpha(k-1)+1)}{\Gamma(\alpha(k-1)+1+N-k)} = \\
& \frac{(N-1)!}{(k-1)!} \left[\frac{\Gamma'(\alpha(k-1)+1)}{\Gamma(\alpha(k-1)+1+N-k)} - \frac{\Gamma(\alpha(k-1)+1) \Gamma'(\alpha(k-1)+N-k+1)}{\Gamma^2(\alpha(k-1)+1+N-k)}\right] \ .
\end{align}
Setting $\alpha=1$, and with $\psi(x) = \frac{\Gamma'(x)}{\Gamma(x)}$, we conclude:
\begin{align}
& \frac{(N-1)!}{(k-1)!} \frac{\Gamma(k)}{\Gamma(N)}\left[\frac{\Gamma'(k)}{\Gamma(k)} - \frac{\Gamma'(N)}{\Gamma(N)}\right] = \psi(k) - \psi(N) \ .
\end{align}
