# 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}$$

• Please avoid titles that are entirely in $\TeX$. – J. M. is a poor mathematician Apr 20 '12 at 17:35
• @J.M. I couldn't think of a better title. – peter Apr 20 '12 at 17:45

Put $x = \tan{\theta}$. Then you have
• @J.M. Yeah i think $\log{\sin{\theta}}$ was asked here sometime before. – user9413 Apr 20 '12 at 17:53
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)$$
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.$$