Evaluate $\int_0^{\pi/2}\log\cos(x)\,\mathrm{d}x$ How can you evaluate $$\int\limits_0^{\pi/2}\log\cos(x)\,\mathrm{d}x\;?$$

I first treat the integral as a derivative of a beta function
$$
I(a)=\int_0^{\frac{\pi}{2}} \cos ^a x d x=\frac{1}{2} B\left(\frac{a+1}{2}, \frac{1}{2}\right)
$$
$$
\begin{aligned}
I&\left.=\frac{\partial}{\partial a} I(a)\right|_{a=0} \left.=\left.\frac{1}{4} B\left(\frac{a+1}{2}, \frac{1}{2}\right)\left(\psi\left(\frac{a+1}{2}\right)-\psi\left(\frac{a}{2}+1\right)\right)\right) \right|_{a=0}\\
&=\frac{1}{4} B\left(\frac{1}{2}, \frac{1}{2}\right)\left[\psi\left(\frac{1}{2}\right)-\psi(1)\right]=\frac{1}{4} \pi(-\ln 4) =-\frac{\pi}{2} \ln 2 
\end{aligned}
$$
