Evaluating $\left.\int_0^{\pi/2}\sqrt{1+\frac1{\sqrt{1+\tan^nx}}}\text dx \middle/\int_0^{\pi/2}\sqrt{1-\frac1{\sqrt{1+\tan^nx}}}\text dx\right.$
Note
\begin{align} \frac{I_1}{I_2}&=1+ \frac{I_1-I_2}{I_2} \\ &=1+\frac1{I_2}\int_0^{\frac\pi2} \left( \sqrt{1+\frac{1}{\sqrt{1+\tan^nx}}}- \sqrt{1-\frac{1}{\sqrt{1+\tan^nx}}} \right)dx \\ &=1+\frac1{I_2}\int_0^{\frac\pi2} \frac{\sqrt{\sqrt{\sin^nx+\cos^nx}+\sqrt{\cos^nx}} - \sqrt{\sqrt{\sin^nx+\cos^nx}-\sqrt{\cos^nx}}}{\sqrt[4]{\sin^nx+\cos^nx}}dx \\ &=1+\frac1{I_2} \int_0^{\frac\pi2} \frac{\sqrt{2\sqrt{\sin^nx+\cos^nx}-2\sqrt{\sin^nx}} }{\sqrt[4]{\sin^nx+\cos^nx}}dx \\ &= 1+\frac{\sqrt2}{I_2} \int_0^{\frac\pi2} \sqrt{1-\frac{1}{\sqrt{1+\cot^nx}}}dx\>\>\>\>\>\>\>\>(x\to \frac\pi2-x)\\ &=1+\frac{\sqrt2}{I_2}\int_0^{\frac\pi2} \sqrt{1-\frac{1}{\sqrt{1+\tan^nx}}}dx \\ &=1+\sqrt2 \\ \end{align}