Does this equation also holds for complex parameters? I know that the following integral equation holds
$$\int_{-\infty}^{\infty}\frac{\log(a^2+x^2)}{b^2+x^2}dx=\frac{2\pi}{b}\log(a+b)$$
for $a,b>0\in\mathbb{R}$. Does it also hold for $a,b\in\mathbb{C}$ ?
 A: To support the idea of @Conrad about analytic continuation.
If $\Re \,{a,b}>0 \quad{a}=|a|e^{i\phi_a}$ and ${b}=|b|e^{i\phi_b}$, where $\phi_a, \phi_b\in (-\frac{\pi}{2},\frac{\pi}{2})$
$$I=\int_{-\infty}^{\infty}\frac{\log(a^2+x^2)}{b^2+x^2}dx=\int_{-\infty}^{\infty}\frac{\log\bigl((x-ae^{\frac{\pi{i}}{2}})(x-ae^{\frac{-\pi{i}}{2}})\bigr)}{(x-be^{\frac{\pi{i}}{2}})(x-be^{\frac{-\pi{i}}{2}})}dx=$$
$$=\int_{-\infty}^{\infty}\frac{\log(x-ae^{\frac{\pi{i}}{2}})}{(x-be^{\frac{\pi{i}}{2}})(x-be^{\frac{-\pi{i}}{2}})}dx+\int_{-\infty}^{\infty}\frac{\log(x-ae^{\frac{-\pi{i}}{2}})}{(x-be^{\frac{\pi{i}}{2}})(x-be^{\frac{-\pi{i}}{2}})}dx$$
Logarithm in the first integral has the branch point in the upper half of complex plane, so we close the contour in the lower half-plane (to keep the integrand a single-valued function). For the second integral we close the contour in the upper half-plane (integrating counter-clockwise along a half-circle of a big radius $R$ ). Integrals along half-circles $\to0$ at $R\to\infty$, and we get
$$I=-2\pi{i}\,\frac{\log(be^{\frac{-\pi{i}}{2}}-ae^{\frac{\pi{i}}{2}})}{(be^{\frac{-\pi{i}}{2}}-be^{\frac{\pi{i}}{2}})}+2\pi{i}\,\frac{\log(be^{\frac{\pi{i}}{2}}-ae^{\frac{-\pi{i}}{2}})}{(be^{\frac{\pi{i}}{2}}-be^{\frac{-\pi{i}}{2}})}=$$
$$=-2\pi{i}\,\frac{\log(e^{\frac{-\pi{i}}{2}}(b+a))}{-2bi}+2\pi{i}\,\frac{\log(e^{\frac{\pi{i}}{2}}(b+a))}{2bi}=\frac{2\pi}{b}\log(a+b)$$
where $\Re \,{a,b}>0$
A: Let's investigate $I(a,b)=\int_{-\infty}^{\infty}\frac{\log(a^2+x^2)}{b^2+x^2}dx$ in more details. We want to know whether the formula $\int_{-\infty}^{\infty}\frac{\log(a^2+x^2)}{b^2+x^2}dx=\frac{2\pi}{b}\log(a+b)$ holds for all $a,b\in\mathbb{C}$, or there are some limitations of its usage.
The idea of analytic continuation is that we would like to get a continuous function $I(a,b)$, if we switch from  real $a,b$ to complex ones by adding phases, i.e $a\to{a}e^{i\phi_a}$ and $a\to{b}e^{i\phi_b}$
Please also notice that the integrand is expressed in terms of $a^2$ and $b^2$ - integral "does not know" anything about $a$ and $b$. We could expect that $I(a,b)$ is in fact $I(a^2,b^2)$
Making change of the variable $t=x^2$ we get
$$I(a^2,b^2)=\int_{-\infty}^{\infty}\frac{\log(a^2+x^2)}{b^2+x^2}dx=\int_0^{\infty}\frac{\log(a^2+t)}{b^2+t}\frac{dt}{\sqrt{t}}=\int_0^{\infty}\frac{\log(A+t)}{B+t}\frac{dt}{\sqrt{t}}$$
where $A=a^2$ and $B=b^2$
To make $A$ and $B$ complex we add phases: $A=|A|e^{i\phi_A}$ and $B=|A|e^{i\phi_B}$. We  suppose that $\phi_B>\phi_A>0$
$$I(A,B)=\int_0^{\infty}\frac{\log(e^{i\phi_A}(|A|+te^{-i\phi_A}))}{|B|e^{i\phi_B}+t}\frac{dt}{\sqrt{t}}\overset{t\to{t}e^{i\phi_A}}=e^{-\frac{i\phi_A}{2}}\int_0^{\infty}\frac{\log(e^{i\phi_A}(|A|+t))}{|B|e^{i(\phi_B-\phi_A)}+t}\frac{dt}{\sqrt{t}}$$
In fact by the change $t\to{t}e^{i\phi_A}$ we also change the integration path in the complex plane. But $I(A,B)$ does not change - due to the fact that both integrals along a part of a circle of big radius $R\to\infty$ and along a part of small circle near zero (radius $r\to0$) $\to0$ and there are no singularities (residuals) inside the closed contour (point $B$ is outside this contour due to our choice $\phi_B>\phi_A$).

Introducing $C=|B|e^{i(\phi_B-\phi_A)}$ we get
$$I(A,B)=e^{-\frac{i\phi_A}{2}}i\phi_A\int_0^{\infty}\frac{dt}{\sqrt{t}(t+C)}+e^{-\frac{i\phi_A}{2}}\int_0^{\infty}\frac{\log(t+|A|)}{\sqrt{t}(t+C)}dt$$
To evaluate $\int_0^{\infty}\frac{dt}{\sqrt{t}(t+C)}$ we integrate along the contour (below), on the both sides 0f the cut from $0$ to $\infty$

$$\int_0^{\infty}\frac{dt}{\sqrt{t}(t+C)}=\frac{\pi{i}}{\sqrt{Ce^{\pi{i}}}},\,\text{if}\,\,\phi_C= \phi_B-\phi_A\neq\pi$$
If $\phi_C=\pi\,$ integral is zero.
To evaluate the second integral $\int_0^{\infty}\frac{\log(t+|A|)}{\sqrt{t}(t+C)}dt$ we use the contour with an additional cut from $-|A|$ to $-\infty$ - to make logarithm a sing-valued function.

$$\int_0^{\infty}\frac{\log(t+|A|)}{\sqrt{t}(t+C)}dt=\pi{i}\frac{\log(|A|+Ce^{\pi{i}})}{\sqrt{Ce^{\pi{i}}}}+\pi{i}\int_{|A|}^{\infty}\frac{dt}{\sqrt{te^{\pi{i}}}(t-C)}dt=$$ $$=\pi{i}\frac{\log(|A|+Ce^{\pi{i}})}{\sqrt{Ce^{\pi{i}}}}+\frac{\pi{i}}{\sqrt{Ce^{\pi{i}}}}\log({\frac{\sqrt{|A|}+\sqrt{C}}{\sqrt{|A|}-\sqrt{C}}})=$$$$=2\pi\frac{\log({\sqrt{|A|}+\sqrt{C}})}{\sqrt{C}},\, \text{if}\, \phi_C\neq\pi$$
$$=\frac{2\pi{e}^{-\frac{i\phi_A}{2}}}{\sqrt{|B|}}\arctan{\sqrt{\frac{|B|}{|A|}}}, \, \text{if}\,\, \phi_C=\phi_B-\phi_A=\pi$$
Taking all together and switching to $a^2=|A|e^{i\phi_A}=|a^2|e^{i\phi_{a^2}}$ and $b^2=|B|e^{i\phi_B}=|b^2|e^{i\phi_{b^2}}$ we get finally:
$$I(a^2,b^2)=\frac{2\pi}{\sqrt{b^2}}\log(\sqrt{a^2}+\sqrt{b^2}), \, \phi_{a^2}+\pi>\phi_{b^2}>\phi_{a^2}$$
$$I(a^2,b^2)=\frac{2\pi}{\sqrt{b^2e^{-\pi{i}}}}\arctan\sqrt{\frac{b^2e^{-\pi{i}}}{a^2}}, \, \text{if} \, \,\phi_{b^2}=\phi_{a^2}+\pi$$
