$I=\int_{0}^{\pi }\sqrt{1 + sin2x}dx= \int_0^{\pi} \sqrt{(\sin x+\cos x)^2}dx=\int_0^{\pi} |\sin x +\cos x| dx$
$=\int_0^{\pi/2} (\sin x +\cos x) dx + \int_{\pi/2}^{\pi} |\sin x +\cos x| dx=2+ \int_{\pi/2}^{\pi} |\sin x +\cos x| dx$
$=2+\sqrt 2\int_{\pi/2}^{\pi}\bigg | \sin (x+\dfrac{\pi}{4} )\bigg | dx=2+\sqrt 2 \bigg ( \int_{3\pi/4}^{\pi} \sin t dt - \int_{\pi}^{5\pi/4} \sin t dt \bigg )$
$=2+ 2\sqrt 2 -2 = 2\sqrt 2$ ( Chú ý $t=x+\dfrac{\pi}{4}$ )