how can I derive this identity involving the integral representation of Digamma function 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?
 A: From the Euler's Beta function properties we know that (given $\Re(a),\Re(b)>0$):
$$ \Gamma(a+b)\int_{0}^{1}x^{a-1}(1-x)^{b-1}\,dx = \Gamma(a)\Gamma(b) \tag{1}$$
differentiating both sides with respect to $a$, and exploiting the identity $\Gamma' = \psi\cdot\Gamma$, we get:
$$\psi(a+b)\Gamma(a+b)\int_{0}^{1}x^{a-1}(1-x)^{b-1}\,dx+\Gamma(a+b)\int_{0}^{1}x^{a-1}(1-x)^{b-1}\log x\,dx = \psi(a)\Gamma(a)\Gamma(b)$$
or:
$$\frac{\Gamma(a+b)}{\Gamma(a)\Gamma(b)}\int_{0}^{1}x^{a-1}(1-x)^{b-1}\log x\,dx = \psi(a)-\psi(a+b)\tag{2}$$
hence the claim follows just by taking $a=k$ and $b=N-k$.
A: 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$ !
