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.
\begin{align*} \int_{0}^{\infty} \frac{\log (x + 1)}{x^2 + 1} \, dx &= \int_{0}^{1} \frac{\log (x + 1)}{x^2 + 1} \, dx + \int_{1}^{\infty} \frac{\log (x + 1)}{x^2 + 1} \, dx \\ &= \int_{0}^{1} \frac{\log (x + 1)}{x^2 + 1} \, dx + \int_{0}^{1} \frac{\log (x^{-1} + 1)}{x^2 + 1} \, dx \quad (x \mapsto x^{-1}) \\ &= 2 \int_{0}^{1} \frac{\log (x + 1)}{x^2 + 1} \, dx - \int_{0}^{1} \frac{\log x}{x^2 + 1} \, dx \end{align*}
For the first integral, we plug
$$ u = \frac{1-x}{1+x}, \quad dx = - \frac{2}{(u+1)^2} \, du. $$
Then it is easy to find that
$$ \int_{0}^{1} \frac{\log (x + 1)}{x^2 + 1} \, dx = \int_{0}^{1} \frac{\log 2 - \log (u + 1)}{u^2 + 1} \, du = \frac{\pi}{4}\log 2 - \int_{0}^{1} \frac{\log (u + 1)}{u^2 + 1} \, du $$
and hence
$$ \int_{0}^{1} \frac{\log (x + 1)}{x^2 + 1} \, dx = \frac{\pi}{8}\log 2. $$
For the second integral, we plug $x = e^{-t}$ and we have
\begin{align*} \int_{0}^{1} \frac{\log x}{x^2 + 1} \, dx &= - \int_{0}^{\infty} \frac{t e^{-t}}{1 + e^{-2t}} \, dt = - \sum_{n=0}^{\infty} (-1)^{n} \int_{0}^{\infty} t \, e^{-(2n+1)t} \, dt \\ &= - \sum_{n=0}^{\infty} \frac{(-1)^{n}}{(2n+1)^{2}} = - G, \end{align*}
where $G$ is the Catalan constant.
Therefore we have
$$ \int_{0}^{\infty} \frac{\log (x + 1)}{x^2 + 1} \, dx = \frac{\pi}{4} \log 2 + G. $$