# 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.$

Evaluate the integral ratio$$\dfrac{I_1}{I_2}=\dfrac{\displaystyle \int_{0}^{\frac{\pi}{2}} \sqrt{1+\frac{1}{\sqrt{1+\tan^nx}}} \mathrm{d}x}{\displaystyle \int_{0}^{\frac{\pi}{2}} \sqrt{1-\frac{1}{\sqrt{1+\tan^nx}}} \mathrm{d}x}$$

Using Wolframalpha, I found out that the ratio of the above two integrals is $$\sqrt{2}+1$$, that is, independent of $$n$$. I couldn't think of a way to solve it.

I don't think any simple substitutions would work here. Any useful hints would be appreciated.

• Did you try taking the derivative with respect to $n$ and trying to show that is 0? Commented Dec 8, 2020 at 5:41
• Well, I didn't try that...but wouldn't that be a tedious task? Initially, the question was in the form of a particular value assigned to $n$, so one wouldn't even know that it is same for all $n$ if one doesn't take the help from computer. So, I am hoping for a method that would yield the answer by computing it...
– V.G
Commented Dec 8, 2020 at 5:42
• what is the source of problem? Commented Dec 8, 2020 at 6:03
• @AlbusDumbledore A friend gave it to me.
– V.G
Commented Dec 8, 2020 at 6:23
• Often the change of variables $x\mapsto \frac\pi2-x$ can be helpful here ($\tan x$ changes to $\cot x$, and then algebra allows the new function to look very similar to the old function). I couldn't make it work though. Commented Dec 8, 2020 at 6:30

\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}
• More generally, if $g\left(x\right)=\frac{f\left(x\right)}{f\left(a+b-x\right)}$ then $\int_{a}^{b}\sqrt{1+\frac{1}{\sqrt{1+g}}}dx=\left(\sqrt{2}+1\right)\int_{a}^{b}\sqrt{1-\frac{1}{\sqrt{1+g}}}dx$. This is the case where $f(x)=\sin^nx,\,a=0,\,b=\pi/2$.
• @lonestudent - there is another negative sign from $\int_{\pi/2}^0 \to - \int_0^{\pi/2}$, which cancels the negative sign of $-dx$ Commented Feb 20, 2021 at 20:06