Finding $\int_0^{\frac{\pi}{2}}\arctan\left(\sin x\right)dx$

Actually I didn't post my answer as I was unable to continue it where I left but after Pranav provided link I'm posting it

$$\sin x=u\iff \frac{\,\mathrm du}{\sqrt{1-u^2}}=\,\mathrm dx$$

$$\int_0^{{\pi/2}}\arctan\left(\sin x\right)\,\mathrm dx=\int_0^{1}\frac{\arctan(u)}{\sqrt{1-u^2}}\,\mathrm du$$

Now consider parametric integral $$I(\alpha)=\int_0^{1}\frac{\arctan(\alpha t)}{\sqrt{1-t^2}}\,\mathrm dt$$

Then $$\begin{align} I'(\alpha)&= \int_{0}^{1} \frac{t}{(1+\alpha^{2}t^{2})\sqrt{1-t^{2}}} \,\mathrm dt\\ &= \frac{1}{\alpha \sqrt{1+\alpha^{2}}} \text{artanh} \left[ \frac{\alpha}{\sqrt{1+\alpha^{2}}} \right]\\ &= \frac{1}{\alpha \sqrt{1+\alpha^{2}}} \text{arsinh}(\alpha) .\end{align}$$ Now for further process see this


Integrating by parts, we get $$ \int_0^{\pi/2}\sin^{2k+1}(x)\,\mathrm{d}x =\frac{2k}{2k+1}\int_0^{\pi/2}\sin^{2k-1}(x)\,\mathrm{d}x\tag{1} $$ Therefore, by induction, we have $$ \int_0^{\pi/2}\sin^{2k+1}(x)\,\mathrm{d}x =\frac{2^k\,k!}{(2k+1)!!}\tag{2} $$ Thus, $$ \begin{align} \int_0^{\pi/2}\arctan(\sin(x))\,\mathrm{d}x &=\sum_{k=0}^\infty\frac{(-1)^k}{2k+1}\int_0^{\pi/2}\sin^{2k+1}(x)\,\mathrm{d}x\tag{3a}\\ &=\sum_{k=0}^\infty\frac{(-1)^k}{2k+1}\frac{2^k\,k!}{(2k+1)!!}\tag{3b}\\ &=\sum_{k=0}^\infty\frac{(-1)^k}{(2k+1)^2}\frac{4^k}{\binom{2k}{k}}\tag{3c} \end{align} $$ Explanation:
$\text{(3a)}$: use the series for $\arctan(x)$
$\text{(3b)}$: use $(2)$
$\text{(3c)}$: rewrite $\text{(3b)}$ using central binomial coefficients

In this answer, it is shown that $$ \sum_{n=0}^\infty\frac{(-4)^n}{(2n+1)^2\binom{2n}{n}} =\frac{\pi^2}8-\frac12\mathrm{arcsinh}^2(1)\tag{4} $$ Therefore, combining $(3)$ and $(4)$, we have $$ \int_0^{\pi/2}\arctan(\sin(x))\,\mathrm{d}x =\frac{\pi^2}8-\frac12\mathrm{arcsinh}^2(1)\tag{5} $$


Using the integral definition of the arctangent function, we may write $$\arctan{\left(\sin{x}\right)}=\int_{0}^{1}\mathrm{d}y\,\frac{\sin{x}}{1+y^2\sin^2{x}},$$

thus, transforming the integral into a double integral. Changing the order of integration, we find:

$$\begin{align} \mathcal{I} &=\int_{0}^{\frac{\pi}{2}}\arctan{\left(\sin{x}\right)}\,\mathrm{d}x\\ &=\int_{0}^{\frac{\pi}{2}}\mathrm{d}x\int_{0}^{1}\mathrm{d}y\,\frac{\sin{x}}{1+y^2\sin^2{x}}\\ &=\int_{0}^{1}\mathrm{d}y\int_{0}^{\frac{\pi}{2}}\mathrm{d}x\,\frac{\sin{x}}{1+y^2\sin^2{x}}\\ &=\int_{0}^{1}\mathrm{d}y\int_{0}^{\frac{\pi}{2}}\mathrm{d}x\,\frac{\sin{x}}{1+y^2\left(1-\cos^2{x}\right)}\\ &=\int_{0}^{1}\mathrm{d}y\int_{0}^{1}\frac{\mathrm{d}t}{1+y^2-y^2t^2}\\ &=\int_{0}^{1}\mathrm{d}y\,\frac{\tanh^{-1}{\left(\frac{y}{\sqrt{1+y^2}}\right)}}{y\sqrt{1+y^2}}\\ &=\int_{0}^{1}\mathrm{d}y\,\frac{\sinh^{-1}{\left(y\right)}}{y\sqrt{1+y^2}}\\ &=\int_{0}^{\sinh^{-1}{(1)}}\mathrm{d}u\,\frac{u}{\sinh{(u)}}\\ &=-\sinh^{-1}{(1)}^2-\int_{0}^{\sinh^{-1}{(1)}}\mathrm{d}u\,\ln{\left(\tanh{\frac{u}{2}}\right)}\\ &=-\sinh^{-1}{(1)}^2-2\int_{0}^{\frac{1}{1+\sqrt{2}}}\mathrm{d}w\,\frac{\ln{\left(w\right)}}{1-w^2}.\\ \end{align}$$

At this point, the resolution of the last integral in terms of dilogarithms is a straightforward matter.


Hint: Letting $t=\sin x$, the integral becomes $F(1)$, where $F(a)=\displaystyle\int_0^1\frac{\arctan(at)}{\sqrt{1-t^2}}dx$. Evaluate $F'(a)$.