<s>[INST] Prove that $\int_0^{+\infty} \frac{\ln x}{a^2+x^2} dx = \frac{\pi\ln a}{2a}$ Is that true $$\int_0^{+\infty} \cfrac{\ln x}{a^2+x^2} dx = \cfrac{\pi\ln a}{2a},$$ where $a>0$ ? And how to compute it?
 [/INST] Let
$$
\mathcal{I}(a)=\int_0^\infty\frac{\ln x}{x^2+a^2}\ dx.
$$
Using substitution $u=\dfrac{a^2}{x}\;\Rightarrow\;x=\dfrac{a^2}{u}\;\Rightarrow\;dx=-\dfrac{a^2}{u^2}\ du$ yields
\begin{align}
\mathcal{I}(a)&=\int_0^\infty\frac{\ln \left(\dfrac{a^2}{u}\right)}{\left(\dfrac{a^2}{u}\right)^2+a^2}\cdot \dfrac{a^2}{u^2}\ du\\
&=\int_0^\infty\frac{2\ln a-\ln u}{a^2+u^2}\ du\\
&=2\ln a\int_0^\infty\frac{1}{a^2+u^2}\ du-\int_0^\infty\frac{\ln u}{u^2+a^2}\ du\\
\color{red}{\mathcal{I}(a)}&=2\ln a\int_0^\infty\frac{1}{a^2+u^2}\ du-\color{red}{\mathcal{I}(a)}\\
\mathcal{I}(a)&=\ln a\int_0^\infty\frac{1}{a^2+u^2}\ du.
\end{align}
The last integral can easily be evaluated since it is a common integral. Using substitution $u=\tan\theta$, the integral turns out to be
\begin{align}
\mathcal{I}(a)&=\frac{\ln a}{a}\int_0^{\Large\frac\pi2} \ d\theta\\
&=\large\color{blue}{\frac{\pi\ln a}{2a}}.
\end{align}
</s>