TITLE: How to find $\int_{0}^{\pi/2} \log ({1+\cos x}) dx$ using real-variable methods?
QUESTION [8 upvotes]: How do you find the value of this integral, using real methods?
$$I=\displaystyle\int_{0}^{\pi/2} \log ({1+\cos x}) dx$$
The answer is $2C-\dfrac{\pi}{2}\log {2}$ where $C$ is Catalan's constant.

REPLY [7 votes]: If you don't mind, this is another solution that is more simplistic. Integrating by parts gives
\begin{align}
I
&=\int^{\pi/2}_0\ln(1+\cos{x})dx\\
&=\int^{\pi/2}_0\frac{x\sin{x}}{1+\cos{x}}dx\\
&=\int^{\pi/2}_0\frac{x\tan{x}}{\sec{x}+1}\frac{\sec{x}-1}{\sec{x}-1}dx\\
&=\underbrace{\int^{\pi/2}_0\frac{x}{\sin{x}}dx}_{2G}-\int^{\pi/2}_0\frac{x}{\tan{x}}dx\\
&=2G-\int^{\pi/2}_0x\cot{x}dx\\
&=2G+\int^{\pi/2}_0\ln\sin{x}dx\\
&=2G-\frac{\pi}{2}\ln{2}
\end{align}