Biến đổi $\sqrt{1+\cos x}=\sqrt{\cos^{2}\dfrac{x}{2}+\sin^{2}\dfrac{x}{2}+\cos^{2}\dfrac{x}{2}-\sin^{2}\dfrac{x}{2}}=\sqrt{2\cos^{2}\dfrac{x}{2}}=\sqrt{2}\left|\cos\dfrac{x}{2}\right|$
$I=\int\limits_{0}^{\pi}\sqrt{1+\cos x}dx=\int\limits_{0}^{\pi}\sqrt{2}\left|\cos \dfrac{x}{2}\right|dx$
$=\sqrt{2}\int\limits_{0}^{\pi}\cos\dfrac{x}{2}dx$ (vì $\cos\dfrac{x}{2}>0$ với mọi $x\in (0;\pi )$)
$=2\sqrt{2}\sin\dfrac{x}{2}\left|\begin{matrix}\pi \\ 0\end{matrix}\right. =2\sqrt{2}$