Ab*surd* Integrals I am unable to find a proof for these integrals on the internet.
emphasized text
$$\displaystyle \int_0^{\frac{\pi}{2}} \cot^{-1}(\sqrt{1+\csc{\theta}}\,) \, \text{d}\theta = \frac{\pi^2}{12}$$
$$\displaystyle \int_0^\frac{\pi}{2} \csc^{-1}(\sqrt{1+\cot{\theta}}\,) \, \text{d}\theta = \frac{\pi^2}{8}$$
Sources: Brilliant, AoPS
I tried differentiating under the integral sign but I can't think of an appropriate parameter that leaves easily integrable rational functions.
I have tried exploiting the bounds to reflect and transform the integrand but to no avail.
A real solution is preferred but a complex solution is perfectly acceptable.
A geometric solution is not something I have considered but I'm just grasping at straws here.
 A: The second integral equals
$$ I_2=\int_{0}^{\pi/2}\arcsin\sqrt{\frac{\tan t}{1+\tan t}}\,dt=\int_{0}^{\pi/2}\arctan\sqrt{\tan t}\,dt=\int_{0}^{+\infty}\frac{\arctan\sqrt{u}}{1+u^2}\,du$$
and by splitting the last integration range as $(0,1)\cup(1,+\infty)$ and performing the substitution $u\mapsto\frac{1}{u}$ on the second part,
$$ I_2 = \int_{0}^{1}\frac{\arctan\sqrt{u}}{1+u^2}\,du+\int_{0}^{1}\frac{\frac{\pi}{2}-\arctan\sqrt{u}}{1+u^2}\,du = \frac{\pi}{2}\int_{0}^{1}\frac{du}{1+u^2}=\frac{\pi}{2}\cdot\frac{\pi}{4}=\color{red}{\frac{\pi^2}{8}}.$$
The first integral is
$$ I_1=\frac{\pi^2}{4}-\int_{0}^{\pi/2}\arctan\sqrt{\frac{1+\sin t}{\sin t}}\,dt=\frac{\pi^2}{4}-2\int_{0}^{\pi/4}\arctan\sqrt{\frac{1+\cos(2t)}{\cos (2t)}}\,dt$$
and
$$\int_{0}^{\pi/4}\arctan\sqrt{\frac{1+\cos(2t)}{\cos (2t)}}\,dt=\int_{0}^{1}\arctan\sqrt{\frac{2}{1-u^2}}\frac{du}{1+u^2}$$
is a variant of Ahmed's integral that can be tackled through differentiation under the integral sign: it is enough to be able to integrate $\frac{\sqrt{1-u^2}}{(1+a-u^2)(1+u^2)}$.
