Evaluate $$ I=\int_0^\infty \frac{\log (1+x^2)}{1+x^2} dx $$
I tried several 'obvious' substitutions e.g. $y=1+x^2, y=\log(1+x^2)$, tried integrating by parts, and combinations of substitutions and integrating by parts, but none of these approaches seemed to work out.
Finally, I have achieved this as follows. By first substituting $x=\tan \theta$ to give
$$I= -2\int_0^{\pi/2} \log \cos \theta\, d\theta$$
Then using the property that $$I= \int_0^{\pi/2} f( \cos \theta) \, d\theta = \int_0^{\pi/2} f( \sin \theta) \, d\theta$$ to obtain another expression for $I$ $$I= -2\int_0^{\pi/2} \log \sin \theta\, d\theta$$
Aadding these two expressions for $I$ yields (using $\log A + \log B = \log AB$) $$ -I = \int_0^{\pi/2} \log \sin 2 \theta\, d\theta - \frac{\pi}{2} \log2$$
Now substitute $t=2 \theta$ $$ -I = \frac{1}{2}\int_0^{\pi} \log \sin t\, dt - \frac{\pi}{2} \log2 \tag{1}\label{1}$$
Then, when $f(2a-x) = f(x)$, use the property that $$ \int_0^{2a} f(x)\,dx = 2 \int_0^{a} f(x)\,dx$$ to get $$ \int_0^\pi \log \sin t \, dt = 2 \int_0^{\pi/2} \log \sin t \, dt = -I$$
Using this with equation $\ref{1}$ finally yields $$I = \pi \log2$$
This seems a quite long winded solution and I feel I have missed something much more straightforward. I would be very interested in simpler ways of doing this integral, if possible.