How to show that $\int_0^\infty\frac{\ln x}{1+x^2}\mathrm dx=0$? I was investigating the convergence of the improper integral
$$\int_0^\infty\frac{\ln x}{1+x^2}\mathrm dx$$
and I concluded that the integral converges. After, by curiosity, I wanted to know it approximate value using wolfram-alpha, what shows me that the actual value of the integral is zero (I checked in other CAS and they shows me the same result... it seems to be related with the Catalan constant).
There is an easy way to show why it has this value? Thank you.
 A: Another and possibly stupid approach is to use complex analysis. 
Use the following function 
$$f(z) = \frac{\log(z)}{z^2+1}$$
around the following contour 

Choose the branch cut on the imaginary axis
$$\color{red}{\int_{C_R}f(z)\,dz+\int_{c_r}f(z)\,dz}+\color{blue}{\int^R_{r}\frac{\log|x|}{x^2+1}\,dx+\int^{-r}_{-R}\frac{\log|x|+i\pi}{x^2+1}\,dx} = 2\pi i\mathrm{Res}(f,i)$$
By taking the limit $R \to 0$ and $r\to0$
We note that 
$$\left|\int_{C_R}\frac{\log(z)}{z^2+1}\,dz \right| \leq \frac{\pi R(\log|R|+2\pi)}{|R^2-1|} \sim _{\infty} 0$$
Similarly we have 
$$\left|\int_{C_r}\frac{\log(z)}{z^2+1}\,dz \right| \leq \frac{\pi r(\log|r|+2\pi)}{|r^2-1|} \sim _{0} 0$$
Also note that 
$$2\pi i\mathrm{Res}(f,i) = 2\pi i\frac{\log(i)}{2i} = \frac{\pi^2}{2}i$$
We deduce that 
$$2\int^\infty_{0}\frac{\log|x|}{x^2+1}\,dx+i\pi \int^{\infty}_0\frac{1}{x^2+1}\,dx = \frac{\pi^2}{2}i$$
Since we have no real part we deduce that 
$$\int^\infty_{0}\frac{\log(x)}{x^2+1}\,dx=0$$
A: One can write this integrand in a way that makes the result much clearer:
$$ \int_0^{\infty} \frac{\log{x}}{x+x^{-1}} \frac{dx}{x}. $$
The result now follows in a way analogous to the integral of an odd function being zero: the linear operator $ \int_0^{\infty} dx/x $ is invariant under the change of variables $y=1/x$. $\log{x}=-\log{y}$, so the logarithm is "odd" under this change of variable, whereas $x+x^{-1}$ is "even". The product of an "odd" and "even" function is "odd", and the integral of an "odd" function is zero.
(Of course, one can translate this directly to the usual odd and even by putting $x=e^u$, but this approach lives entirely in the multiplicative group $\mathbb{R}^+$, using ideas about invariant measures. It's also always worth remembering that $dx/x$ is easier to do a power law change of variables for than plain $dx$!)
A: Yet another elementary approach would be to make the substitution $x=\tan{\theta}$ which allows the $1/(1+x^2)$ term to cancel out nicely giving $$I=\int_0^{\pi/2} \log(\tan{\theta})\ d\theta \qquad (1)$$ Then we make the symmetry substitution $\theta \mapsto \pi/2 - \theta$ which turns the $\tan$ into $\cot$ as follows: $$I=\int_0^{\pi/2} \log(\cot{\theta})\ d\theta \qquad (2)$$ Now sum equations $(1)$ and $(2)$ to find $$2I = \int_0^{\pi/2} \log(\tan{\theta}\cdot \cot{\theta})\ d\theta\\= \int_0^{\pi/2} \log(1)\ d\theta\\ =0$$ and the result follows immediately.
A: I think the best way to show is to split the integral into two. In fact
$$ \int_0^\infty \frac{\ln x}{1+x^2}dx=\int_0^1 \frac{\ln x}{1+x^2}dx+\int_1^\infty \frac{\ln x}{1+x^2}dx.$$
Using $x\to\frac1x$, one has
$$ \int_1^\infty \frac{\ln x}{1+x^2}dx=-\int_0^1 \frac{\ln x}{1+x^2}dx$$
and hence
$$ \int_0^\infty \frac{\ln x}{1+x^2}dx=0. $$
