Integral $\int^1_0\frac{\log\cos(\frac{\pi x}{2})}{x(1+x)}\,dx$ with logarithm of cosine and rational function. I have to compute an explicit form for:
$$\int^{1}_{0}\frac{\log\cos\left(\frac{\pi x}{2}\right)}{x(1+x)}\,dx$$
I tried with contour integration around rectangle but it failed.
 A: One may write, with a partial fraction decomposition and standard changes of variable,
$$
\begin{align}
\int^{1}_{0}\frac{\log\cos\left(\frac{\pi x}{2}\right)}{x(1+x)}\,dx
&=\frac\pi2 \int^{\large\frac\pi2}_{0}\frac{\log\cos u}{u\left(u+\frac\pi2\right)}\,du
\\\\&=\int^{\large\frac\pi2}_{0}\frac{\log\cos u}{u}\,du-\int^{\large\frac\pi2}_{0}\frac{\log\cos u}{u+\frac\pi2}\,du
\\\\&=\int^{\large\frac\pi2}_{0}\frac{\log\cos u}{u}\,du-\int^{\pi}_{\large\frac\pi2}\frac{\log\sin v}{v}\,dv\qquad \left(v=u+\frac\pi2\right)
\\\\&=\int^{\large\frac\pi2}_{0}\frac{\log\cos v}{v}\,dv-\int^{\pi}_{\large\frac\pi2}\frac{\log\frac{\sin v}{v}}{v}\,dv-\int^{\pi}_{\large\frac\pi2}\frac{\log v}{v}\,dv
\\\\&=\int^{\large\frac\pi2}_{0}\frac{\log\cos v}{v}\,dv-\int^{0}_{\large\frac\pi2}\frac{\log\frac{\sin v}{v}}{v}\,dv-\int^{\pi}_{0}\frac{\log\frac{\sin v}{v}}{v}\,dv-\int^{\pi}_{\large\frac\pi2}\frac{\log v}{v}\,dv
\\\\&=\int^{\large\frac\pi2}_0\frac{\log\frac{\cos v\sin v}{v}}{v}\,dv-\int^{\pi}_{0}\frac{\log\frac{\sin v}{v}}{v}\,dv-\int^{\pi}_{\large\frac\pi2}\frac{\log v}{v}\,dv 
\end{align}
$$ then, by observing that $\displaystyle\frac{\cos v\sin v}v=\frac{\sin 2v}{2v}$, the first integral above is equal to the second one, we are left with
$$
\int^{1}_{0}\frac{\log\cos\left(\frac{\pi x}{2}\right)}{x(1+x)}\,dx=-\int^{\pi}_{\large\frac\pi2}\frac{\log v}{v}\,dv =\left[-\frac{\log^2 v}{2}\right]^{\pi}_{\large\frac\pi2}
$$ giving

$$
\int^{1}_{0}\frac{\log\cos\left(\frac{\pi x}{2}\right)}{x(1+x)}\,dx=\frac12\log^2 2-\log2 \log \pi.
$$

