How find this integral $I=\int_{0}^{\infty}\frac{\log{\cos^2{x}}}{1+e^{2x}}dx$ find the value
$$I=\int_{0}^{\infty}\dfrac{\log{\cos^2{x}}}{1+e^{2x}}dx$$
My try: let $$e^{2x}=u\Longrightarrow x=\dfrac{1}{2}\log{u}$$
then
$$I=\int_{1}^{\infty}\dfrac{\log{(\cos^2{(\dfrac{1}{2}\log{u})})}}{2u(1+u)}du$$
then I can't.Thank you 
 A: Referring to the identity
$$ \log|\cos x| = - \log 2 + \sum_{n=1}^{\infty} \frac{(-1)^{n-1}}{n} \cos (2nx) $$
(which can be easily obtained by considering the real part of $\log (1 + e^{2ix})$), we find that
\begin{align*}
I&= \int_{0}^{\infty} \frac{2}{1+e^{2x}} \left\{ - \log 2 + \sum_{n=1}^{\infty} \frac{(-1)^{n-1}}{n} \cos (2nx) \right\} \, dx \\
&= \int_{0}^{\infty} \frac{1}{1+e^{x}} \left\{ - \log 2 + \sum_{n=1}^{\infty} \frac{(-1)^{n-1}}{n} \cos (nx) \right\} \, dx \quad (2x \mapsto x) \\
&= - \int_{0}^{\infty} \frac{\log 2}{1+e^{x}} \, dx + \int_{0}^{\infty} \left\{ \sum_{m=1}^{\infty} (-1)^{m-1}e^{-mx} \right\} \left\{ \sum_{n=1}^{\infty} \frac{(-1)^{n-1}}{n} \cos (nx) \right\} \, dx \\
&= -\log^{2} 2 + \sum_{n=1}^{\infty}\sum_{m=1}^{\infty} \frac{(-1)^{m+n}}{n} \int_{0}^{\infty} \cos (nx) e^{-mx} \, dx \\
&= -\log^{2} 2 + \sum_{n=1}^{\infty}\sum_{m=1}^{\infty} \frac{(-1)^{m+n}}{n} \frac{m}{m^{2} + n^{2}} \\
&=: -\log^{2} 2 + S.
\end{align*}
Now let us consider the sum $S$. Interchanging the role of $m$ and $n$, we have
$$ S = \sum_{n=1}^{\infty}\sum_{m=1}^{\infty} \frac{(-1)^{m+n}}{m} \frac{n}{m^{2} + n^{2}}. $$
Averaging,
$$ S
= \frac{1}{2} \sum_{n=1}^{\infty}\sum_{m=1}^{\infty} \left(\frac{m}{n} + \frac{n}{m} \right) \frac{(-1)^{m+n}}{m^{2} + n^{2}}
= \frac{1}{2} \left( \sum_{n=1}^{\infty} \frac{(-1)^{n-1}}{n} \right)^{2}
= \frac{1}{2}\log^{2} 2. $$
Therefore the answer is 
$$ I = -\frac{1}{2}\log^{2} 2. $$
