Calculation of $\int_{0}^{\frac{\pi}{4}}\tan^{-1}\sqrt{\frac{\cos 2x }{2 \cos^2 x}}dx$ Calculate 

$$ \int_{0}^{\frac{\pi}{4}}\tan^{-1}\sqrt{\frac{\cos 2x }{2 \cos^2 x}}dx$$

$\bf{My\; Try::}$ Let $\displaystyle I = \int_{0}^{\frac{\pi}{4}}\tan^{-1}\sqrt{\frac{\cos 2x }{2\cos^2 x}}dx = \int_{0}^{\frac{\pi}{4}}\frac{\pi}{2}-\int_{0}^{\frac{\pi}{4}}\cot^{-1}\sqrt{\frac{\cos 2x}{2\cos^2 x}}dx$
Using The formula $\displaystyle \tan^{-1}(x)+\cot^{-1}(x) = \frac{\pi}{2}\Rightarrow \tan^{-1}(x) = \frac{\pi}{2}-\cot^{-1}(x).$
Now Let $\displaystyle J = \int_{0}^{\frac{\pi}{4}}\cot^{-1}\sqrt{\frac{\cos 2x}{2\cos^2 x}}dx = \int_{0}^{\frac{\pi}{4}}\cot^{-1}\sqrt{\frac{\cos^2 x-\sin^2 x}{2\cos^2 x}}dx = \int_{0}^{\frac{\pi}{4}}\cot^{-1}\sqrt{\frac{1}{2}-\frac{\tan^2 x}{2}}dx$
Now How can I solve after that? Help required.
Thanks
 A: Proposition :

\begin{equation}
\int_0^{\Large\frac{\pi}{4}}\arctan\sqrt{\frac{\mu\cos2x}{\cos^2x}}\,dx=\frac{\pi}{2}\left[\arctan\sqrt{2\mu}-\arctan\sqrt{\frac{\mu}{\mu+1}}\right]\quad,\quad\text{for }\,\mu\ge0
\end{equation}

Proof :
Let
\begin{equation}
I(\mu)=\int_0^{\Large\frac{\pi}{4}}\arctan\sqrt{\frac{\mu\cos2x}{\cos^2x}}\,dx
\end{equation}
then
\begin{align}
I'(\mu)&=\partial_\mu\int_0^{\Large\frac{\pi}{4}}\arctan\sqrt{\frac{\mu\cos2x}{\cos^2x}}\,dx\\
&=\frac{1}{2}\int_0^{\Large\frac{\pi}{4}}\frac{\sqrt{\frac{\mu\cos2x}{\cos^2x}}}{\mu+\frac{\cos2x}{\cos^2x}\mu^2}\,dx\\
&=\frac{1}{2}\int_0^{\Large\frac{\pi}{4}}\frac{\sqrt{\mu(1-2\sin^2x)}}{\mu(1-\sin^2x)+(1-2\sin^2x)\mu^2}\cdot\cos x\,dx\\
&=\frac{1}{2\sqrt{2\mu}}\int_0^{\Large\frac{\pi}{2}}\frac{\sqrt{1-\sin^2\theta}}{\left(1-\frac{1}{2}\sin^2\theta\right)+(1-\sin^2\theta)\mu}\cdot\cos \theta\,d\theta\quad\Rightarrow\quad\sin^2\theta=2\sin^2x\\
&=\frac{1}{\sqrt{2\mu}}\int_0^{\Large\frac{\pi}{2}}\frac{\cos^2\theta}{\sin^2\theta+2(1+\mu)\cos^2\theta}\,d\theta\\
&=\frac{1}{\sqrt{2\mu}}\int_0^{\Large\frac{\pi}{2}}\frac{1}{\tan^2\theta+2(1+\mu)}\,d\theta\\
&=\frac{1}{\sqrt{2\mu}}\int_0^{\infty}\frac{1}{t^2+2(1+\mu)}\cdot\frac{1}{t^2+1}\,dt\quad\Rightarrow\quad t=\tan\theta\\
&=\frac{1}{\sqrt{2\mu}(1+2\mu)}\int_0^{\infty}\left[\frac{1}{t^2+1}-\frac{1}{t^2+2(1+\mu)}\right]\,dt\\
&=\frac{1}{\sqrt{2\mu}(1+2\mu)}\left[\frac{\pi}{2}-\frac{\pi}{2\sqrt{2(1+\mu)}}\right]\\
I(\mu)&=\int\frac{1}{\sqrt{2\mu}(1+2\mu)}\left[\frac{\pi}{2}-\frac{\pi}{2\sqrt{2(1+\mu)}}\right]\,d\mu\\
&=\frac{\pi}{2}\int\left[\frac{1}{\sqrt{2\mu}(1+2\mu)}-\frac{1}{\sqrt{2\mu}(1+2\mu)\sqrt{2(1+\mu)}}\right]\,d\mu\\
\end{align}
where
\begin{align}
\int\frac{1}{\sqrt{2\mu}(1+2\mu)}\,d\mu&=\int\frac{1}{1+y^2}\,dy\qquad\Rightarrow\quad y=\sqrt{2\mu}\\
&=\arctan y+C_1\\
&=\arctan\sqrt{2\mu}+C_1
\end{align}
and
\begin{align}
\int\frac{1}{\sqrt{2\mu}(1+2\mu)\sqrt{2(1+\mu)}}\,d\mu&=\int\frac{1}{(1+y^2)\sqrt{2+y^2}}\,dy\qquad\Rightarrow\quad y=\sqrt{2\mu}\\
\end{align}
Using
\begin{align}
\color{blue}{\int \frac{dx}{(x^2+1)\sqrt{x^2+a}}=\frac{1}{\sqrt{a-1}}\tan^{-1}\left(\frac{x\sqrt{a‌​-1}}{\sqrt{x^2+a}}\right)+C}
\end{align}
It can be derived by using substitution $x=\dfrac{1}{t}$ followed by $z=\sqrt{at^2+1}$.
Hence
\begin{align}
\int\frac{1}{\sqrt{2\mu}(1+2\mu)\sqrt{2(1+\mu)}}\,d\mu&=\arctan\sqrt{\frac{\mu}{\mu+1}}+C_2
\end{align}
then
\begin{equation}
I(\mu)=\frac{\pi}{2}\left[\arctan\sqrt{2\mu}-\arctan\sqrt{\frac{\mu}{\mu+1}}\right]+C
\end{equation}
For $\mu=0$, we have $I(0)=0$ implying $C=0$. Thus
\begin{equation}
I(\mu)=\int_0^{\Large\frac{\pi}{4}}\arctan\sqrt{\frac{\mu\cos2x}{\cos^2x}}\,dx=\frac{\pi}{2}\left[\arctan\sqrt{2\mu}-\arctan\sqrt{\frac{\mu}{\mu+1}}\right]\qquad\quad\square
\end{equation}

For $\mu=\frac{1}{2}$, we obtain
\begin{align}
I\left(\frac{1}{2}\right)&=\int_0^{\Large\frac{\pi}{4}}\arctan\sqrt{\frac{\cos2x}{2\cos^2x}}\,dx\\
&=\frac{\pi}{2}\left[\arctan 1-\arctan\left(\frac{1}{\sqrt{3}}\right)\right]\\
&=\frac{\pi}{2}\left[\frac{\pi}{4}-\frac{\pi}{6}\right]\\
&=\frac{\pi^2}{24}
\end{align}
A: Answer: $\displaystyle \int_{0}^{\pi/4}\tan^{-1}\sqrt{\frac{\cos 2x}{2\cos^2 x}}\,dx=\frac{\pi^2}{24}$
Proof:
We are making use of $3$ Lemmas which are (quite ) easy to prove:
1. $\displaystyle \int_{0}^{1}\frac{dx}{\sqrt{x^2+2}\left ( x^2+1 \right )}=\frac{\pi}{6} $
Proof: 
$$\begin{align*}
\int_{0}^{1}\frac{dx}{\sqrt{x^2+2}\left ( x^2+1 \right )} &\overset{x=\sqrt{2}\sinh t}{=\! =\! =\! =\! =\! =\! =\!}\int_{0}^{a}\frac{dt}{1+2\sinh^2 t} \\ 
 &= \int_{0}^{a}\frac{dt}{\cosh (2t)}=\int_{0}^{a}\frac{\cosh (2t)}{1+\sinh^2 (2t)}\,dt\\ 
 &=\frac{1}{2}\tanh^{-1}\left ( \sinh (2a) \right ) \\ 
 &=\frac{1}{2}\tanh^{-1}\left ( \sqrt{\left ( 1+2\sinh^2 a \right )^2-1} \right ) \\ 
 &= \frac{1}{2}\tanh^{-1}\sqrt{3}=\frac{\pi}{6}\\ 
\end{align*}$$
where $\displaystyle a=\sinh^{-1}\frac{1}{\sqrt{2}} $.
2. $\displaystyle \int_{0}^{\infty}\frac{dx}{\left ( x^2+a^2 \right )\left ( x^2+\beta^2 \right )}=\frac{\pi}{2a\beta\left ( a+\beta \right )}$
Proof:
$$\begin{align*}
\int_{0}^{\infty}\frac{dx}{\left ( x^2+a^2 \right )\left ( x^2+\beta^2 \right )} &=\int_{0}^{\infty}\frac{1}{\beta^2-a^2}\left ( \frac{1}{x^2+a^2}-\frac{1}{x^2+\beta^2} \right )\,dx \\ 
 &= \frac{1}{\beta^2-a^2}\left ( \frac{\pi}{2a}-\frac{\pi}{2\beta} \right )\\ 
 &= \frac{\pi}{2a\beta\left ( a+\beta \right )}\\ 
\end{align*}$$
3. It also holds by definition that: $\displaystyle \tan^{-1}a= \int_{0}^{1}\frac{a}{1+a^2x^2}\,dx$. 
And now we are ready to evaluate the integral. Successively we have:
$$\begin{align*}
\int_{0}^{\pi/4}\tan^{-1}\sqrt{\frac{\cos 2\theta}{2\cos^2 \theta}}\,d\theta &=\int_{0}^{\pi/4}\int_{0}^{1}\frac{\sqrt{\frac{\cos 2\theta}{2\cos^2 \theta}}}{1+\left ( \frac{\cos 2\theta}{2\cos^2 \theta} \right )x^2}\,dx \,d\theta\\ 
 &= \int_{0}^{1}\int_{0}^{\pi/4}\frac{\sqrt{1-2\sin^2 \theta}}{2-2\sin^2 \theta+\left ( 1-2\sin^2 \theta \right )x^2}\sqrt{2}\cos \theta \,\,d\theta \,dx\\ 
 &=\int_{0}^{1}\int_{0}^{\pi/2}\frac{\sqrt{1-\sin^2 \phi}}{2-\sin^2 \phi+\left ( 1-\sin^2 \phi \right )x^2}\cos \phi \,\,d\phi \,dx \\ 
 &=\int_{0}^{1}\int_{0}^{\pi/2}\frac{\cos^2 \phi}{\sin^2 \phi+\left ( x^2+2 \right )\cos^2 \phi}\,\,d\phi \,dx \\ 
 &=\int_{0}^{1}\int_{0}^{\pi/2}\frac{d\phi \,dx}{\tan^2 \phi+x^2+2}=\int_{0}^{1}\int_{0}^{\infty}\frac{dx\,dx}{\left ( y^2+x^2+2 \right )\left ( y^2+1 \right )} \\ 
 &=\frac{\pi}{2}\int_{0}^{1}\frac{dy}{\left ( 1+\sqrt{2+y^2} \right )\sqrt{2+y^2}} \\ 
 &=\frac{\pi}{2}\left ( \frac{\pi}{4}-\frac{\pi}{6} \right )=\frac{\pi^2}{24} 
\end{align*}$$
which checks numerically with the answer given above.
If I have any typos, because I typed it so quickly please let me know so that I correct them.
T:
