Using the Maclaurin series of $\arctan(x)$ to evaluate $\int_{0}^{\frac{\pi}{2}} \arctan( a \sin x) \, \mathrm dx$ I want to use the Maclaurin series of $\arctan (x)$ to show that
\begin{align}\int_{0}^{\pi/ 2} \arctan (a \sin x) \,  \mathrm dx &= 2 \sum_{k=0}^{\infty} \frac{\left(\frac{\sqrt{1 + a^{2}}- 1}{a}\right)^{2k+1}}{(2k+1)^{2}} \\ &= \operatorname{Li}_{2} \left(\frac{\sqrt{1+a^{2}}-1}{a} \right) -  \operatorname{Li}_{2} \left(\frac{1-\sqrt{1+a^{2}}}{a} \right).
\end{align}
I guess we should first impose the restriction $  |a| \le 1$.
Then we have
$$ \begin{align} \int_{0}^{\pi/ 2} \arctan (a \sin x) \ dx  &= \int_{0}^{\pi /2} \sum_{k=0}^{\infty} (-1)^{k} \, \frac{(a \sin x)^{2k+1}}{2k+1} \, \mathrm  dx \\ &= \sum_{k=0}^{\infty} (-1)^{k} \, \frac{a^{2k+1}}{2k+1} \int_{0}^{\pi /2} \sin^{2k+1} (x) \, \mathrm  dx \\ &= \sum_{k=0}^{\infty} (-1)^{k} \frac{a^{2k+1}}{(2k+1)^{2}} \frac{2^{2k}}{\binom{2k}{k}}. \end{align}$$
But how do we proceed from here?
 A: Here is an idea: We prove the following identity instead.
$$ \int_{0}^{\frac{\pi}{2}} \arctan\left(\frac{2a\sin x}{1-a^{2}} \right) \, dx = 2 \sum_{n=0}^{\infty} \frac{a^{2n+1}}{(2n+1)^{2}}. $$
Expanding left-hand side,
\begin{align*}
\int_{0}^{\frac{\pi}{2}} \arctan\left(\frac{2a\sin x}{1-a^{2}} \right) \, dx
&= \sum_{n=0}^{\infty} \frac{(-1)^{n}}{2n+1} \int_{0}^{\frac{\pi}{2}} \left(\frac{2a\sin x}{1-a^{2}} \right)^{2n+1} \, dx \\
&= \sum_{n=0}^{\infty} \frac{(-1)^{n}}{2n+1} (2a)^{2n+1}  \int_{0}^{\frac{\pi}{2}} \frac{\sin^{2n+1}x}{(1-a^{2})^{2n+1}} \, dx \\
&= \sum_{n=0}^{\infty} \sum_{j=0}^{\infty}  \left( \frac{(-1)^{n}2^{2n+1} }{2n+1} \binom{2n+j}{j} \int_{0}^{\frac{\pi}{2}} \sin^{2n+1}x \, dx\right) a^{2j+2n+1}.
\end{align*}
Plugging $m = n+j$, it follows that
\begin{align*}
\int_{0}^{\frac{\pi}{2}} \arctan\left(\frac{2a\sin x}{1-a^{2}} \right) \, dx
&= \sum_{m=0}^{\infty} \left( \sum_{n=0}^{m}  \frac{(-1)^{n}2^{2n+1} }{2n+1} \binom{m+n}{m-n} \int_{0}^{\frac{\pi}{2}} \sin^{2n+1}x \, dx\right) a^{2m+1}.
\end{align*}
Thus plugging the Wallis formula, the problem reduces to showing that
$$ \sum_{n=0}^{m} (-1)^{n} \frac{(m+n)!}{(m-n)!} \left( \frac{n!2^{2n}}{(2n+1)!} \right)^{2} = \frac{1}{(2m+1)^{2}}. $$
But I have no idea how to prove this.
A: Sangchul Lee showed that the problem reduces to showing that $$\sum_{n=0}^{m} (-1)^{n} \, \frac{(m+n)!}{(m-n)!} \left( \frac{n!2^{2n}}{(2n+1)!} \right)^{2} = \frac{1}{(2m+1)^{2}}. \tag{1} $$
The following is a way to prove $(1)$ using properties of hypergeometric functions.

Using the duplication formula for the gamma function, along with  the fact that $$\frac{1}{(m-n)!} = \frac{(-1)^{n}(-m)_{n}}{m!}, $$ we can express the left side of $(1)$ as the hypergeometric series $$_{3}F_{2} \left(1,-m,m+1;\frac{3}{2}, \frac{3}{2}; 1 \right). $$
Then using Euler's integral representation of the generalized hypergeometric function,  we have $$_{3}F_{2} \left(1,-m,m+1;\frac{3}{2}, \frac{3}{2}; 1 \right) = \frac{1}{2} \int_{0}^{1} (1-t)^{-1/2}  \, _2F_{1} \left(-m, m+1; \frac{3}{2} ; t \right) \mathrm dt, $$
where $$_2F_{1} \left(-m, m+1; \frac{3}{2} ; t \right) = \frac{\sin \left[(2m+1)\arcsin (\sqrt{t}) \right]}{(2m+1)\sqrt{t}}.  $$
(See my answer here to a previous question.)
Therefore, $$ \begin{align} \sum_{n=0}^{m} (-1)^{n} \, \frac{(m+n)!}{(m-n)!} \left( \frac{n!2^{2n}}{(2n+1)!} \right)^{2} &= \frac{1}{2(2m+1)} \int_{0}^{1} (1-t)^{-1/2} \, \frac{\sin \left[(2m+1)\arcsin (\sqrt{t}) \right]}{\sqrt{t}} \,  \mathrm dt \\ &= \frac{1}{(2m+1)^{2}} \int_{0}^{(2m+1)\pi /2} \sin (u) \,  \mathrm du \\ &= \frac{1}{(2m+1)^{2}}. \end{align}$$
