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.


$$(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|$$


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}$.


\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$$