Question:
Evaluate: $\int \sin ^{2} \frac{x}{2} d x$
Solution:
$\sin ^{2} x=\frac{1-\cos 2 x}{2}$
$\therefore$ The given equation becomes,
$\Rightarrow \int \frac{1-\cos 2 \frac{x}{2}}{2} \mathrm{dx}=\int \frac{1-\cos x}{2} \mathrm{dx}$
We know $\int \cos a x d x=\frac{1}{a} \sin a x+c$
$\Rightarrow \frac{1}{2} \int d x-\frac{1}{2} \int \cos (x) d x$
$\Rightarrow \frac{x}{2}-\frac{1}{2} \sin (x)+c$