$\int_0^{\infty}\frac{\ln x}{x^2+a^2}\mathrm{d}x$ Evaluate Integral [duplicate]

Anyone remember the method for this? I think this should been done on the site $$\int_0^{\infty}\frac{\ln x}{x^2+a^2}\mathrm{d}x$$


Related problems: (I), (II), (III), $(4)$. Let us consider the integeral

$$ \int_{0}^{\infty}\frac{x^{s-1}}{x^2+a^2}\text{d}x, $$

which is nothing but the Mellin transform of the function $ \frac{1}{x^2+a^2}$ and it is given by

$$ F(s)=\int_{0}^{\infty}\frac{x^{s-1}}{x^2+a^2}\text{d}x = \frac{1}{2}\frac{\pi a^{s-2}}{\sin(\pi s/2)} $$

$$ \implies F'(s)=\int_{0}^{\infty}\frac{x^{s-1}\ln(x)}{x^2+a^2}\text{d}x = \frac{d}{ds}\frac{1}{2}\frac{\pi a^{s-2}}{\sin(\pi s/2)}. $$

Taking the limit as $s \to 1$ the desired result follows

$$ \int_{0}^{\infty}\frac{\ln(x)}{x^2+a^2}\text{d}x = \frac{\pi \ln(a)}{2a}. $$


I think @kiwi ment $$ \fbox {$I$} = \int_0^\infty \frac {\ln x}{x^2+a^2} dx = \left | u = \frac {a^2}x \Longrightarrow\left\{\begin{array}{c} \ln x = 2 \ln a - \ln u \\ dx = -\frac {a^2du}{u^2} \end{array}\right\} \right | = -\int_\infty^0 \frac{2\ln a - \ln u}{\frac {a^4}{u^2}+a^2}\frac {a^2 du}{u^2} = \\ 2\int_0^\infty \frac{\ln a}{u^2+a^2}du-\int_0^\infty \frac{\ln u}{u^2+a^2}du = \fbox{$2\int_0^\infty \frac{\ln a}{u^2+a^2}du - I$} $$ From last part it's clear that $$ I = \int_0^\infty \frac{\ln a}{u^2+a^2}du $$ This integral can be easily found $$ I = \ln a\int_0^\infty \frac {du}{u^2+a^2} = \frac {\ln a}a \ \left.\mbox{atan}\ \frac ua \right|_0^\infty = \frac {\pi \ln a}{2a} $$