Solve $\int_{0}^{\infty}\frac{\ln(2x)}{4+x^2}dx$ by contour integration I'm a little stuck with this one. I've found the singularities to be at $\pm 2i$ and $0$ (branch point). So far, using a branch cut at $2\pi$ I've found that
$$\int_{0}^{\infty}\frac{\ln(2r)}{4+r^2}dr+\int_{0}^{\infty}\frac{\ln(2r)+2\pi i}{4+r^2}dr = 2I+\int_{0}^{\infty}\frac{2\pi i}{4+r^2}dr$$
And 
$$\int_{0}^{\infty}\frac{2\pi i}{4+r^2}dr = \text{Res}(r=2i) \\ = -2\pi^2\lim_{r\to2i}\frac{r-2i}{(r-2i)(r+2i)} = \frac{i}{2}\pi^2$$
My problem is that the answer I found is completely imaginary, and I'm not sure how that's possible given that the original function is real. Any help is appreciated.

Consider 
$$f(z) = \frac{\log(2z)}{z^2+4}$$
By using a key-hole integral with branch-cut on positive axis we should get 
$$\int^\infty_0 \frac{\log(|2x|)}{x^2+4}\,dx + \int_{\infty}^{0} \frac{\log(|2x|)+2\pi i}{x^2+4}\,dx =2\pi i \sum \mathrm{Res}(f,z_0)$$
We see that the first and second integrals will cancel. Now to avoid that consider
$$f(z) = \frac{\log(2z)^2}{z^2+4}$$
By using a key-hole integral with branch-cut on positive axis we should get 
$$\int^\infty_0 \frac{\log^2(|2x|)}{x^2+4}\,dx + \int^0_{\infty} \frac{(\log(|2x|)+2\pi i)^2}{x^2+4}\,dx =2\pi i \sum \mathrm{Res}(f,z_0)$$
$$\int^\infty_0 \frac{\log^2(|2x|)}{x^2+4}\,dx - \int_0^{\infty} \frac{(\log(|2x|)+2\pi i)^2}{x^2+4}\,dx =2\pi i \sum \mathrm{Res}(f,z_0)$$
Now you can see that $\log^2(2x)$ will be cancelled and we are left out with $\log(2x)$.

Another approach
Integrate around a big half-circle indented at 0 where the branch cut is chosen on the imaginary axis then for
$$f(z) = \frac{\log(2z)}{z^2+4}$$
we have only one pole at $z = 2i$
$$\int_{-\infty}^0 \frac{\log|2x|+\pi i}{x^2+4}\,dx +\int^{\infty}_0 \frac{\log|2x|}{x^2+4}\,dx = 2\pi i \,\mathrm{Res}(f,2i)$$
$$2\int^\infty_0 \frac{\log(2x)}{x^2+4}\,dx + \pi i\int^\infty_0\frac{1}{x^2+4}\,dx = 2\pi i \,\mathrm{Res}(f,2i) $$
Note that 
$$\mathrm{Res}(f,2i) = \lim_{z \to 2i} (z-2i) \frac{\log(2z)}{(z-2i)(z+2i)} = \frac{\log(4i)}{4i} = \frac{\log(4)+(\pi i)/2}{4i}$$
$$2\int^\infty_0 \frac{\log(2x)}{x^2+4}\,dx + \pi i\int^\infty_0\frac{1}{x^2+4}\,dx = \pi \frac{\log(4)+(\pi i)/2}{2} $$
By comparison we have 
$$\int^\infty_0 \frac{\log(2x)}{x^2+4}\,dx = \frac{\pi}{2} \log(2)$$
