Which is the easiest way to evaluate $\int \limits_{0}^{\pi/2} (\sqrt{\tan x} +\sqrt{\cot x})$? 
Which is the easiest way to evaluate $\int \limits_{0}^{\pi/2} (\sqrt{\tan x} +\sqrt{\cot x})$?

I have reduced this problem to $$   2\int_0^{\pi/2} \sqrt{\tan x} \ dx$$
but now, evaluating this integral is giving me some problems, simply substituting $u=\tan(x)$
and then $\mathrm{d}u=\sec^2(x)\mathrm{d}x \Rightarrow \frac{\mathrm{d}u}{1+u^2}=\mathrm{d}x$ and which in turn gives something a bit ugly, I was wondering which is the most elegant way to evaluate this?

Let $u=\sqrt{\tan(x)}$. Then $u^2 = \tan(x)$ and $2 u \mathrm{d} u = (1+ \tan^2(x)) \mathrm{d} x$. Thus
$$
   \int_0^{\frac{\pi}{2}} \sqrt{\tan(x)} \mathrm{d} x = \int_0^\infty \frac{2u^2}{1+u^4} \mathrm{d} u
$$
Since $1+u^4 = (1 + \sqrt{2} u + u^2)( 1- \sqrt{2} u + u^2)$, partial fraction decomposition applies:
$$
  \frac{2u^2}{1+u^4} = \frac{1}{\sqrt{2}} \left( \frac{u}{u^2-\sqrt{2} u+1}-\frac{u}{u^2+\sqrt{2} u+1} \right)
$$
Hence
$$ \begin{eqnarray}
   \int \frac{2u^2}{1+u^4} \mathrm{d} u &=& \frac{1}{2 \sqrt{2}} \log \left(\frac{u^2-\sqrt{2} u+1}{u^2+\sqrt{2} u+1}\right) + \\ 
    &\phantom{=}& \frac{\tan
   ^{-1}\left(\sqrt{2} u+1\right) -\tan ^{-1}\left(1-\sqrt{2} u\right) }{\sqrt{2}}
\end{eqnarray}
$$
Applying the fundamental theorem of calculus:
$$
   \int_0^{\pi/2} \sqrt{\tan(x)} \mathrm{d} x = \frac{\pi}{\sqrt{2}}
$$
