How to calculate the improper integral $\int_{0}^{\infty} \log\biggl(x+\frac{1}{x}\biggr) \cdot \frac{1}{1+x^{2}} \ dx$ How to Prove: $$\int_{0}^{\infty} \log\biggl(x+\frac{1}{x}\biggr) \cdot \frac{1}{1+x^{2}} \ dx = \pi \: \log{2}$$
 A: Put $x = \tan{\theta}$. Then you have 
\begin{align*}
I &= \int_{0}^{\pi/2} \log(\tan\theta + \cot\theta) \ d\theta \\\ &= \int_{0}^{\pi/2} \log\frac{2}{\sin{2\theta}} \ d\theta \\\ &= - \int_{0}^{\pi/2} (\log{\sin\theta} +\log{\cos\theta}) d\theta \\\ &= -2 \int\limits_{0}^{\pi/2} \log\: {\sin\theta} \ d\theta = \pi \: \log{2}
\end{align*}
A: Rewrite it as 
$$
    I =\int_0^\infty \frac{\log\left(x+\frac{1}{x}\right)}{x+\frac{1}{x}} \frac{\mathrm{d} x}{x} = \left.\frac{\mathrm{d}}{\mathrm{d}s} \mathcal{I}(s)\right|_{s=-1}
$$
where
$$
   \mathcal{I}(s) = \int_0^\infty \left( x+\frac{1}{x}\right)^s \frac{\mathrm{d} x}{x} \stackrel{x=\sqrt{\frac{u}{1-u}}}{=} \frac{1}{2} \int_0^{1} (u(1-u))^{-s/2-1} \mathrm{d} x
$$
Thus
$$
   \mathcal{I}(s) = \frac{1}{2} \operatorname{B}\left(-\frac{s}{2},-\frac{s}{2} \right) = \frac{1}{2} \frac{\Gamma^2\left(-\frac{s}{2}\right)}{\Gamma(-s)}
$$
It remains to evaluate the derivative at $s=-1$:
$$
  I = \left.\frac{\mathrm{d}}{\mathrm{d}s} \mathcal{I}(s)\right|_{s=-1} = \mathcal{I}(-1)\left( \psi(1) - \psi\left(\frac{1}{2}\right)  \right)  = \pi \log(2)
$$
The result follows from $\mathcal{I}(-1) = \frac{1}{2} B(1/2,1/2) = \frac{\pi}{2}$, and from duplication identity for digamma, evaluated as $s=1$:
$$
  \psi(s) = \log(2) + \frac{1}{2} \left( \psi\left( \frac{s}{2} \right) + \psi\left( \frac{s+1}{2} \right) \right) \stackrel{s=1}{\implies } \psi(1) - \psi(1/2) = 2 \log(2)
$$
A: Here I give another way to solve the problem. We rewrite the integral as
\begin{eqnarray}
I&=&\int_0^\infty\log(x+\frac{1}{x})\frac{1}{1+x^2}dx\\
&=&\int_0^\infty\frac{\log(1+x^2)}{1+x^2}dx-\int_0^\infty\frac{\log x}{1+x^2}dx
\end{eqnarray}
Note
$$ \int_0^\infty\frac{\log(1+x^2)}{1+x^2}dx=\pi\log 2$$
from Evaluating $\int_0^{\infty}\frac{\ln(x^2+1)}{x^2+1}dx$
and
$$ \int_0^\infty\frac{\log x}{1+x^2}dx=0. $$
Thus we have
$$ I=\pi \log 2.$$ 
