Let $a \ge 0$ and $1/3 \ge b \ge 0$.
In the course of answering question Evaluating a double integral of a complicated rational function we came across a following integral: \begin{equation} {\mathfrak I}(a,b):=\int\limits_{-\infty}^\infty \frac{\log(b^2+x^2)}{(x+a/2)^2+(1-b)^2/4} dx \end{equation} Now, since the integrand is a product of a logarithm and a rational function it the anti-derivative of the integrand can be always found as a collection of terms that involve logs and di-logarithms. Since the anti-derivative is known its values at plus and minus infinities can be taken and the integral above evaluated. This task seems to be easy enough but in the multitude of terms that emerges makes it very hard to complete. We have completed it though and got the following result: \begin{equation} {\mathfrak I}(a,b)= 2 \pi \frac{\log(a^2+(1+b)^2)-2\log(2)}{1-b} \end{equation}
My question is how do we derive this result in some alternative way for example by using the Cauchy residue theorem.
Update: If we integrate the identity above over $a$ we get the following identity: \begin{equation} -\int\limits_{-\infty}^\infty \log(b^2+x^2) \cdot \left( \arctan(\frac{2x+a}{-1+b}) - \arctan(\frac{2x}{-1+b})\right) dx = \frac{\pi}{2} \left((1+b)(\pi-2 \arctan(\frac{1+b}{a}))+a \log(a^2+(1+b)^2)-2 a(1+\log(2)) \right) \end{equation}
Again, the question would be to derive that identity in some alternative way.