Answer
$\displaystyle \int_{0}^{\pi}\cos{\frac{x}{2}}dx = 2$
Work Step by Step
To evaluate the integral $\displaystyle \int_{0}^{\pi}\cos{\frac{x}{2}}dx$, let $u = \dfrac{x}{2}$.
Then we obtain $u = \dfrac{x}{2} \longrightarrow du = \dfrac{1}{2}dx \longrightarrow 2du = dx$
Before substituting, determine the new upper and lower limits of integration
Lower limit: When $x = 0$, $u = \dfrac{0}{2} = 0$
Upper limit: When $x = \pi$, $u = \dfrac{\pi}{2} $
$\displaystyle \int_{0}^{\pi}\cos{\frac{x}{2}}dx = \displaystyle \int_{0}^{\frac{\pi}{2}}\cos{u}\ 2du = \displaystyle 2\int_{0}^{\frac{\pi}{2}}\cos{u}\ du = 2 \sin{u}\Big\vert_{0}^{\frac{\pi}{2}} = 2\Big[\sin{\frac{\pi}{2}} - \sin{0}\Big] = 2\Big[ 1 - 0 \Big] = 2\Big[ 1 \Big] = 2 $