Help with $\int_0^{\frac{\pi}{2}} \frac{x \cos(x)}{\sin^2(x)+1} \; \mathrm{d}x = \frac{1}{2} \sinh^{-1}(1)^2$ I've been trying to do the above integral using elementary methods. So far, I've reduced the integral down to evaluating $\displaystyle \int_0^1 \frac{\tan^{-1}(x)}{\sqrt{1-x^2}} \; \mathrm{d}x$ or $\displaystyle \int_0^1 \frac{\sin^{-1}(x)}{1+x^2} \; \mathrm{d}x$ through a u-sub and IBP, but neither of these integrals seem to yield an elementary method.
Any help would be great.
 A: Substitute $t=\sin x$ and then IBPs,
$$\hspace{-1cm}
\int_0^{\frac{\pi}{2}} \frac{x \cos x}{\sin^2x+1}dx 
=\int_0^1\frac{\sin^{-1}t}{1+t^2}dx=\frac{\pi^2}8-I,\>\>\>\>
I=\int_0^1\frac{\tan^{-1}t}{\sqrt{1-t^2}}dt \tag1$$
Express $\tan^{-1}t=\int_0^1\frac t{1+y^2t^2}dy$ and use
$$\int_0^1\frac {t\>dt}{\sqrt{1-t^2}(1+y^2t^2)}=\frac{\sinh^{-1}y}{y\sqrt{1+y^2}}\tag 2$$
to integrate $I$,
$$\begin{align}
\hspace{-8mm}
I & \hspace{-3mm}
=\int_0^1\hspace{-4mm} \int_0^1\hspace{-3mm} \frac{tdydt }{\sqrt{1-t^2}(1+y^2t^2)}
=\int_0^1\frac{\sinh^{-1}y}{y\sqrt{1+y^2}}dy 
\overset{u=\frac1y}=\int_1^\infty\frac{\text{csch}^{-1}u}{\sqrt{1+u^2}}du \\
& \hspace{-4mm}= \int_1^\infty d(\sinh^{-1}u)\>\text{csch}^{-1}u
=\sinh^{-1}u\>\text{csch}^{-1}u|_1^\infty+ \int_1^\infty\frac{\text{sinh}^{-1}u}{u\sqrt{1+u^2}}du \\
& \hspace{-4mm}= -[\sinh^{-1}(1)]^2 + \int_0^\infty\frac{\text{sinh}^{-1}u}{u\sqrt{1+u^2}}du-I \tag3 \\
\end{align}$$
 Evaluate the remaining integral with (2)
$$\hspace{-1cm}
\int_0^\infty\frac{\text{sinh}^{-1}udu }{u\sqrt{1+u^2}}
=\int_0^\infty\hspace{-4mm} \int_0^1\frac {t dtdu}{\sqrt{1-t^2}(1+u^2t^2)}
=\frac\pi2 \int_0^1\frac {dt}{\sqrt{1-t^2}}= \frac{\pi^2}4 \\ \tag4
$$
Plug (4) into (3) to obtain $I =\frac{\pi^2}8-\frac12[\sinh^{-1}(1)]^2$. Then, plug it into (1) to obtain
$$\int_0^{\frac{\pi}{2}} \frac{x \cos x}{\sin^2x+1}dx = \frac{\pi^2}8-I=\frac12[\sinh^{-1}(1)]^2$$
A: By parts:
$$I=\int\limits_0^{\,^\pi/_2}x\,\mathrm d\arctan\sin x
=x\arctan \sin x\Bigg|_0^{\,^\pi/_2}-\int\limits_0^{\,^\pi/_2}\arctan\sin x\,\mathrm dx,$$
$$I=\dfrac{\pi^2}8 - \sum\limits_{k=0}^\infty\dfrac{(-1)^k}{2k+1}\int\limits_0^{\,^\pi/_2}\sin^{2k+1}x\,\mathrm dx.\tag1$$
Using integral integral representation for the Beta function
$$\int\limits_0^{\,^\pi/_2}\sin^{2\alpha-1}x\cos^{2\beta-1}x\,\mathrm dx = \operatorname{Beta}(\alpha,\beta) =\dfrac{\Gamma(\alpha)\Gamma(\beta)}{\Gamma(\alpha+\beta)}\tag2$$
for $\alpha = k+1,\ \beta=\frac12,$
one can get
$$I=\dfrac{\pi^2}8 - \dfrac{\sqrt\pi}2\sum\limits_{k=0}^\infty\dfrac{(-1)^k}{2k+1}\,\dfrac{\Gamma(k+1)}{\Gamma(k+\hspace{-1pt}^3\hspace{-1pt}/\hspace{-1pt}_2)}
=\dfrac{\pi^2}8 - \sum\limits_{k=0}^\infty\dfrac{(\frac12)_k}{(\frac32)_k}\cdot\dfrac{((1)_k)^2}{(\frac32)_k}\cdot\dfrac{(-1)^k}{k!},$$
where $(a)_k = \frac{\Gamma(a+k)}{\Gamma(a)}$ is Pohhammer symbol.
This allows to use a generalized hypergeometric function,
$$I=\dfrac{\pi^2}8 - \operatorname F(\{\,^1/_2,1,1\},\{\,^3/_2,\,^3/_2\},-1)
= \dfrac{\pi^2}8 - \left(\dfrac{\pi^2}8 - \operatorname{arcsinh}^21\right) = \color{brown}{\mathbf{\dfrac12\operatorname{arcsinh}^21}},$$
(see also Wolfram Alpha representation).
