Prove the following using complex analysis
$$\tag{1}\int^\infty_0\frac{\ln(1+x)}{1+x^2}\,dx=\frac{\pi}{2}\ln(2)$$
I found this problem in Schaum's outlines of complex variables.
I thought that we could solve the problem using a similar method to evaluating
$$\int^\infty_0\frac{\ln(1+x^2)}{1+x^2}\,dx$$
Where we integrate the function
$$f=\frac{\log(1-iz)}{z^2+1}$$
around half a circle in the upper half plane and chosing an analytic branch of the logarithm in the region.
I spent so much time on (1) without success.
$\newcommand{\+}{^{\dagger}} \newcommand{\angles}[1]{\left\langle\, #1 \,\right\rangle} \newcommand{\braces}[1]{\left\lbrace\, #1 \,\right\rbrace} \newcommand{\bracks}[1]{\left\lbrack\, #1 \,\right\rbrack} \newcommand{\ceil}[1]{\,\left\lceil\, #1 \,\right\rceil\,} \newcommand{\dd}{{\rm d}} \newcommand{\down}{\downarrow} \newcommand{\ds}[1]{\displaystyle{#1}} \newcommand{\expo}[1]{\,{\rm e}^{#1}\,} \newcommand{\fermi}{\,{\rm f}} \newcommand{\floor}[1]{\,\left\lfloor #1 \right\rfloor\,} \newcommand{\half}{{1 \over 2}} \newcommand{\ic}{{\rm i}} \newcommand{\iff}{\Longleftrightarrow} \newcommand{\imp}{\Longrightarrow} \newcommand{\isdiv}{\,\left.\right\vert\,} \newcommand{\ket}[1]{\left\vert #1\right\rangle} \newcommand{\ol}[1]{\overline{#1}} \newcommand{\pars}[1]{\left(\, #1 \,\right)} \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} \newcommand{\pp}{{\cal P}} \newcommand{\root}[2][]{\,\sqrt[#1]{\vphantom{\large A}\,#2\,}\,} \newcommand{\sech}{\,{\rm sech}} \newcommand{\sgn}{\,{\rm sgn}} \newcommand{\totald}[3][]{\frac{{\rm d}^{#1} #2}{{\rm d} #3^{#1}}} \newcommand{\ul}[1]{\underline{#1}} \newcommand{\verts}[1]{\left\vert\, #1 \,\right\vert} \newcommand{\wt}[1]{\widetilde{#1}}$ $\ds{\int_{0}^{\infty}{\ln\pars{1 + x} \over 1 + x^{2}}\,\dd x ={\rm G} + {1 \over 4}\,\pi\,\ln\pars{2}\quad\mbox{where}\quad {\rm G} \equiv \sum_{n = 0}^{\infty}{\pars{-1}^{n} \over \pars{2n + 1}^{2}} = 0.9159\ldots}$ is the Catalan Constant.
\begin{align} {\cal I}&=2\pi\ic\,\bracks{{\ln^{2}\pars{z_{+}} \over z_{+} - z_{-}} + {\ln^{2}\pars{z_{-}} \over z_{-} - z_{+}}} =2\pi\ic\,{% \bracks{\ln\pars{2}/2 + 3\ic\pi/4}^{2} -\bracks{\ln\pars{2}/2 - 3\ic\pi/4}^{2}\over 2\ic} \\[3mm]&=\pi\bracks{\ic\,{3\pi \over 2}\,\ln\pars{2}} ={3 \over 2}\,\pi^{2}\ln\pars{2}\,\ic\tag{1} \end{align}
$$ \!\!\!\!\!\!\!\!\!\!\int_{0}^{\infty}{\ln\pars{1 + x} \over x^{2} + 1}\,\dd x ={{\cal I} \over 4\pi\ic} - \int_{0}^{1}{\ln\pars{x} \over x^{2} - 2x + 2}\,\dd x ={3 \over 8}\,\pi\ln\pars{2} -\color{#c00000}{\int_{0}^{1}{\ln\pars{x} \over x^{2} - 2x + 2}\,\dd x}\tag{2} $$ where we used result $\pars{1}$.
By replacing $\pars{3}$ in $\pars{2}$, we found: $$\color{#00f}{\large% \int_{0}^{\infty}{\ln\pars{1 + x} \over x^{2} + 1}\,\dd x =G + {1 \over 4}\,\pi\ln\pars{2}} $$