Evaluating $\int_0^\infty \frac{\log (1+x)}{1+x^2}dx$ Can this integral be solved with contour integral or by some application of residue theorem?
$$\int_0^\infty \frac{\log (1+x)}{1+x^2}dx = \frac{\pi}{4}\log 2 + \text{Catalan constant}$$
It has two poles at $\pm i$ and  branch point of $-1$ while the integral is to be evaluated from $0\to \infty$. How to get $\text{Catalan Constant}$? Please give some hints.

In this answer, the substitution $x=\frac{1-y}{1+y}$ is used to get
$$
\int_0^1\frac{\log(1+x)}{1+x^2}\mathrm{d}x=\frac\pi8\log(2)\tag{1}
$$
We can use the substitution $x\mapsto1/x$ to get
$$
\begin{align}
\int_1^\infty\frac{\log(1+x)}{1+x^2}\mathrm{d}x
=\int_0^1\frac{\log(1+x)-\log(x)}{1+x^2}\mathrm{d}x\tag{2}
\end{align}
$$
which implies
$$
\int_0^\infty\frac{\log(1+x)}{1+x^2}\mathrm{d}x
=2\int_0^1\frac{\log(1+x)}{1+x^2}\mathrm{d}x-\int_0^1\frac{\log(x)}{1+x^2}\mathrm{d}x\tag{3}
$$
Therefore, we can use
$$
\begin{align}
\int_0^1x^k\log(x)\,\mathrm{d}x
&=\frac1{k+1}\int_0^1\log(x)\,\mathrm{d}x^{k+1}\\
&=-\frac1{k+1}\int_0^1x^{k+1}\,\mathrm{d}\log(x)\\
&=-\frac1{k+1}\int_0^1x^k\,\mathrm{d}x\\
&=-\frac1{(k+1)^2}\tag{4}
\end{align}
$$
to get
$$
\begin{align}
\int_0^\infty\frac{\log(1+x)}{1+x^2}\mathrm{d}x
&=2\int_0^1\frac{\log(1+x)}{1+x^2}\mathrm{d}x-\int_0^1\frac{\log(x)}{1+x^2}\mathrm{d}x\\
&=\frac\pi4\log(2)-\int_0^1\sum_{k=0}^\infty(-1)^kx^{2k}\log(x)\,\mathrm{d}x\\
&=\frac\pi4\log(2)+\sum_{k=0}^\infty\frac{(-1)^k}{(2k+1)^2}\\[4pt]
&=\frac\pi4\log(2)+\mathrm{G}\tag{5}
\end{align}
$$
