Show that
Question:

$\int_{\frac{-\pi}{2}}^{\frac{\pi}{2}} \sin ^{2} x d x$

Solution:

Let $I=\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} \sin ^{2} x d x$

As $\sin ^{2}(-x)=(\sin (-x))^{2}=(-\sin x)^{2}=\sin ^{2} x$, therefore, $\sin ^{2} x$ is an even function.

It is known that if $f(x)$ is an even function, then $\int_{-a}^{a} f(x) d x=2 \int_{0}^{a} f(x) d x$

$I=2 \int_{0}^{\frac{\pi}{2}} \sin ^{2} x d x$

$=2 \int_{0}^{\frac{\pi}{2}} \frac{1-\cos 2 x}{2} d x$

$=\int_{0}^{\frac{\pi}{2}}(1-\cos 2 x) d x$

$=\left[x-\frac{\sin 2 x}{2}\right]_{0}^{\frac{\pi}{2}}$

$=\frac{\pi}{2}$