Contour Integral for $\int_0^\infty \frac{\ln x}{(x+a)^2+b^2} \, dx$ – Real and Complex Analysis

closed-formcomplex-analysiscontour-integrationimproper-integrals

I can't prove the following result:

$$\displaystyle\int_0^\infty \frac{\ln x}{(x+a)^2+b^2} \, dx=\frac{\ln \sqrt{a^2+b^2}}{b}\arctan\frac{b}{a} \text{ for all } a,b \in \mathbb{R}.$$

Well, I consider $\displaystyle\int_C \frac{\operatorname{Ln} z}{(z+a)^2+b^2} \, dz$ where $C$ is the usual contour for this kind of integral with logarithm (actually, I don't know if I'm right). So, assuming there is a simple pole inside the interior $C$, I apply the residue theorem as:

$$\int_{C}\frac{\operatorname{Ln} z}{(z+a)^2+b^2} \, dz\\=
2\pi i\left(\lim_{z\to-a+ib}\dfrac{(z+a-ib) \operatorname{Ln} z}{(z+a-ib)(z+a+ib)}\right)\\=
\frac{\pi}{b} \operatorname{Ln} (-a+ib)=\frac{\pi}{b}(\ln (\sqrt{a^2+b^2})+i\arg (-a+ib))$$

Now, I must consider estimations of integrals on each semicircle, however I have not idea how I can reach it.

Thanks for any hint.

Best Answer

Note: my solution works only for $a>0,\,b\neq0$. Consider the function $$f\left(z\right)=\frac{\log^{2}\left(z\right)}{\left(z-a\right)^{2}+b^{2}} $$ and the branch of the logarithm corresponding to $-\pi<\arg\left(z\right)\leq\pi.$ Take the keyhole contour and define $\Gamma$ and $\gamma$ respectively the large circumference of radius $R$ and the small circumference of radius $\rho$.

enter image description here

We note that $$\left|\int_{\Gamma}f\left(z\right)dz\right|\leq\frac{\log^{2}\left(R\right)+\pi^{2}}{\left(R-\left|a\right|\right)^{2}-b^{2}}2\pi R\underset{R\rightarrow\infty}{\rightarrow}0 $$ and $$\left|\int_{\gamma}f\left(z\right)dz\right|\leq\frac{\log^{2}\left(\rho\right)+\pi^{2}}{\left|\left(\rho-\left|a\right|\right)^{2}-b^{2}\right| }2\pi\rho\underset{\rho\rightarrow0}{\rightarrow}0. $$ So we have $$2\pi i\left(\textrm{Res}_{z=a+ib}\frac{\log^{2}\left(z\right)}{\left(z-a\right)^{2}+b^{2}}+\textrm{Res}_{z=a-ib}\frac{\log^{2}\left(z\right)}{\left(z-a\right)^{2}+b^{2}}\right) $$ $$=\int_{0}^{\infty}\frac{\log^{2}\left(-x+i\epsilon\right)}{\left(-x+i\epsilon-a\right)^{2}+b^{2}}dx-\int_{0}^{\infty}\frac{\log^{2}\left(-x-i\epsilon\right)}{\left(-x-i\epsilon-a\right)^{2}+b^{2}}dx $$ $$\underset{\epsilon\rightarrow0}{\rightarrow}\int_{0}^{\infty}\frac{\left(\log\left(x\right)+i\pi\right)^{2}-\left(\log\left(x\right)-i\pi\right)^{2}}{\left(x+a\right)^{2}+b^{2}}dx $$ $$=4\pi i\int_{0}^{\infty}\frac{\log\left(x\right)}{\left(x+a\right)^{2}+b^{2}}dx $$ and for the other part we have $$\textrm{Res}_{z=a+ib}\frac{\log^{2}\left(z\right)}{\left(z-a\right)^{2}+b^{2}}+\textrm{Res}_{z=a-ib}\frac{\log^{2}\left(z\right)}{\left(z-a\right)^{2}+b^{2}}=\frac{\log^{2}\left(a+ib\right)-\log^{2}\left(a-ib\right)}{2ib}. $$ Now if we assume that $a>0 $ we have $$\frac{\left(\log\left(\sqrt{a^{2}+b^{2}}\right)+i\arg\left(a+ib\right)\right)^{2}-\left(\log\left(\sqrt{a^{2}+b^{2}}\right)+i\arg\left(a-ib\right)\right)^{2}}{2ib} \tag{1}$$ $$=\frac{2\log\left(\sqrt{a^{2}+b^{2}}\right)\arctan\left(\frac{b}{a}\right)}{b}. $$ Hence

$$\int_{0}^{\infty}\frac{\log\left(x\right)}{\left(x+a\right)^{2}+b^{2}}dx=\frac{\log\left(\sqrt{a^{2}+b^{2}}\right)\arctan\left(\frac{b}{a}\right)}{b}. $$

Addendum: the identity holds only if $a>0 $. If we assume $a<0$ from $(1)$ we have

$$\int_{0}^{\infty}\frac{\log\left(x\right)}{\left(x+a\right)^{2}+b^{2}}dx=\frac{\log\left(\sqrt{a^{2}+b^{2}}\right)\left(\pi-\arctan\left(\frac{b}{a}\right)\right)}{b}. $$