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.
 A: If you're still interested in approaches that use contour integration, consider the function $$f(z) = \frac{\log(1+z) \log(-z)}{1+z^{2}}.$$ 
Using the principal branch of the logarithm, there is a branch cut along $[0,\infty)$ and a branch cut along $(-\infty, -1]$.
Then integrating counterclockwise around a keyhole contour deformed around the branch cuts (see here for a picture),
$$ \begin{align} &\int_{\infty}^{0} \frac{\log(1+x) \big(\log(x) + i \pi \big)}{1+x^{2}} \ dx + \int_{0}^{\infty} \frac{\log(1+x) \big(\log (x) - i \pi \big)}{1+x^{2}} \ dx   \\ &+\int_{-\infty}^{-1} \frac{\big(\log|1+x| + i \pi \big) \log(-x)}{1+x^{2}} \ dx + \int_{-1}^{-\infty} \frac{\big(\log|1+x| - i \pi \big) \log(-x)}{1+x^{2}} \ dx   \\ &= - 2 \pi i \int_{0}^{\infty} \frac{\log(1+x)}{1+x^{2}} \ dx + 2 \pi i \int_{1}^{\infty} \frac{\log(x)}{1+x^{2}} \ dx \\ &= 2 \pi i \big( \text{Res} [f(z), i] + \text{Res} [f(z), -i] \big) \\ &= 2 \pi i \left(\frac{\log(1+i) \log(-i)}{2i} + \frac{\log(1-i)\log(i)}{-2i} \right) \\ &= 2 \pi i \left( - \frac{\pi}{4} \log(2)\right) . \end{align}$$
Therefore, 
$$ \begin{align} \int_{0}^{\infty} \frac{\log(1+x)}{1+x^{2}} \ dx &= \frac{\pi}{4} \log(2) + \int_{1}^{\infty} \frac{\log (x)}{1+x^{2}} \ dx  \\ &= \frac{\pi}{4} \log(2) - \int_{1}^{0} \frac{\log(\frac{1}{u})}{1+ (\frac{1}{u})^{2}} \frac{1}{u^{2}} \ du \\ &= \frac{\pi}{4} \log(2) - \int^{1}_{0} \frac{\log u}{1+u^{2}} \ du \\ &= \frac{\pi}{4} \log(2) + G . \end{align}$$
A: $\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{\equalby}[1]{{#1 \atop {= \atop \vphantom{\huge A}}}}
 \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]{\,#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}$
According to user  $\tt@Cody$ answer , the important integral to evaluate is
$\ds{\int_{0}^{1}{\ln\pars{x + 1} \over x^{2} + 1}\,\dd x}$. 

Hereafter we'll show a
  $\quad\color{#888}{\large\ds{\tt\ul{\mbox{simple and quite short}}}}\quad$ evaluation.

With $\ds{x \equiv \tan\pars{\theta}}$:
\begin{align}
\color{#00f}{\large\int_{0}^{1}{\ln\pars{x + 1} \over x^{2} + 1}\,\dd x}&=
\int_{0}^{\pi/4}\ln\pars{\tan\pars{\theta} + 1}\,\dd\theta
\\[3mm]&=\half\,\bracks{\int_{0}^{\pi/4}\ln\pars{\tan\pars{\theta} + 1}\,\dd\theta + \int_{0}^{\pi/4}\ln\pars{\tan\pars{{\pi \over 4} - \theta} + 1}\,\dd\theta}
\\[3mm]&=\half\,\bracks{\int_{0}^{\pi/4}\ln\pars{\tan\pars{\theta} + 1}\,\dd\theta + \int_{0}^{\pi/4}
\ln\pars{{1 - \tan\pars{\theta} \over 1 + \tan\pars{\theta}} + 1}\,\dd\theta}
\\[3mm]&=\half\,\bracks{\int_{0}^{\pi/4}\ln\pars{\tan\pars{\theta} + 1}\,\dd\theta + \int_{0}^{\pi/4}\ln\pars{2 \over 1 + \tan\pars{\theta}}\,\dd\theta}
\\[3mm]&=\half\int_{0}^{\pi/4}\ln\pars{2}\,\dd\theta
=\color{#00f}{\large{1 \over 8}\,\pi\ln\pars{2}}
\end{align}
A: 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}
$$
A: Let
$$ I(a)=\int_0^\infty\frac{\ln(1+at)}{1+t^2}dt. $$
Then $I(0)=0$ and
\begin{eqnarray}
I'(a)&=&\int_0^\infty\frac{t}{(1+at)(1+t^2)}dt\\
&=&\frac{1}{1+a^2}\int_0^\infty\left(\frac{a+t}{1+t^2}-\frac{a}{1+at}\right)dt\\
&=&\frac{1}{2(1+a^2)}(2a\arctan t-2\ln(1+at)+\ln(1+t^2))\bigg|_{0}^\infty\\
&=&\frac{a\pi-2\ln a}{2(1+a^2)}.
\end{eqnarray}
So we have
$$ I(1)=\int_0^1\frac{a\pi-2\ln a}{2(1+a^2)}da=\frac{\pi}{4}\ln2+G $$
where wu use
$$ \int_0^1\frac{\ln a}{1+a^2}da=-G. $$
A: I will propose a solution using Feynman's trick. Let $$f(\alpha)=\int_0^\infty \frac{\log(1+\alpha x)}{1+x^2}\ dx$$ where $f(1)$ is the integral we seek to evaluate.
By differentiation under the integral sign we have $$f'(\alpha)=\int_0^\infty\frac{\partial}{\partial\alpha}\frac{\log(1+\alpha x)}{1+x^2}\ dx\\ =\int_0^\infty \frac{x}{(1+x^2)(1+\alpha x)}\ dx.$$
Now we apply partial fraction decomposition: suppose that $$\frac{x}{(1+x^2)(1+\alpha x)}=\frac{Ax+B}{1+x^2}+\frac{C}{1+\alpha x}$$ for some constants $A,B,C$. By combining the fractions and collecting the terms we obtain the linear system of equations $$\begin{cases}A+\alpha B=1\\ \alpha A+C=0\\B+C=0\end{cases}$$ which we easily find to be equivalent to $$\begin{cases}A=\frac{1}{1+\alpha^2}\\B=\frac{\alpha}{1+\alpha^2}\\C=-\frac{\alpha}{1+\alpha^2}\end{cases}$$ From this we conclude that $$f'(\alpha)=\int_0^\infty \frac{Ax+B}{1+x^2}+\frac{C}{1+\alpha x}\ dx\\ =\left[\frac12 A\log(1+x^2)+B\arctan{x}+\frac{C}{\alpha}\log(1+\alpha x)\right]_{x=0}^\infty\\ =\frac\pi2 \frac{\alpha}{1+\alpha^2}-\frac{\log{\alpha}}{1+\alpha^2}$$ It is easy to see by looking at the definition that $f(0)=0$. From this it follows that $f(\alpha_0)=\int_0^{\alpha_0} f'(\alpha)\ d\alpha$, and in particular $$f(1)=\int_0^1 \frac\pi2 \frac{\alpha}{1+\alpha^2}-\frac{\log{\alpha}}{1+\alpha^2}\ d\alpha\\ =\frac{\pi}{2}\left[\frac12 \log(1+\alpha^2)\right]_{\alpha=0}^1-\int_0^1 \frac{\log \alpha}{1+\alpha^2}\ d\alpha\\ = \frac{\pi}{4}\log2+G$$ as desired.
A: \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. $$
A: Setting $a=1$ in
$$ \int_0^\infty\frac{\operatorname{Li}_a(-x)}{1+x^2}\mathrm{d}x=-2^{-a-1}\pi\, \eta(a)-a\beta(a+1)$$
we have
$$\int_0^\infty\frac{\operatorname{Li}_1(-x)}{1+x^2}\mathrm{d}x=-\int_0^\infty\frac{\ln(1+x)}{1+x^2}\mathrm{d}x=-\frac14\ln(2)-\beta(2)=-\frac14\ln(2)-G$$

Other results:
\begin{gather*}
 \int_0^\infty\frac{\operatorname{Li}_2(-x)}{1+x^2}\mathrm{d}x=-\frac{\pi^3}{96}-2\beta(3);\\
 \int_0^\infty\frac{\operatorname{Li}_3(-x)}{1+x^2}\mathrm{d}x=-\frac{3\pi}{64}\zeta(3)-3\beta(4);\\
 \int_0^\infty\frac{\operatorname{Li}_4(-x)}{1+x^2}\mathrm{d}x=-\frac{7\pi^5}{23040}-4\beta(5);\\
 \int_0^\infty\frac{\operatorname{Li}_5(-x)}{1+x^2}\mathrm{d}x=-\frac{15\pi}{1024}\zeta(5)-5\beta(6).
 \end{gather*}

Proof: By writing the integral representation of $\operatorname{Li}_a(-x)$, we have
\begin{gather*}
 \int_0^\infty\frac{\operatorname{Li}_a(-x)}{1+x^2}\mathrm{d}x=\int_0^\infty\frac{1}{1+x^2}\left(\frac{(-1)^a}{(a-1)!}\int_0^1\frac{x\ln^{a-1}(y)}{1+xy}\mathrm{d}y\right)\mathrm{d}x\\
 \{\text{change the order of the integration}\}\\
 =\frac{(-1)^a}{(a-1)!}\int_0^1\ln^{a-1}(y)\left(\int_0^\infty\frac{x}{(1+x^2)(1+xy)}\mathrm{d}x\right)\mathrm{d}y\\
 \{\text{compute the inner integral by partial fraction decomposition}\}\\
 =\frac{(-1)^a}{(a-1)!}\int_0^1\ln^{a-1}(y)\left(\frac{\pi}{2}\frac{y}{1+y^2}-\frac{\ln(y)}{1+y^2}\right)\mathrm{d}y\\
 =\frac{(-1)^a\pi}{2(a-1)!}\underbrace{\int_0^1\frac{y\ln^{a-1}(y)}{1+y^2}\mathrm{d}y}_{y=\sqrt{x}}-\frac{(-1)^a}{(a-1)!}\int_0^1\frac{\ln^a(y)}{1+y^2}\mathrm{d}y\\
 =\frac{(-1)^a\pi}{2^{a+1}(a-1)!}\int_0^1\frac{\ln^{a-1}(x)}{1+x}\mathrm{d}x-\frac{(-1)^a}{(a-1)!}\int_0^1\frac{\ln^a(y)}{1+y^2}\mathrm{d}y\\
=-2^{-a-1}\pi\, \eta(a)-a\beta(a).
 \end{gather*}
A: Following the same approach in this answer, we have
\begin{gather*}
 \int_0^\infty\frac{\ln^a(1+x)}{1+x^2}\mathrm{d}x=\int_0^\infty\frac{\ln^a\left(\frac{1+y}{y}\right)}{1+y^2}\mathrm{d}y\\
 \overset{\frac{y}{1+y}=x}{=}(-1)^a\int_0^1\frac{\ln^a(x)}{x^2+(1-x)^2}\mathrm{d}x\\
\left\{\text{write $\frac{1}{x^2+(1-x)^2}=\mathfrak{J} \frac{1+i}{1-(1+i)x}$}\right\}\\
 =(-1)^a \mathfrak{J} \int_0^1\frac{(1+i)\ln^a(x)}{1-(1+i)x}\mathrm{d}x\\
=a!\ \mathfrak{J}\{\operatorname{Li}_{a+1}(1+i)\} 
 \end{gather*}
where the last step follows from using the integral form of the polylogarithm function:
$$\operatorname{Li}_{a}(z)=\frac{(-1)^{a-1}}{(a-1)!}\int_0^1\frac{z\ln^{a-1}(t)}{1-zt}\mathrm{d}t.$$
A: Letting $x=\tan \theta$ yields
$$\begin{aligned}\int_{0}^{\infty} \frac{\ln (1+x)}{1+x^{2}}dx&=\int_{0}^{\frac{\pi}{2}}[\ln (\cos \theta+\sin \theta) d \theta-\ln (\cos \theta)] d \theta \\&= \underbrace{\int_{0}^{\frac{\pi}{4}}2\ln (\cos \theta+\sin \theta)}_{L} d \theta-\underbrace{\int_{0}^{\frac{\pi}{2}} \ln (\cos \theta) d \theta}_{-\frac{\pi}{2} \ln 2}\end{aligned}$$
For the integral $L$, $$
\begin{aligned}
L &=\int_{0}^{\frac{\pi}{4}} \ln (1+\sin 2 \theta) d \theta \\
&=\frac{1}{2} \int_{0}^{\frac{\pi}{2}} \ln (1+\sin \theta) d \theta\\
&=\frac{1}{2} \int_{0}^{\frac{\pi}{2}} \ln (1+\cos \theta) d \theta \\
&=\frac{1}{2} \int_{0}^{\frac{\pi}{2}} \ln \left(2 \cos ^{2} \frac{\theta}{2}\right) d \theta\\&= \frac{\pi}{4} \ln 2+2 \int_{0}^{\frac{\pi}{4}} \ln (\cos \theta) d \theta\\&= \frac{\pi}{4} \ln 2+2\left(\frac{G}{2}-\frac{\pi}{4} \ln 2\right)\\&= -\frac{\pi}{4} \ln 2+G
\end{aligned}
$$
where the last integral comes from my post and $G$ is the Catalan’s constant.
Now we can conclude that $$
\boxed{\int_{0}^{\infty} \frac{\ln (1+x)}{1+x^{2}}dx= \frac{\pi}{4} \ln 2+G}
$$
