Evaluate logarithmic integral $\int_{-\infty}^{\infty}\frac{\ln{(x^2+a^2)}}{x^2+b^2}\,dx$ I need help to evaluate the integral with the residue theorem:
$$\int_{-\infty}^{\infty}\frac{\ln{(x^2+a^2)}}{x^2+b^2}\,dx$$
where a,b>0 real numbers.
I think I could consider the contour integral where C is the half circle in the first two quadrant. 
But I'm not sure how to continue.
Could someone help me?
 A: Let $ a,b $ be reals such that $ 0<b<a $, we have the following :
\begin{aligned}\int_{0}^{+\infty}{\frac{\ln{\left(1+a^{2}x^{2}\right)}}{1+b^{2}x^{2}}\,\mathrm{d}x}&=\int_{0}^{+\infty}{\int_{0}^{1}{\frac{a^{2}x^{2}}{\left(1+b^{2}x^{2}\right)\left(1+a^{2}x^{2}y\right)}\mathrm{d}y}\,\mathrm{d}x}\\&=\int_{0}^{+\infty}{\int_{0}^{1}{\left(\frac{1}{\left(y-\frac{b^{2}}{a^{2}}\right)\left(1+b^{2}x^{2}\right)}-\frac{1}{\left(y-\frac{b^{2}}{a^{2}}\right)\left(1+a^{2}x^{2}y\right)}\right)\mathrm{d}y}\,\mathrm{d}x}\\ &=\int_{0}^{+\infty}{\int_{0}^{1}{\frac{\mathrm{d}y\,\mathrm{d}x}{\left(y-\frac{b^{2}}{a^{2}}\right)\left(1+b^{2}x^{2}\right)}}}-\int_{0}^{+\infty}{\int_{0}^{1}{\frac{\mathrm{d}y\,\mathrm{d}x}{\left(y-\frac{b^{2}}{a^{2}}\right)\left(1+a^{2}x^{2}y\right)}}}\\ &=\left(\int_{0}^{+\infty}{\frac{\mathrm{d}x}{1+b^{2}x^{2}}}\right)\left(\int_{0}^{1}{\frac{\mathrm{d}y}{y-\frac{b^{2}}{a^{2}}}}\right)-\int_{0}^{1}{\frac{1}{y-\frac{b^{2}}{a^{2}}}\int_{0}^{+\infty}{\frac{\mathrm{d}x}{1+a^{2}x^{2}y}}\,\mathrm{d}y}\\ &=\frac{\pi}{2b}\ln{\left(\frac{a^{2}}{b^{2}}-1\right)}-\frac{\pi}{a}\int_{0}^{1}{\frac{\mathrm{d}y}{2\sqrt{y}\left(y-\frac{b^{2}}{a^{2}}\right)}}\\ &=\frac{\pi}{2b}\ln{\left(\frac{a^{2}}{b^{2}}-1\right)}-\frac{\pi}{a}\int_{0}^{1}{\frac{\mathrm{d}y}{x^{2}-\frac{b^{2}}{a^{2}}}}\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textrm{We substituted : }y=x^{2}\\ &=\frac{\pi}{2b}\ln{\left(\frac{a^{2}}{b^{2}}-1\right)}-\frac{\pi}{2b}\left(\int_{0}^{1}{\frac{\mathrm{d}y}{x-\frac{b}{a}}}-\int_{0}^{1}{\frac{\mathrm{d}y}{x+\frac{b}{a}}}\right)\\ &=\frac{\pi}{2b}\ln{\left(\frac{a^{2}}{b^{2}}-1\right)}-\frac{\pi}{2b}\ln{\left(\frac{\frac{a}{b}-1}{\frac{a}{b}+1}\right)}\\ \int_{0}^{+\infty}{\frac{\ln{\left(1+a^{2}x^{2}\right)}}{1+b^{2}x^{2}}\,\mathrm{d}x}&=\frac{\pi}{b}\ln{\left(1+\frac{a}{b}\right)}\end{aligned}
Thus : \begin{aligned}\int_{0}^{+\infty}{\frac{\ln{\left(a^{2}+x^{2}\right)}}{b^{2}+x^{2}}\,\mathrm{d}x}&=\frac{\ln{\left(a^{2}\right)}}{b}\int_{0}^{+\infty}{\frac{\frac{1}{b}\,\mathrm{d}x}{1+\left(\frac{x}{b}\right)^{2}}}+\frac{1}{b^{2}}\int_{0}^{+\infty}{\frac{\ln{\left(1+\frac{x^{2}}{a^{2}}\right)}}{1+\frac{x^{2}}{b^{2}}}\,\mathrm{d}x}\\ &=\frac{\pi\ln{a}}{b}+\frac{\pi}{b}\ln{\left(1+\frac{b}{a}\right)}\\ \int_{0}^{+\infty}{\frac{\ln{\left(a^{2}+x^{2}\right)}}{b^{2}+x^{2}}\,\mathrm{d}x}&=\frac{\pi\ln{\left(a+b\right)}}{b}\end{aligned}
A: Let $I(a)=2\int_{0}^{\infty}\frac{\ln{(x^2+a^2)}}{x^2+b^2}\,dx$ and evaluate
$$I’(a) =\int_{0}^{\infty}\frac{4adx}{(x^2+a^2)(x^2+b^2)}= 
\frac{2\pi}{b(a+b)}$$
Then,
\begin{align}
\int_{-\infty}^{\infty}\frac{\ln{(x^2+a^2)}}{x^2+b^2}\,dx
& = I(a)=I(0)+ \int_{0}^{a}I’(t)dt\\
&=2 \int_{0}^{\infty} \frac{\ln{x^2}}{x^2+b^2}\,dx
 + \frac{2\pi}b  \int_{0}^{a}\frac1{t+b}dt\\
 &= \frac{2\pi }b \ln b + \frac{2\pi }b \ln \frac{a+b}b= \frac{2\pi }b \ln (a+b)
\end{align}
