# Find Value of $\int _{0}^{\frac{\pi}{4}} \sqrt{\tan x}{\sqrt{1-\tan x}}\,\mathrm dx$ [duplicate]

Find Value of

$$I=\int _{0}^{\frac{\pi}{4}} \sqrt{\tan x}{\sqrt{1-\tan x}}\,\mathrm dx$$

My try:

Use substitution $\tan x=\sin ^2y$ we get

$$\mathrm dx=\frac{\sin 2y}{1+\sin^4y}\,\mathrm dy$$ we get

$$I=\frac{1}{2}\int_{0}^{\frac{\pi}{2}}\frac{\sin^2 2y}{1+\sin^4y}\,\mathrm dy$$

any way to continue now?

I believe the most natural substitution is $x=\arctan t$, directly leading to $$I=\int_{0}^{1}\frac{\sqrt{x(1-x)}}{1+x^2}\,dx = 2\int_{0}^{1}\frac{z^2\sqrt{1-z^2}}{1+z^4}\,dz=2\int_{0}^{\pi/2}\frac{\sin^2\theta\cos^2\theta}{1+\sin^4\theta}\,d\theta$$ now setting $\theta=\arctan u$ in the last integral we get $$2\int_{0}^{+\infty}\frac{u^2\,du}{(1+u^2)\left[1+(1+u^2)^2\right]}=\color{red}{\pi\left[-1+\sqrt{\frac{1}{\sqrt{2}}+\frac{1}{2}}\right]}\approx 0.31$$ by the residue theorem.
• @Zacky: in the obvious way, i.e. by computing the residues of $\frac{u^2}{(1+u^2)(1+(1+u^2)^2)}$ at $u=i$ and at $u=2^{1/4}e^{3\pi i/8}, u=2^{1/4}e^{5\pi i/8}$. – Jack D'Aurizio Aug 15 '18 at 17:45
I was once told that all rational functions of trigonometric functions can be integrated by the substitution $t=\tan \frac{x}{2}$. As you managed to translate the problem to the integral of such an expression, you should try this.