$\newcommand{\bbx}[1]{\,\bbox[8px,border:1px groove navy]{\displaystyle{#1}}\,} \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace} \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack} \newcommand{\dd}{\mathrm{d}} \newcommand{\ds}[1]{\displaystyle{#1}} \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,} \newcommand{\ic}{\mathrm{i}} \newcommand{\mc}[1]{\mathcal{#1}} \newcommand{\mrm}[1]{\mathrm{#1}} \newcommand{\pars}[1]{\left(\,{#1}\,\right)} \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,} \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}} \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$ \begin{align} \int_{0}^{\infty}{\arctan\pars{x} \over x\pars{x^{2} + 1}}\,\dd x & \,\,\,\stackrel{\arctan\pars{x}\ \mapsto\ x}{=}\,\,\, \int_{0}^{\pi/2}{x \over \tan\pars{x}}\dd x \\[5mm] & = \left.\Re\int_{x = 0}^{x = \pi/2}{-\ic\ln\pars{z} \over \bracks{\pars{z - 1/z}/\pars{2\ic}}/\bracks{\pars{z + 1/z}/2}} \,{\dd z \over \ic z}\,\right\vert_{\ z\ =\ \exp\pars{\ic x}} \\[5mm] & = \left.-\,\Im\int_{x = 0}^{x = \pi/2}{1 + z^{2} \over 1 - z^{2}}\,\ln\pars{z}\, \,{\dd z \over z}\,\right\vert_{\ z\ =\ \exp\pars{\ic x}} \\[1cm] & \stackrel{\mrm{as}\ \epsilon\ \to\ 0^{+}}{\sim}\,\,\, \Im\int_{1}^{\epsilon}{1 - y^{2} \over 1 + y^{2}} \bracks{\ln\pars{y} + {\pi \over 2}\,\ic}\,{\dd y \over y} + \Im\int_{\pi/2}^{0}\bracks{\ln\pars{\epsilon} + \ic\theta}\ic\,\dd\theta \\[2mm] & \phantom{\stackrel{\mrm{as}\ \epsilon\ \to\ 0^{+}}{\sim}\!\!\!}\ +\ \underbrace{\Im\int_{\epsilon}^{1 - \epsilon} {1 + x^{2} \over 1 - x^{2}}\,\ln\pars{x}\,{\dd x \over x}}_{\ds{=\ 0}} \\[1cm] & = -\,{1 \over 2}\,\pi\int_{\epsilon}^{1}{1- x^{2} \over 1 + x^{2}} \,{\dd x \over x} - {1 \over 2}\,\pi\ln\pars{\epsilon} = {1 \over 2}\,\pi\int_{\epsilon}^{1} \pars{1 - {1- x^{2} \over 1 + x^{2}}}\,{\dd x \over x} \\[1cm] & \stackrel{\mrm{as}\ \epsilon\ \to\ 0^{+}}{\to}\,\,\, \pi\int_{0}^{1}{x \over x^{2} + 1}\,\dd x = \bbx{{1 \over 2}\,\pi\ln\pars{2}} \end{align}