How to prove that $\int_{0}^{\infty}\sin{x}\arctan{\frac{1}{x}}\,\mathrm dx=\frac{\pi }{2} \big(\frac{e-1}e\big)$ I found this nice result.
Prove that

$$\int_{0}^{\infty}\sin{x}\arctan\left({\frac{1}{x}}\right)\,\mathrm dx=\frac{\pi }{2} \left(\frac{e-1}e\right)$$


I tried some methods but I can't evaluate it.
 A: $\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{\ds}[1]{\displaystyle{#1}}
 \newcommand{\dsc}[1]{\displaystyle{\color{red}{#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{\Li}[1]{\,{\rm Li}_{#1}}
 \newcommand{\norm}[1]{\left\vert\left\vert\, #1\,\right\vert\right\vert}
 \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}$
$\ds{\int_{0}^{\infty}\sin\pars{x}\arctan\pars{1 \over x}\,\dd x
     ={\pi \over 2}\,{\expo{} - 1 \over \expo{}}:\ {\large ?}}$.

\begin{align}&\color{#66f}{\large%
\int_{0}^{\infty}\sin\pars{x}\arctan\pars{1 \over x}\,\dd x}
=\half\int_{-\infty}^{\infty}\sin\pars{x}\arctan\pars{1 \over x}\,\dd x
\\[5mm]&=\half\,\Im\ \overbrace{%
\int_{-\infty}^{\infty}\expo{\ic x}\arctan\pars{1 \over x}\,\dd x}
^{\ds{\dsc{\ic x}\ =\ \dsc{t}\ \imp\ \dsc{x}\ =\ \dsc{-\ic t}}}
=\half\,\Im\int_{-\infty\ic}^{\infty\ic}\expo{t}\arctan\pars{\ic \over t}
\,\pars{-\ic}\,\dd t
\\[5mm]&=\half\,\Im\int_{-\infty\ic}^{\infty\ic}\expo{t}
\,{\rm arctanh}\pars{1 \over t}\,\dd t
={1 \over 4}\,\Im\int_{-\infty\ic}^{\infty\ic}
\expo{t}\ln\pars{t + 1 \over t - 1}\,\dd t
\\[5mm]&={1 \over 4}\,\Im\int_{-\infty\ic}^{\infty\ic}\expo{t}
\int_{-1}^{1}{\dd\xi \over t + \xi}
={1 \over 4}\,\Im\int_{-1}^{1}\int_{-\infty\ic}^{\infty\ic}\expo{t}
{\dd t \over t + \xi}\,\dd\xi
\\[5mm]&={1 \over 4}\,\Im\int_{-1}^{1}\pars{-\int_{-\infty}^{0}\expo{t}
{\dd t \over t + \xi + \ic 0^{+}}-\int_{0}^{-\infty}\expo{t}
{\dd t \over t + \xi - \ic 0^{+}}}\,\dd\xi
\\[5mm]&={1 \over 4}\,\Im\int_{-1}^{1}
\int_{-\infty}^{0}\expo{t}\pars{%
{1 \over t + \xi - \ic 0^{+}} - {1 \over t + \xi + \ic 0^{+}}}\,\dd t\,\dd\xi
\\[5mm]&={1 \over 4}\,\Im\int_{-1}^{1}
\int_{-\infty}^{0}\expo{t}\bracks{2\pi\ic\,\delta\pars{t + \xi}}\,\dd t\,\dd\xi
={\pi \over 2}\int_{-1}^{1}\expo{-\xi}\Theta\pars{\xi}\,\dd\xi
={\pi \over 2}\int_{0}^{1}\expo{-\xi}\,\dd\xi
\\[5mm]&={\pi \over 2}\pars{-\expo{-1} + 1}
=\color{#66f}{\large{\pi \over 2}\,{\expo{} - 1 \over \expo{}}}
\end{align}

A: Consider following parametric integral
$$I(\alpha)=\int_{0}^{\infty}\sin{x}\arctan\left({\dfrac{\alpha}{x}}\right)\,\mathrm dx$$
We have $I(0)=0$ and $I(1)$ yields required Integral.
Differentiating wrt $\alpha$, we get
$$I'(\alpha)=\int_{0}^{\infty}\frac{{x}\sin{x}}{x^2+{\alpha^2}}\,\mathrm dx=\frac{\pi}{2}e^{-\alpha}$$
$I'(\alpha)$Integrating wrt $\alpha$, we get
$$I(\alpha)=-\frac{ \pi}{2}  e^{-\alpha}+c$$
$$I(0)=-\frac{\pi}{2} +c=0\implies c=\frac\pi2$$
Hence,
$$I(\alpha)=\int_{0}^{\infty}\sin{x}\arctan\left({\dfrac{\alpha}{x}}\right)\,\mathrm dx=\frac{ \pi }{2}\Big(1- e^{-\alpha}\Big)$$
$$I(1)=\frac{\pi }{2} \left(1- \frac1e\right)=\frac{\pi }{2} \left(\frac{e-1}e\right)$$

$$\large \int_{0}^{\infty}\sin{x}\arctan\left({\dfrac{1}{x}}\right)\,\mathrm dx=\frac{\pi }{2} \left(\frac{e-1}e\right)$$

A: Here is another way to evaluate the integral. Notice that
$$\int_0^1 \frac{x}{x^2+y^2}\mathrm dy=\arctan\left(\frac{1}{x}\right)$$
We also have
$$\int_{0}^{\infty}\frac{{x}\sin{x}}{x^2+{y^2}}\,\mathrm dx=\frac{\pi}{2}e^{-y}$$
Hence
\begin{align}
\int_{0}^{\infty}\sin{x}\arctan\left({\frac{1}{x}}\right)\,\mathrm dx&=\int_{0}^{\infty}\sin{x}\int_0^1 \frac{x}{x^2+y^2}\mathrm dy\,\mathrm dx\\
&=\int_0^1 \int_{0}^{\infty}\frac{x\sin{x}}{x^2+y^2}\mathrm dx\,\mathrm dy\\
&=\frac{\pi}{2}\int_0^1 e^{-y}\,\mathrm dy\\
&=\bbox[5pt,border:3px #FF69B4 solid]{\color{red}{\large\frac{\pi }{2} \left(\frac{e-1}e\right)}}
\end{align}
A: With an integration by parts, we have
$$ \int_{0}^{\infty}\sin{x}\arctan{\dfrac{1}{x}}\,\mathrm dx=\left.-\cos{x}\arctan{\dfrac{1}{x}}\right|_0^{\infty}-\int_0^\infty\frac{\cos\;x}{1+x^2}\mathrm{d}x=\frac{\pi}{2}-\int_0^\infty\frac{\cos\;x}{1+x^2}\mathrm{d}x$$ then we use the standard integral $$\int_0^\infty\frac{\cos\;x}{1+x^2}\mathrm{d}x =\frac{\pi}{2}e^{-1}$$ proved here to get the anounced result: $$ \frac{\pi}{2}\left(1-e^{-1}\right).$$
