How to show the following integral $\int_0^\frac{\pi}{2} \cot^{-1}{\sqrt{1+\csc{\theta}}}\,\mathrm d\theta =\frac{\pi^2}{12}$

This question was posted on I&S

Prove the following

$$\int_0^\frac{\pi}{2} \cot^{-1}{\sqrt{1+\csc{\theta}}}\,\mathrm d\theta =\frac{\pi^2}{12}$$

The numerical value of the integral seems to agree with the answer.

Maybe someone could use that

$$1+\csc \theta = \csc(\theta) (\cos(\theta/2) + \sin(\theta/2))^2$$

I am sure there is a smart substitution or some trigonometric properties that I fail to see.


Solution 1:

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)}$.

Credit goes to Jack D'Aurizio