<s>[INST] How to compute $\int_0^\infty \frac{\log(2+x^2)}{4+x^2}\,\mathrm dx$ Evaluate the integral
$$\int_0^\infty \frac{\log(2+x^2)}{4+x^2}dx$$
--
I started by stating that the integral from 0 to infinity should be the same as half the integral from $-\infty$ to $\infty$, that is:
$$\int_0^\infty \frac{\log(2+x^2)}{4+x^2}dx = \frac{1}{2}\int_{-\infty}^\infty \frac{\log(2+x^2)}{4+x^2}dx$$
and then by stating that this must be equal to 
$$\pi i \cdot \sum(\text{residues in upper plane})$$
noting that there is a singularity at $z=2i$ in the upper half plane, and an "issue" (I don't know if it's strictly a singularity) with the log function at $z=\sqrt{2}i$.
The residue at $z=2i$ is easily dealt with, but when I try to deal with the log issue, I can't make any headway. I decided to make my branch cut between $z=\sqrt{2}i$ and $z=-\sqrt{2}i$, and form a contour that goes around this cut and the point, but it doesn't seem to be working out for me. 
Suggestions would be appreciated! 
 [/INST] $$I=\int_{0}^{\infty} \frac{\log(2+x^2)}{4+x^2}dx=\int_{0}^{\infty} \frac{\log(a^2+x^2)}{4+x^2}dx=I(a)$$
$$\implies \frac{dI}{da}=2a \int_{0}^{\infty} \frac{dx}{(a^2+x^2)(4+x^2)]}=
\frac{2a}{4-a^2}\int_{0}^{\infty} \left( \frac{1}{a^2+x^2}-\frac{1}{4+x^2}\right) dx$$
$$\frac{dI}{da}=\frac{2a}{4-a^2}[\frac{\pi}{2a}-\frac{\pi}{4}]=\frac{\pi}{2(a+2)} \implies I(a)=\frac{\pi}{2} \ln (a+2)+C~~~~(*)$$
$$I(0)=2\int_{0}^{\infty}  \frac{\ln x}{x^2+4}dx=J~~~~(1)$$
Let $x=1/t \implies dx=-dt/t^2$ in $J$, the 
$$J=2\int_{0}^{\infty} \frac{-\ln t}{t^2+4}dt=2\int_{0}^{\infty} \frac{-\ln x}{x^2+4}dx~~~~(2)$$
Adding (1) and (2), we get $J=0=I(0)$, from (*) we get $C=-\frac{\pi}{2}\ln 2$
Thus, $$I(a)=\frac{\pi}{2} \ln (a+2)-\frac{\pi}{2} \ln 2= \frac{\pi}{2}\ln\frac{a+2}{2}=\frac{\pi}{2}\ln (1+\frac{1}{\sqrt{2}}),~ as ~a=\sqrt{2}.$$
</s>