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