In here, there is an identity in equation 17 $$ k {N-1\choose{k}}\int_0^1 p^{k-1}(1-p)^{N-k-1}\log p\,dp =\psi(k)-\psi(N), $$ where $N$, $k(<N)$ are integers and $p$ can be regarded as the integration variable. I attempted to derive the above identity from $$ \int_0^1\dfrac{x^{p-1}-x^{q-1}}{1-x}dx=\psi(q)-\psi(p) $$ without success.
How can I derive the above identity?
Let's stat with the definition of the Beta function \begin{align} B(x,y)&:=\int_0^1 p^{x-1}\; (1-p)^{y-1}\,dp=\frac{\Gamma(x)\Gamma(y)}{\Gamma(x+y)},\quad\text{then}\\ \frac d{dx}B(x,y)&=\int_0^1 \,p^{x-1}\; (1-p)^{y-1}\,\log(p)\,dp\\ \end{align}
But $$\frac d{dx}B(x,y)=\frac{\Gamma(x)\Gamma(y)}{\Gamma(x+y)}(\psi(x)-\psi(x+y))$$ (since $\,\Gamma'(x)=\Gamma(x)\psi(x)$)
Just apply this to $\,x=k\,$ and $\,y=N-k$ !