A log improper integral Evaluate :
$$\int_0^{\frac{\pi}{2}}\ln ^2\left(\cos ^2x\right)\text{d}x$$
I found it can be simplified to
$$\int_0^{\frac{\pi}{2}}4\ln ^2\left(\cos x\right)\text{d}x$$
I found the exact value in the table of integrals:
$$2\pi\left(\ln ^22+\frac{\pi ^2}{12}\right)$$
Anyone knows how to evaluate this?

$$\int _{ 0 }^{ \frac { \pi  }{ 2 }  }{ { \sin }^{ 2m-1 }\left( x \right) { \cos }^{ 2n-1 }\left( x \right) dx } =B\left( m,n \right) \\ \int _{ 0 }^{ \frac { \pi  }{ 2 }  }{ { \sin }^{ 2m-1 }\left( x \right) { \left( { \cos }^{ 2 }x \right)  }^{ \frac { 2n-1 }{ 2 }  }dx } =B\left( m,n \right) $$
On differentiating it twice w.r.t. to n and taking $m=\frac{1}{2}$ and $n=\frac{1}{2}$, we get
$$\int _{ 0 }^{ \frac { \pi  }{ 2 }  }{ (\ln { \left( { \cos }^{ 2 }x \right) dx })^2  } =\frac { 1 }{ 2 } \frac { { \left( \Gamma \left( \frac { 1 }{ 2 }  \right)  \right)  }^{ 2 } }{ 1 } \left\{ { \left( \psi \left( \frac { 1 }{ 2 }  \right) -\psi \left( 1 \right)  \right)  }^{ 2 }+\psi '\left( \frac { 1 }{ 2 }  \right) -\psi '\left( 1 \right)  \right\} $$
$$\therefore \int _{ 0 }^{ \frac { \pi  }{ 2 }  }{ (\ln { \left( { \cos }^{ 2 }x \right) dx })^2  } =\frac { { \pi  }^{ 3 } }{ 6 } +2\pi { \left( \ln { 2 }  \right)  }^{ 2 }$$
