Evaluate $\int_0^1 \ln{\left(\Gamma(x)\right)}\cos^2{(\pi x)} \; {\mathrm{d}x}$ I have stumbled across the following integral and have struck a dead end...
$$\int_0^1 \ln{\left(\Gamma(x)\right)}\cos^2{(\pi x)} \; {\mathrm{d}x}$$
Where $\Gamma(x)$ is the Gamma function.
I tried expressing $\Gamma(x)$ as $(x-1)!$ then using log properties to split the integral.  Maybe there should be a summation in combination with the integral??    I believe this integral has a closed form but I would like help finding it.

The key to evaluating this integral is to utilize Euler's reflection formula, which the proof can be looked up elsewhere, by substituting $u=1-x$ so that the Gamma function "disappears":
$$I=\int_0^1 \ln{\left(\Gamma(1-u)\right)}\cos^2{(\pi u)} \; \mathrm{d}u$$
Now, add the original integral:
\begin{align*}
2I&=\int_0^1 \ln{\left(\Gamma(x)\Gamma(1-x)\right)}\cos^2{(\pi x)} \; \mathrm{d}x \\
I&=\frac{1}{2} \int_0^1 \ln{\left(\frac{\pi}{\sin{(\pi x)}}\right)}\cos^2{(\pi x)} \; \mathrm{d}x \\
I&\overset{\pi x \to x}=\frac{1}{2 \pi} \int_0^{\pi} \ln{\left(\frac{\pi}{\sin{(x)}}\right)}\cos^2{(x)} \; \mathrm{d}x \\
&=\frac{\ln{\pi}}{2 \pi} \int_0^{\pi} \cos^2{(x)} \; \mathrm{d}x-\frac{1}{2 \pi} \int_0^{\pi} \cos^2{(x)} \ln{\left({\sin{(x)}}\right)} \; \mathrm{d}x \\
&= \frac{\ln{\pi}}{4}- \frac{1}{4 \pi}\underbrace{ \int_0^{\pi} \ln{(\sin{x})} \; \mathrm{d}x}_{I_1} - \frac{1}{4 \pi}\underbrace{ \int_0^{\pi} \cos{(2x)} \ln{(\sin{x})} \; \mathrm{d}x}_{I_2}\\
\end{align*}

Now, to calculate $I_1$, use symmetry and let $u=\frac{\pi}{2}-x$, then add the two integrals:
\begin{align*}
I_1&=\int_0^{\frac{\pi}{2}} \ln{(\sin{u})} +\ln{(\cos{u})}\; \mathrm{d}u \\
I_1&=\int_0^{\frac{\pi}{2}} \ln{(\sin{(2u)})}-\ln{2} \; \mathrm{d}u\\
I_1&=\frac{I_1}{2}-\frac{\pi\ln{2}}{2}\\
I_1 &= -\pi\ln{2}\\
\end{align*}

Now, to calculate $I_2$
\begin{align*}
I_2&=2\int_0^{\frac{\pi}{2}} \cos{(2x)} \ln{(\sin{x})} \; \mathrm{d}x\\
&\overset{\sin{x} \to x}=2\int_0^1\frac{\left(1-2x^2\right)\ln{x}}{\sqrt{1-x^2}} \; \mathrm{d}x \\
&=2\int_0^1\frac{\ln{x}}{\sqrt{1-x^2}} \; \mathrm{d}x - 2\int_0^1 \frac{2x^2\ln{x}}{\sqrt{1-x^2}} \; \mathrm{d}x \\
&=-2\int_0^1 \frac{\arcsin{x}}{x}  \mathrm{d}x+ 2\int_0^1 \frac{\arcsin{x}-2x\sqrt{1-x^2}}{x} \; \mathrm{d}x \\
&=-2\int_0^1 \frac{\arcsin{x}}{x} \; \mathrm{d}x+2\int_0^1\frac{\arcsin{x}}{x} \; \mathrm{d}x-2\int_0^1 \sqrt{1-x^2} \; \mathrm{d}x \\
&=-\frac{\pi}{2}\\
\end{align*}

Therefore,
\begin{align*}
\int_0^1 \ln{\left(\Gamma(x)\right)}\cos^2{(\pi x)} \; \mathrm{d}x&=\frac{\ln{\pi}}{4}-\frac{1}{4\pi} \left(-\pi \ln{2}-\frac{\pi}{2}\right) \\
 &= \boxed{\frac{\ln{(2\pi)}}{4}+\frac{1}{8}}\\
\end{align*}
