How to evaluate the integral $\int \sqrt{1+\sin(x)} dx$ To find:
$$\int \sqrt{1+\sin(x)} dx$$
What I  tried:
I put $\tan(\frac{x}{2}) = t$, using which I got it to:
$$I = 2\int \dfrac{1+t}{(1+t^2)^{\frac{3}{2}}}dt$$
Now I am badly stuck. There seems no way to approach this one. Please give a hint. Also, can we initially to some manipulations on the original integral to make it easy? Thank you.
 A: \since, $$1=\sin^2\left(\frac{x}{2}\right)+\cos^2\left(\frac{x}{2}\right)$$ 
$$\sin (x)=2\sin\left(\frac{x}{2}\right)\cos\left(\frac{x}{2}\right)$$
Therefore, we can put the above values of $1$ and $\sin (x)$ in the question. 
Now, we have. $$\int \sqrt{\sin^2\left(\frac{x}{2}\right)+ \cos^2\left(\frac{x}{2}\right)+2\sin\left(\frac{x}{2}\right)            \cos\left(\frac{x}{2}\right)}    \,dx$$ 
And,$$\sin^2\left(\frac{x}{2}\right)+\cos^2\left(\frac{x}{2}\right)+2\sin\left(\frac{x}{2}\right)\cos\left(\frac{x}{2}\right)=\left(\sin\left(\frac{x}{2}\right)+\cos\left(\frac{x}{2}\right)\right)^2$$
By putting the above value, we get
$$\int\sqrt{\left(\sin\left(\frac{x}{2}\right)+ \cos\left(\frac{x}{2}\right)\right)^2}\, dx$$
$$=\int \sin\left(\frac{x}{2}\right)+\cos\left(\frac{x}{2}\right)\,\,dx$$
$$=-2\cos\left(\frac{x}{2}\right)+2\sin\left(\frac{x}{2}\right)+C$$
A: May be another way, trying to get rid of the radical.
Let $$\sqrt{1+\sin x}=t^2\implies x=-\sin ^{-1}\left(1-t^4\right)\implies dx=\frac{4 t^3}{\sqrt{1-\left(1-t^4\right)^2}}\,dt$$ So, $$I=\int \sqrt{1+\sin x}\,dx=\int\frac{4 t^3}{\sqrt{2-t^4}}\,dt$$ Now, let $$t^2=v\implies t=\sqrt v\implies dt=\frac{dv}{2 \sqrt{v}}$$ $$I=\int\frac{2 v}{\sqrt{2-v^2}}\,dv=-2 \sqrt{2-v^2}+C$$
A: There is no problem in the substitution.
$$I = 2\int \dfrac{1+t}{(1+t^2)^{\frac{3}{2}}}dt$$
$$I = 2\left(\int \dfrac{1}{(1+t^2)^{3/2}  }\,dt+ \int \dfrac{t}{(1+t^2)^{3/2}}\,dt\right)$$
Define $$G:=\int  \dfrac{1}{(1+t^2)^{3/2}}\,\,dt$$ $$AND$$ $$H:=\int \dfrac{t}{(1+t^2)^{3/2}}\,\,dt$$
For G:
Since $t = \tan\left(\frac{\theta}{2}\right), dt = \frac{1}{2} \sec^2 \left(\frac{\theta}{2}\right) d \theta$
So $$G = \int  \dfrac{1}{\left(\sec^2 \left(\dfrac{\theta}{2}\right)\right)^{3/2}} \,\,\, \frac{1}{2} \sec^2 \left(\dfrac{\theta}{2}\right) \,\,\,d \theta  \\\\ =  \frac{1}{2} \int \dfrac{1}{\sec \left(\dfrac{\theta}{2}\right)} d \theta =  \frac{1}{2} \int  \cos\left(\dfrac{\theta}{2}\right) d \theta \\\\ = \sin\left(\dfrac{\theta}{2}\right) $$
For H:
$u := (1+t^2)^{\frac{1}{2}} \implies u^2 = 1+t^2 \implies 2u \,\,du = 2t\,\, dt $
$$H = \int \dfrac{u}{u^3}du = \int \dfrac{1}{u^2}du = -u^{-1} = -(1+t^2)^{-1/2} = -\left(\sec\left(\dfrac{\theta}{2}\right)\right)^{-1} = - \cos\left(\dfrac{\theta}{2}\right) $$
Incorporating G and H with $I = 2(G+H)$, then the answer is done (Be careful about the sign of I).
A: $$(1+\sin x)=\left(\cos\dfrac x2+\sin\dfrac x2\right)^2$$
$$\implies\sqrt{1+\sin x}=\left|\cos\dfrac x2+\sin\dfrac x2\right|$$
A: In the first quadrant,
$$\sqrt{1+\sin x}=\sqrt\frac{1-\sin^2x}{1-\sin x}=\pm\frac{\sin'x}{\sqrt{1-\sin x}}$$ which you can integrate mentally, giving $\mp2\sqrt{1-\sin x}$.
A: Write $\sin(x)$ as $\cos(\frac\pi2-x)$.
Use formula $\sqrt{1+\cos(\frac\pi2-x)} = \sqrt2\cos(\frac\pi4-\frac x2)$
Now integrate.
Answer is   $-2\sqrt2\sin(\frac\pi4-\frac x2) + C$
