<s>[INST] Evaluating $\int_0^{\pi/2} \ln(\sin(x)) dx$ using the Beta, Gamma and Digamma Functions. Evaluate 

$$I(\theta)=\int_0^{\pi/2} \ln(\sin(\theta))d\theta$$ 
  $$$$

My incorrect attempt:$$$$
Consider $$J(a,0)=\int_0^{\pi/2} \sin^a(\theta)cos^0(\theta) d\theta$$
$\dfrac{d}{da}J(0,0)=I(\theta)$$$$$
Now, $J(a,0)=\beta\bigg (\dfrac{a+1}{2},\dfrac{1}{2}\bigg ) = \dfrac{\Gamma(\frac{a+1}{2})\Gamma(\frac{1}{2})}{\Gamma(\frac{a+2}{2})}$
$$\Longrightarrow I(\theta)= \dfrac{d}{da}J(0,0) = \dfrac{\partial}{\partial a}\dfrac{\Gamma(\frac{a+1}{2})\Gamma(\frac{1}{2})}{\Gamma(\frac{a+2}{2})}\bigg |^{a=0}$$ 
$$$$
$$\dfrac{d}{da}J(0,0) = \dfrac{\Gamma(\frac{1}{2})}{\bigg (\Gamma(\frac{a+2}{2})\bigg )^2} \bigg (\frac{1}{2}\Gamma'(\frac{a+1}{2})\Gamma(\frac{a+2}{2}) -\frac{1}{2}\Gamma ' (\frac{a+2}{2})\Gamma(\frac{a+2}{2})\bigg ) $$
$$$$
$$= \dfrac{\Gamma(\frac{1}{2})}{\Gamma(\frac{a+2}{2})} \bigg ( \frac{1}{2}\psi(\frac{a+1}{2})\Gamma(\frac{a+2}{2})-\frac{1}{2}\psi(\frac{a+2}{2})\Gamma(\frac{a+1}{2})\bigg ) $$
$$$$
$$= \dfrac{\frac{1}{2}\Gamma(\frac{a+1}{2})\Gamma(\frac{1}{2})}{\Gamma(\frac{a+2}{2})}\bigg (\psi(\frac{a+1}{2}) -\psi(\frac{a+2}{2})\bigg ) $$
$$$$
$$\Longrightarrow \dfrac{d}{da}J(0,0) = \dfrac{1}{2}\Gamma(\frac{1}{2})\Gamma(\frac{1}{2})\bigg (\psi(\frac{1}{2}) -\psi(1)\bigg ) =I(\theta) $$
$$$$I was bitterly disappointed to discover that this does not give the correct answer. This is the first time I have used these Special Functions on my own and I was really hoping I would get the correct answer. $$$$I would indeed be grateful if somebody would please be so kind as to indicate the errors I have made. Many thanks in advance.
 [/INST] It does give the correct answer, indeed. I think you only need the powerful identity:
$$ \sum_{n\geq 0}\frac{1}{(n+a)(n+b)}=\frac{\psi(a)-\psi(b)}{a-b}\tag{1}$$
that follows from the series definition of the digamma function. That gives, for instance:
$$\log 2 = \sum_{n\geq 1}\frac{(-1)^{n+1}}{n} = \sum_{n\geq 0}\frac{1}{(2n+1)(2n+2)} = \frac{1}{2}\left(\psi(1)-\psi\left(\frac{1}{2}\right)\right).\tag{2}$$
</s>