How to prove $\int_0^1 \frac1{1+x^2}\arctan\sqrt{\frac{1-x^2}2}d x=\pi^2/24$? Since I'm stuck at this final step of the solution here. I wished to try contour integral, taking the contour a quadrant with centre ($0$) and two finite end points of arc at $(1),(i)$:
Then:
$$\operatorname{Res}\limits_{x=i}\frac1{1+x^2}\arctan\sqrt{\frac{1-x^2}2}=-i\pi/8$$
But then:
$$2\pi i(-i\pi/8)=\pi^2/4??$$ 
 A: Disclaimer: now I have a working real-analytic technique, but it is quite a tour-de-force. 
We have:
$$\begin{eqnarray*} I &=& \int_{0}^{1}\frac{1}{1+x^2}\arctan\sqrt{\frac{1-x^2}{2}}\,dx = \frac{1}{2}\int_{0}^{1}\frac{1}{(1+x)\sqrt{x}}\arctan\sqrt{\frac{1-x}{2}}\,dx\\&=&\int_{0}^{1/2}\frac{1}{(2-2x)\sqrt{1-2x}}\arctan\sqrt{x}\,dx=\int_{0}^{1/\sqrt{2}}\frac{x\arctan x}{(1-x^2)\sqrt{1-2x^2}}\,dx\end{eqnarray*}$$
and integrating by parts we get:
$$ I = \sqrt{2}\int_{0}^{1}\frac{\arctan\sqrt{1-x^2}}{2+x^2}\,dx=\sqrt{2}\int_{0}^{\pi/2}\frac{\cos\theta\arctan\cos\theta}{3-\cos^2\theta}d\theta.\tag{1}$$
so:
$$ I = \frac{1}{2\sqrt{2}}\int_{-\pi}^{\pi}\frac{\cos\theta\arctan\cos\theta}{3-\cos^2\theta}\,d\theta=\frac{1}{2\sqrt{2}}\sum_{n\geq 0}\frac{(-1)^n}{2n+1}\int_{-\pi}^{\pi}\frac{\cos^{2n+2}\theta}{3-\cos^2\theta}\,d\theta.\tag{2}$$
On the other hand,
$$ I_n=\int_{-\pi}^{\pi}\frac{\cos^{2n+2}\theta}{3-\cos^2\theta}\,d\theta=-\int_{-\pi}^{\pi}\cos^{2n}\theta\,d\theta+3 I_{n-1}=-\frac{2\pi}{4^n}\binom{2n}{n}+3I_{n-1}\tag{3}$$
and $I_0=\pi\sqrt{\frac23}$. Now the plan is to solve recursion $(3)$ and compute the integral via $(2)$. 
$$ I = \frac{1}{2\sqrt{2}}\sum_{n\geq 0}\frac{(-1)^n}{2n+1}\sum_{m\geq 1}\frac{2\pi}{4^{n+m} 3^m}\binom{2n+2m}{n+m}\tag{4}$$
leads to:
$$ I = \frac{\pi}{\sqrt{2}}\sum_{n\geq 0}\sum_{m\geq 1}\frac{(-1)^{m}}{3^m(2n+1)}\binom{-1/2}{n+m}=\frac{\pi}{\sqrt{2}}\int_{0}^{1}\sum_{n\geq 0}\sum_{m\geq 1}\frac{(-1)^{m}x^{2n}\,dx}{3^m}\binom{-1/2}{n+m}\tag{5}$$
but since:
$$\sum_{n=0}^{s-1}(-1/3)^{s-n}(x^2)^n= \frac{1}{1+3x^2}\left((-1/3)^s-x^{2s}\right)$$
we have:
$$ I = \frac{\pi}{\sqrt{2}}\int_{0}^{1}\frac{dx}{1+3x^2}\sum_{s=1}^{+\infty}\left((-1/3)^s-x^{2s}\right)\binom{-1/2}{s}\tag{6}$$
and finally:
$$ I = \frac{\pi}{\sqrt{2}}\int_{0}^{1}\left(\sqrt{\frac{3}{2}}-\frac{1}{\sqrt{1+x^2}}\right)\frac{dx}{1+3x^2}\tag{7}$$
is easy to handle and leads to $\color{red}{\frac{\pi^2}{24}}$ as wanted, since:
$$ \int\frac{dx}{(1+3x^2)\sqrt{1+x^2}}=\frac{1}{\sqrt{2}}\arctan\frac{x\sqrt{2}}{\sqrt{1+x^2}}.$$
A: use the relation solved in this site
$$ \int_{0}^{\frac{\pi}{4}}\tan^{-1}\sqrt{\frac{\cos 2x }{2 \cos^2 x}}dx=\frac{\pi^2}{24}$$
Put $$\tan{x}=u, dx=\frac{du}{1+u^2}$$
 $$\sqrt{\frac{\cos 2x }{2 \cos^2 x}}=\sqrt\frac{1-u^2}{2}$$
