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.
 A: \begin{align}
I&=\int \frac{\sqrt{\sin x}}{\sqrt{\sin x} + \sqrt{\cos x}} dx\\
&=\int \frac{1}{\sqrt{\cot x}+1}dx
=\frac12x -\frac12 \int \frac{\sqrt{\cot x}-1}{\sqrt{\cot x}+1}dx\tag1 \\
\end{align}
where, with $t=\sqrt{\cot x}$
\begin{align}
\int \frac{\sqrt{\cot x}-1}{\sqrt{\cot x}+1}dx
&=\int \frac{2t(1-t)}{(1+t)(1 + t^4)}dt\\
&= 2 \int \frac{t^3}{1+t^4}-\frac1{1+t}+\frac{1-t^2}{1+t^4}\ dt\\
&= \frac12\ln(1+t^4)-2\ln(1+t)+2\int \frac{d(t+\frac1t)}{2-(t+\frac1t)^2}dt\\
&= 2\ln \frac{\sqrt[4]{1+t^4}}{1+t}+\sqrt2\coth^{-1}\frac{1+t^2}{\sqrt2t}
\end{align}
Substitute into (1) to obtain
\begin{align}
I= \frac12x+\ln (\sqrt{\sin x}+\sqrt{\cos x})
-\frac1{\sqrt2}\coth^{-1}\frac{\sqrt{\tan x}+\sqrt{\cot x}}{\sqrt{2}}
\end{align}
A: Recall that $$\begin{align}\sin(x) &= \frac{\tan(x)}{\sec(x)} \\ \cos(x) &= \frac1{\sec(x)} \\ \sec^2(x) &= 1 + \tan^2(x)\end{align}$$
Then,
$$\int\frac{\sqrt{\sin(x)}}{\sqrt{\sin(x)} + \sqrt{\cos(x)}}\,\mathrm dx\equiv\int\sec^2(x)\cdot\frac{\sqrt{\tan(x)}}{\sqrt{\tan(x)} \left(1 + \tan^2(x)\right) + 1 + \tan^2(x)}\,\mathrm dx$$
Now, let $u = \sqrt{\tan(x)}\implies2\cdot\mathrm du = \dfrac{\sec^2(x)}{\sqrt{\tan(x)}}\,\mathrm dx$. So,
$$\begin{align}\int\sec^2(x)\cdot\frac{\sqrt{\tan(x)}}{\sqrt{\tan(x)} \left(1 + \tan^2(x)\right) + 1 + \tan^2(x)}\,\mathrm dx&\equiv\int2\cdot\frac{u^2}{u\left(1 + u^4\right) + 1 + u^4}\,\mathrm du \\ &= 2\int\frac{u^2}{(1 + u)(1 + u^4)}\,\mathrm du\end{align}$$
From here on, partial fractions and linearity are your friends.
A: 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)$$
A: HINT
If $f(x)=\dfrac{\sqrt{\sin{x}}}{\sqrt{\sin{x}}+\sqrt{\cos{x}}}$ then $f(x)+f(\frac{\pi}{2}-x)=1$
