How can I integrate this rational trigonometric function? $$\int^\pi_0 \frac{(\sin x+\cos x)^2}{(1+\sin2x)^{1/2}}\operatorname d x$$
I have managed to simplify this expression to:
$$\int_0^\pi\frac{(\sin x+\cos x)^2}{|\sin x+\cos x|}\operatorname d x\text.$$
Please help me move forward from here onwards using the limits.
 A: You can notice that $(\sin x+\cos x)^2=1+\sin2x$. Now substitute $2x=\pi/2-2t$, so your integral becomes
$$
\int_0^\pi\sqrt{1+\sin2x}\,dx=-\int_{\pi/4}^{-3\pi/4}\sqrt{2}\lvert\cos t\rvert\,dt
$$
A: HINT:
$$\int_0^\pi\frac{\left(\sin\left(x\right)+\cos\left(x\right)\right)^2}{\sqrt{\sin\left(2x\right)+1}}\,\mathrm{d}x=\int_0^\pi\sqrt{\sin\left(2x\right)+1}\,\mathrm{d}x$$
Using the position $t=2x$,
$$=\frac{1}{2}\int_0^{2\pi}\sqrt{\sin\left(t\right)+1}\,\mathrm{d}t$$
Using the position $u=\tan(t/2)$ you will have $$\int \frac{2\left(u+1\right)}{\left(1+u^2\right)\sqrt{1+u^2}}\mathrm{d}u$$
where you can applicate the sum rule
$$\int f\left(x\right)\pm g\left(x\right)\mathrm{d}x=\int f\left(x\right)dx\pm \int g\left(x\right)\mathrm{d}x$$
A: $$\int_0^{\pi}\left|\sin x+\cos x\right|\,dx=\sqrt2\int_0^{\pi}\left|\sin \left(x+\frac{\pi}4\right)\right|\,dx=\sqrt2\int_{\frac{\pi}4}^{\frac{5\pi}4}\left|\sin t\right|\,dt=\sqrt2\int_{0}^{\pi}\left|\sin t\right|\,dt=2\sqrt2$$
since $\left|\sin t\right|$ has a period of $\pi$.
A: $HINT$:
We Know That,
$\int^\pi_0 \frac{(\sin x+\cos x)^2}{(1+\sin2x)^{1/2}}$ = $\int_0^\pi\frac{(\sin x+\cos x)^2}{|\sin x+\cos x|}.$
From o to $3pi/4$ denominator is positive and from $3pi/4$ to $pi$ it is negative,
Then you can proceed through simple calculations,
