Question:
$\int_{0}^{\frac{\pi}{2}} \cos ^{2} x d x$
Solution:
$I=\int_{0}^{\frac{\pi}{2}} \cos ^{2} x d x$ ...(1)
$\Rightarrow I=\int_{0}^{\frac{\pi}{2}} \cos ^{2}\left(\frac{\pi}{2}-x\right) d x$ $\left(\int_{0}^{0} f(x) d x=\int_{0}^{0} f(a-x) d x\right)$
$\Rightarrow I=\int_{0}^{\frac{\pi}{2}} \sin ^{2} x d x$ ...(2)
Adding (1) and (2), we obtain
$2 I=\int_{2}^{\frac{\pi}{2}}\left(\sin ^{2} x+\cos ^{2} x\right) d x$
$\Rightarrow 2 I=\int_{0}^{\frac{\pi}{2}} 1 d x$
$\Rightarrow 2 I=[x]_{0}^{\frac{\pi}{2}}$
$\Rightarrow 2 I=\frac{\pi}{2}$
$\Rightarrow I=\frac{\pi}{4}$