$\int_{0}^{\pi/2}\arctan(\sin(x))dx=\frac{\pi^2}{8}-\frac{\ln^2(\sqrt{2}-1)}{2}$ I am trying to evaluate the following integral, so far I tried 2 different ways, but could not finish the proof. Through the second method, it seems that I got closer
$$\int_{0}^{\pi/2}\arctan(\sin(x))dx=\frac{\pi^2}{8}-\frac{\ln^2(\sqrt{2}-1)}{2}$$
First Method
Consider the more general version with parameter k
$$I(k)=\int_{0}^{\pi/2}\arctan(k\sin(x))dx$$
$$I^{\prime}(k)=\int_{0}^{\pi/2}\frac{\sin(x)}{1+k^2\sin^2(x)}dx$$
$$I^{\prime}(k)=\int_{0}^{\pi/2}\frac{\sin(x)}{\cos^2(x)+\sin^2(x)+k^2\sin^2(x)}dx$$
$$I^{\prime}(k)=\int_{0}^{\pi/2}\frac{\sin(x)}{\cos^2(x)+(1+k^2)\sin^2(x)}\frac{1}{\frac{\sin^2(x)}{\sin^2(x)}}dx$$
$$I^{\prime}(k)=\int_{0}^{\pi/2}\frac{\csc(x)}{\cot^2(x)+(1+k^2)}dx$$
substitution $\cot^2(x)=t$ does not seem very helpful.

Second Method
let $\sin(x)\longrightarrow x$
$$\int_{0}^{\pi/2}\arctan(\sin(x))dx=\int_{0}^{1}\frac{\arctan(x)}{\sqrt{1-x^2}}dx$$
integrating by parts
$$\int_{0}^{1}\frac{\arctan(x)}{\sqrt{1-x^2}}dx=\arctan(x)\cdot\arcsin(x)|_{0}^{1}-\int_{0}^{1}\frac{\arcsin(x)}{1+x^2}dx$$
$$=\frac{\pi^2}{8}-\underbrace{\int_{0}^{1}\frac{\arcsin(x)}{1+x^2}dx}_{J}$$
using the expansion of $\arcsin(x)$
$$J=\int_{0}^{1}\frac{\arcsin(x)}{1+x^2}dx=\sum_{n=0}^{\infty}\frac{(2n)!}{2^{2n}(n!)^2}\frac{1}{2n+1}\int_{0}^{1}\frac{x^{2n+1}}{1+x^2}dx$$
Can someone indicate a method to help me finish at least one of the two methods?
Thank you
 A: First method:
$$I(k)=\int_{0}^{\pi/2}\arctan(k\sin x)dx,\>\>\>\>\>
 I^{\prime}(k)=\int_{0}^{\pi/2}\frac{\sin x}{1+k^2\sin^2x}dx$$
Evaluate $I’(k)$ with $t=\cos x$
\begin{align}
I^{\prime}(k)=\int_{0}^{1}\frac{1}{1+k^2-k^2 t^2}dt
=\frac{\text{arctanh}\frac{k}{\sqrt{1+k^2}}}{k\sqrt{1+k^2}}
= \frac{\text{arcsinh}{\>k}}{k\sqrt{1+k^2}}
\end{align}
Then, $I(0)=0$, $I(\infty) =\frac{\pi^2}4 = \int_0^\infty I’(k)dk$
\begin{align}
&\int_{0}^{\pi/2}\arctan(\sin x)dx =I(1)=
\int_0^1 I’(k)dk \\
=&\int_{0}^{1}\frac{\text{arcsinh}{\>k}}{k\sqrt{1+k^2}}dk
=-\frac12\int_{0}^{1}\frac{\text{arcsinh}{\>k}}{\text{arccsch}\>{k}}d\left(\text{arccsch}^2{k}\right) \\
=&- \frac12\text{arcsinh}\>k \>\text{arccsch}\>k\bigg|_0^1
+\frac12\int_0^1 \frac{\text{arcsinh}\>k+k\>\overset{k\to1/k}{\text{arccsch}{\>k}}}{k\sqrt{1+k^2}}dk\\
=& - \frac12\text{arcsinh}(1)\>\text{arccsch}(1)
+\frac12\int_0^\infty I’(k)dk \\
= &- \frac12\text{arcsinh}^2(1)+\frac{\pi^2}8
\end{align}
A: Since $|\sin x|\le 1$, we may write
$$\arctan(\sin x)=\sum_{n\ge0}\frac{(-1)^n}{2n+1}\sin(x)^{2n+1},$$
and thus
$$J=\int_0^{\pi/2}\arctan(\sin x)dx=\sum_{n\ge0}\frac{(-1)^n}{2n+1}\int_0^{\pi/2}\sin(x)^{2n+1}dx.$$
The remaining integral is an easy use of the Beta function, and we have
$$\int_0^{\pi/2}\sin(x)^{2n+1}dx=\frac{2^{2n}n!^2}{(2n+1)!},$$
so that
$$J=\sum_{n\ge0}\frac{(-1)^n2^{2n}}{(2n+1)^2\binom{2n}{n}}.$$
Then this gives
$$J=\sum_{n\ge0}\frac{(-1)^n2^{2n}}{(2n+1)^2\binom{2n}{n}}=\frac{\pi^2}{8}-\frac12\text{arcsinh}^2(1).$$
