<s>[INST] Integrate $\int \frac{\sqrt{\sin x}}{\sqrt{\sin x} + \sqrt{\cos x}}dx$ 
Evaluate
$$\int \frac{\sqrt{\sin x}}{\sqrt{\sin x} + \sqrt{\cos x}} dx$$

I have tried substitution of $\sin x$ as well as $\cos x$ but it is not giving an answer.
Do not understand if there is a formula for this or not.
 [/INST] Let $x=\tan ^{-1}(t)$ to make
$$I=\int \frac{\sqrt{\sin x}}{\sqrt{\sin x} + \sqrt{\cos x}} dx=\int \frac{dt}{t^{3/2}+t^2+\frac{1}{\sqrt{t}}+1}$$ Now, $t=u^2$
$$I=\int \frac{2 u^2}{u^5+u^4+u+1}\,du=\int \frac{du}{u+1}-\int \frac{u^3-u^2-u+1}{u^4+1}$$ For the second integral, use the roots of $u^4+1=0$ and partial fraction decomposition to face again a series of integrals
$$J_k=\int \frac {du}{u+k}=\log(u+k)$$ where $k$ is a complex number.
Recombine everything together to get
$$I=-\frac{1}{2} \tan ^{-1}\left(\frac{1}{u^2}\right)+\frac{1}{2 \sqrt{2}}\log \left(\frac{u^2-\sqrt{2} u+1}{u^2+\sqrt{2} u+1}\right)+\log \left(\frac{u+1}{\sqrt[4]{u^4+1}}\right)$$
</s>