Integral $\int_{0}^{\infty}\frac{\log(\cosh x)}{\cosh x}dx = \frac{\pi}{2}\log 2$ 
Show that $$\int_{0}^{\infty}\frac{\log(\cosh x)}{\cosh x}dx = \frac{\pi}{2}\log 2$$

Perform part integration, we have
\begin{align}
&\int_{0}^{\infty}\frac{\log(\cosh x)}{\cosh x} \ d{x} \\
=&\  2\tan^{-1}\left(\tanh\frac x2\right)\log(\cosh x)\bigg|_{0}^{\infty} - 2\int_{0}^{\infty}\tan^{-1}\left(\tanh\frac x2\right)\tanh x\ dx
\end{align}
But, the first part diverges!
What other path can we take? I thought of expressing the hyperbolic functions in terms of exponentials.
Awaited eagerly for the answer.
 A: $$\int_0^\infty\frac{\ln(\cosh x)}{\cosh x} dx\overset{x=-\ln t}=2 \int_0^1 \frac{\ln\left(\frac{t^2+1}{2t}\right)}{1+t^2} dt\overset{t=\tan \left(\frac{x}{2}\right)}=-\int_0^\frac{\pi}{2}\ln(\sin x)dx=\frac{\pi}{2}\ln 2$$
See here for the last integral.
Alternatively we can combine everything from above into the substitution $e^x=\cot \left(\frac{t}{2}\right)$.
A: Another method:
Let $$I(s)=\int_0^\infty \operatorname{sech}^s(x)dx$$ where $$-I'(1)=\int_0^\infty \ln\left(\cosh(x)\right)\operatorname{sech}(x)dx$$
Using my answer from this question we can evaluate $I(s)$ in terms of the Beta Function/Gamma Function.
$$I(s)=\frac{\Gamma(\frac{s}{2})\sqrt{\pi}}{2\Gamma(\frac{s+1}{2})}$$ We proceed to take the derivative: 
$$I'(s)=\frac{\sqrt{\pi}}{2}\left(\frac{\frac{1}{2}\Gamma'(\frac{s}{2})\Gamma(\frac{s+1}{2})-\frac{1}{2}\Gamma(\frac{s}{2})\Gamma'(\frac{s+1}{2})}{\Gamma^2(\frac{s+1}{2})}\right)$$
$$I'(1)=\frac{\sqrt{\pi}}{4}\left(\Gamma'\left(\frac{1}{2}\right)-\Gamma'(1)\sqrt{\pi}\right)=\frac{\pi}{4}\left(\psi_0\left(\frac{1}{2}\right)+\gamma\right)=\frac{\pi}{4}\left(-2\ln(2)-\gamma+\gamma\right)=-\frac{\pi\ln(2)}{2}$$
So $$-I'(1)=\int_0^\infty \frac{\ln(\cosh(x))}{\cosh(x)}dx=\frac{\pi\ln(2)}{2}$$
A: To avoid divergence in part integration, choose instead $v=\cot^{-1}(\sinh x )$
\begin{align}
&\int_{0}^{\infty}\frac{\ln(\cosh x)}{\cosh x}dx 
=-\int_{0}^{\infty} \ln(\cosh x)\ d(\cot^{-1}\sinh x)\\
\overset{ibp}= &\int_{0}^{\infty}\frac{\cot^{-1}(\sinh x)}{\coth x}dx
=\int_{0}^{\infty}\frac1{\coth x}\int_0^1 \frac{\sinh x}{y^2 +\sinh^2 x}dy\ dx\\
=& \int_0^1\frac1{1-y^2}\int_0^\infty 
\bigg( \frac{1}{1+\sinh^2 x}- \frac{y^2}{y^2+\sinh^2 x}\bigg)\cosh x\ dx \ dy\\
=& \ \frac\pi2 \int_0^1 \frac1{1+y}dy=\frac{\pi}{2}\ln 2
\end{align}
