Show $\int_{0}^{\frac{\pi}{2}}\frac{x^{2}}{x^{2}+\ln^{2}(2\cos(x))}dx=\frac{\pi}{8}\left(1-\gamma+\ln(2\pi)\right)$ Here is an interesting, albeit tough, integral I ran across. It has an interesting solution which leads me to think it is doable. But, what would be a good strategy?.
$$\int_{0}^{\frac{\pi}{2}}\frac{x^{2}}{x^{2}+\ln^{2}(2\cos(x))}dx=\frac{\pi}{8}\left(1-\gamma+\ln(2\pi)\right)$$
This looks rough. What would be a good start?.  I tried various subs in order to get it into some sort of shape to use series, LaPlace, something, but made no real progress.
I even tried writing a geometric series. But that didn't really result in anything encouraging.
$$\int_{0}^{\frac{\pi}{2}}\sum_{n=0}^{\infty}(-1)^{k}\left(\frac{\ln(2\cos(x))}{x}\right)^{2k}$$
Thanks all. 
 A: In addition to the nice set of references by Raymond Manzoni, here is my proof of the identity. Frankly, I have not seen these references yet, thus I am not sure if this already appears in one of them.
Here I refer to the following identity
$$ \binom{\alpha}{\omega} = \frac{1}{2\pi} \int_{-\pi}^{\pi} \left(1 + e^{i\theta}\right)^{\alpha} e^{-i\omega \theta} \; d\theta, \ \cdots \ (1) $$
whose proof can be found in my blog post.
Now let $x$ be a real number such that $|x| < \frac{\pi}{2}$. Then simple calculation shows that
$$ \log\left(1+e^{2ix}\right) = \log(2\cos x) + ix \quad \Longleftrightarrow \quad \Im \left( \frac{-x}{\log\left(1+e^{2ix}\right)} \right) = \frac{x^2}{x^2 + \log^2(2\cos x)},$$
hence we have
$$ \begin{align*}I
&:= \int_{0}^{\frac{\pi}{2}} \frac{x^2}{x^2 + \log^2(2\cos x)} \; dx
= -\int_{0}^{\frac{\pi}{2}} \Im \left( \frac{x}{\log\left(1+e^{2ix}\right)} \right) \; dx \\
&= -\frac{1}{8}\int_{-\pi}^{\pi} \Im \left( \frac{\theta}{\log\left(1+e^{i\theta}\right)} \right) \; d\theta
= \frac{1}{8}\Re \left(  \int_{-\pi}^{\pi} \frac{i\theta}{\log\left(1+e^{i\theta}\right)} \; d\theta \right).
\end{align*}$$
Differentiating both sides of $(1)$ with respect to $\omega$ and plugging $\omega = 1$, we have
$$ \frac{1}{2\pi} \int_{-\pi}^{\pi} (-i\theta) \left(1 + e^{i\theta}\right)^{\alpha} e^{-i\theta} \; d\theta = \alpha \left(\psi_0(\alpha) - \psi_0(2)\right). $$
Now integrating both sides with respect to $\alpha$ on $[0, 1]$,
$$ \begin{align*}
-\frac{1}{2\pi} \int_{-\pi}^{\pi} \frac{i\theta}{\log \left(1 + e^{i\theta}\right)} \; d\theta
&= \int_{0}^{1} \alpha \left(\psi_0(\alpha) - \psi_0(2)\right) \; d\alpha \\
&= \left[ \alpha \log \Gamma (\alpha) \right]_{0}^{1} - \int_{0}^{1} \log \Gamma (\alpha) \; d\alpha - \frac{1}{2}\psi_0(2) \\
&= -\frac{1}{2}\left( 1 - \gamma + \log (2\pi) \right),
\end{align*}$$
where we have used the fact that
$$ \psi_0 (1+n) = -\gamma + H_n, \quad n \in \mathbb{N}$$
and 
$$ \begin{align*}
\int_{0}^{1} \log \Gamma (\alpha) \; d\alpha
& = \frac{1}{2} \int_{0}^{1} \log \left[ \Gamma (\alpha) \Gamma (1-\alpha) \right] \; d\alpha \\
&= \frac{1}{2} \int_{0}^{1} \log \left( \frac{\pi}{\sin \pi \alpha} \right) \; d\alpha \\
&= \frac{1}{2} \left( \log \pi - \int_{0}^{1}  \log \sin \pi \alpha \; d\alpha \right) \\
&= \frac{1}{2} \log (2\pi).
\end{align*} $$
Therefore we have the desired result.
A: To learn more about this very interesting integral I'll just provide the interesting links (the story itself is interesting since it was an experimental discovery first from Glasser and Oloa) :


*

*page 28 of Bailey & Borwein 'Computer-Assisted Discovery and Proof'

*Oloa's paper of 2007 'Some Euler-type integrals and a new rational series for Euler’s constant' at google or Les Mathématiques-net (or in the link 'EULER_TYPE_INTEGRALS_2007.pdf' here)

*Glasser & Mana 'The Laplace transform of the psi function'

*Dixit 2009 'The Laplace transform of the psi function'

*Amdeberhan & Moll 2010 'The Laplace transform of the digamma function: an integral due to Glasser, Manna and Oloa

*Vildanov 2010 'Generalization of the Glasser - Manna - Oloa integral and some new integrals of similar type'

*Coffey 2012 'Certain logarithmic integrals, including solution of Monthly problem #tbd, zeta values, and expressions for the Stieltjes constants'

*Weisstein has references too (see eq. (24))
Fine reading !
