Evaluating $\int_0^{\pi/2} \frac{\sqrt{\tan x}}{\sin x(\cos x+\sin x)}\mathrm{d}x$

calculusdefinite integralsintegrationtrigonometric-integrals

I was solving the following integral:
$$I=\int_0^{\pi/2} \frac{\sqrt{\tan x}}{\sin x(\cos x+\sin x)}\mathrm{d}x $$
Using the identity $\sin x=\frac{\tan x}{\sec x}$, I simplified the integral in the following way:
$$I=\int_0^{\pi/2}\frac{\sqrt{\tan x}}{\frac{\tan x}{\sec x}\left(\cos x+\frac{\tan x}{\sec x}\right)}\mathrm{d}x=\int_0^{\pi/2}\frac{\sec^2 x}{\sqrt{\tan x}(1+\tan x)}\mathrm{d}x=2\tan^{-1}(\sqrt{\tan x})\Bigg|^{\pi/2}_0=\lim_{x\to \pi/2} 2\tan^{-1}(\sqrt{\tan x})=\pi $$
However, I'd like to see a different solution, because I feel there's a simpler one maybe using the symmetry of the integrand:
$$\int_0^{\pi/2} \frac{\sqrt{\tan x}}{\sin x(\cos x+\sin x)}\mathrm{d}x=2\int_0^{\pi/4} \frac{\sqrt{\tan x}}{\sin x(\cos x+\sin x)}\mathrm{d}x $$

Best Answer

Substitute $t=\sqrt{\tan x}-\sqrt{\cot x}$. Then $$ dt =\frac{\sqrt{\cot x}+\sqrt{\tan x}}{2\sin x \cos x}dx,\>\>\>\>\> t^2+4=\frac{(\sin x + \cos x)^2}{\sin x \cos x} $$ and \begin{align} &\int_0^{\pi/2} \frac{\sqrt{\tan x}}{\sin x(\cos x+\sin x)}{d}x\\ =&\int_0^{\pi/2} \frac{\sqrt{\tan x}+\sqrt{\cot x}}{(\sin x +\cos x)^2}dx=\int_{-\infty}^\infty\frac{2}{t^2+4}dt=\pi \end{align}