Integral involving $\sqrt{\tan x}$ $$\int \dfrac{1}{1+\sqrt{\tan x}}\quad dx$$
$$\int \dfrac{\sqrt{\sin x}}{\sqrt{\sin x} + \sqrt{\cos x}}\quad dx$$
It is difficult for me to solve this integration.
 A: Hint
$$u= \sqrt{\tan(x)} \\
du = \frac{1}{2\sqrt{\tan(x)}} \sec^2(x)dx=\frac{1}{2u}(1+u^4)dx\\
dx=\frac{2u}{1+u^4}du \\
\int \dfrac{1}{1+\sqrt{\tan x}}\quad dx=\int \dfrac{1}{1+u}\frac{2u}{1+u^4}\quad du$$
and use partial fraction decomposition.
A: $\displaystyle \mathcal{I} = \int\frac{1}{1+\sqrt{\tan x}}dx = \int \frac{\sqrt{\cot x}}{1+\sqrt{\cot x}}dx$
substitute $\cot x= t^2$ and $\displaystyle dx = -\frac{1}{1+t^4}dt$
$\displaystyle \mathcal{I}= -\int\frac{t}{(1+t)(1+t^4)}dt = -\frac{1}{2}\int\frac{\bigg((1+t^4)+(1-t^4)\bigg)t}{(1+t)(1+t^4)}dt$ 
$\displaystyle = -\frac{1}{2}\int\frac{t}{1+t}dt-\frac{1}{2}\int\frac{(t-t^2)(1+t^2)}{1+t^4}dt$
$\displaystyle = -\frac{1}{2}\int \frac{(1+t)-1}{1+t}dt-\frac{1}{2}\int \frac{t+t^3-(t^2-1)-t^4-1}{1+t^4}dt$
$\displaystyle =-\frac{t}{2}+\frac{1}{2}\ln|t+1|-\frac{1}{4}\int\frac{2t}{1+t^4}-\frac{1}{2}\int\frac{t^3}{1+t^4}dt+\frac{1}{2}\int \frac{t^2-1}{1+t^4}dt-\frac{1}{2}t+\mathcal{C}$
all integrals are easy except $\displaystyle \mathcal{J} = \int\frac{t^2-1}{1+t^4}dt = \int\frac{1-t^{-2}}{\left(t+t^{-1}\right)^2-2}dt = \int\frac{(t-t^{-1})'}{(t-t^{-1})^2-2}dt$
