$\int\frac{\sin x}{\sqrt{1-\sin x}}dx=?$ Calculate this integral $\displaystyle\int\dfrac{\sin x}{\sqrt{1-\sin x}}dx=?$  
Effort;
$1-\sin x=t^2\Rightarrow \sin x=1-t^2\Rightarrow \cos x=\sqrt{2t^2-t^4}$
$1-\sin x=t^2\Rightarrow-\cos x dx=2tdt\Rightarrow dx=\frac{2t}{\sqrt{t^4-2t^2}}dt$
$\displaystyle\int\frac{1-t^2}{t}\cdot\frac{2t}{\sqrt{t^4-2t^2}}dt=2\int\frac{1-t^2}{\sqrt{t^4-2t^2}}dt$
$\ = 2\displaystyle\int\frac{1}{\sqrt{t^4-2t^2}}dt-2\displaystyle\int\frac{t}{\sqrt{t^2-2t}}dt$
$\ = 2\displaystyle\int t^{-1}(t^2-2)^{-\frac{1}{2}}dt-2\displaystyle\int t(t^2-2t)^{-\frac{1}{2}}dt$
But after that I don't know how to continue.
 A: By setting $x=\frac{\pi}{2}-t$ the problem boils down to finding:
$$ \int \frac{\cos t}{\sqrt{1-\cos t}}\,dt = \frac{1}{\sqrt{2}}\int\frac{1-2\sin^2\frac{t}{2}}{\sin\frac{t}{2}}\,dt $$
where:
$$ \int \frac{1}{\sin\frac{t}{2}}\,dt = C + 2\log\left(\tan\frac{t}{4}\right).$$
A: Slightly different attempt to get rid of the trig functions (assuming a domain where no sign issues cause trouble):
$$\begin{array}{rl}
\displaystyle \frac{\sin x}{\sqrt{1-\sin x}} 
& \displaystyle  
= \frac{\sin x\sqrt{1+\sin x}}{\sqrt{1-\sin x}\sqrt{1+\sin x}}\\[7 pt]
& \displaystyle  
= \frac{\sin x\sqrt{1+\sin x}}{\sqrt{1-\sin^2 x}}\\[7 pt]
& \displaystyle  
= \frac{\cos x \sin x\sqrt{1+\sin x}}{\cos^2 x}\\[7 pt]
& \displaystyle  
= \frac{\cos x \sin x\sqrt{1+\sin x}}{1-\sin^2 x}
\end{array}$$
Now let $t = \sin x$:
$$\int \frac{\sin x}{\sqrt{1-\sin x}}  \,\mbox{d}x 
=\int \frac{\cos x \sin x\sqrt{1+\sin x}}{1-\sin^2 x}\,\mbox{d}x  \to 
\int \frac{t\sqrt{1+t}}{1-t^2} \,\mbox{d}t$$
This can be rationalized with $u^2 = 1+t$ to get (after simplifying):
$$\int \left( -2 - \frac{2}{u^2-2} \right) \, \mbox{d}u$$
This appears to be a longer route than the suggestions given in some other answers ;o).
A: HINT:
$$\dfrac{\sin x}{\sqrt{1-\sin x}}=-\sqrt{1-\sin x}+\dfrac1{\sqrt{1-\sin x}}$$
$$1-\sin x=1-\cos\left(\dfrac\pi2-x\right)=2\sin^2\left(\dfrac\pi4-\dfrac x2\right)$$
Now for real $a,$ $$\sqrt{a^2}=|a|=\begin{cases}+a &\mbox{if } a\ge0 \\-a & \mbox{if } a<0 \end{cases}$$
A: I might be missing something, but I think this is possible to do with a prolonged substitution:
$$ 
\int \frac{\sin(x)}{\sqrt{1-\sin(x)}} \ dx.
$$
Let $u = 1-\sin(x)$, then $$ du = -\cos(x) dx \implies -\sec(x) du = dx.$$
Then we get $$ \int (1-u) \frac{1}{\sqrt{u}} (-\sec(x) du).$$
We need to find $\sec(x)$ in terms of $u$: 
$$
u = 1-\sin(x) \\
\sin(x) = 1-u \\
\sin^2(x) = (1-u)^2 \\
1-\cos^2(x) = 1-2u+u^2 \\
\cos^2(x) = 2u-u^2 \\
\cos(x) = \sqrt{2u-u^2 }\\
\sec(x) = \frac{1}{\sqrt{2u-u^2}}
$$
So the integral becomes 
$$ 
\int \frac{u-1}{\sqrt{u}} \cdot \frac{1}{\sqrt{2u-u^2}} \ du \\
=\int \frac{u-1}{\sqrt{u^2}} \cdot \frac{1}{\sqrt{2-u}} \ du \\
=\int \frac{u-1}{u} \cdot \frac{1}{\sqrt{2-u}} \ du \\ 
=\int \frac{1}{\sqrt{2-u}} \ du - \int \frac{1}{u\sqrt{2-u}} \ du
$$
The first term is easy to evaluate: $\int \frac{1}{\sqrt{2-u}} \ du = -2\sqrt{2-u}$.
The second term is a bit more involved but with a substitution $v = \sqrt{2-u}$ you'll find that you can use inverse hyperbolic trig to get $\int \frac{1}{u\sqrt{2-u}} \ du = -\sqrt{2} \tanh^{-1}( \frac{\sqrt{2-u}}{\sqrt{2}})$. So altogether, we've got 
$$ 
\int \frac{1}{\sqrt{2-u}} \ du - \int \frac{1}{u\sqrt{2-u}} \ du \\
= -2\sqrt{2-u} - \left( \sqrt{2} \tanh^{-1} \left( \frac{\sqrt{2-u}}{\sqrt{2}}\right) \right) + C \\
= \sqrt{2} \tanh^{-1} \left( \frac{\sqrt{2-u}}{\sqrt{2}} \right) - 2\sqrt{2-u} +C.
$$
And now to replace $u$ with $1-\sin(x)$,
$$\sqrt{2} \tanh^{-1} \left( \frac{\sqrt{2-u}}{\sqrt{2}} \right) - 2\sqrt{2-u} +C \\ =\sqrt{2} \tanh^{-1} \left( \frac{\sqrt{2-(1-\sin(x))}}{\sqrt{2}} \right) - 2\sqrt{2-(1-\sin(x))} +C \\
= \sqrt{2} \tanh^{-1} \left( \frac{\sqrt{\sin(x)+1}}{\sqrt{2}} \right) - 2\sqrt{\sin(x)+1} +C
$$
