<s>[INST] 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}$$
 [/INST] 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)
$$
</s>