How can I evaluate the integral $$\int_{-\infty}^\infty \frac{\log(x^2+a^2)}{(x-ib)^2} dx?$$ Here $a, b$ are positive real constants. When I plug this expression in MATLAB, I obtain the answer as $$ - \frac{\mathrm{log}\!\left(x - a\, \mathrm{i}\right)\, \mathrm{i}}{a - b} - \frac{\mathrm{log}\!\left(a^2 + x^2\right)\, \mathrm{i}}{b + x\, \mathrm{i}} + \frac{\mathrm{log}\!\left(x + a\, \mathrm{i}\right)\, \mathrm{i}}{a + b} + \frac{b\, \mathrm{log}\!\left(x - b\, \mathrm{i}\right)\, 2\, \mathrm{i}}{a^2 - b^2}$$ for the indefinite integral. However I have a problematic complex logarithm, which is ambiguous depending on the branch cut. Furthermore, the MATLAB does not give an answer of the definite integral for the integration range $(-\infty, \infty)$.
This integral is motivated from physics, especially when computing a Feynman diagram.