Step 1: Use the identity for \( \sin^2 x \).
We can simplify \( \sin^2 x \) using the half-angle identity:
\[
\sin^2 x = \frac{1 - \cos(2x)}{2}
\]
Step 2: Substitute into the integral.
Substitute this identity into the integral:
\[
\int_0^{\frac{\pi}{2}} \sin^2 x \, dx = \int_0^{\frac{\pi}{2}} \frac{1 - \cos(2x)}{2} \, dx
\]
Step 3: Integrate.
We now integrate term by term:
\[
\frac{1}{2} \int_0^{\frac{\pi}{2}} 1 \, dx - \frac{1}{2} \int_0^{\frac{\pi}{2}} \cos(2x) \, dx
\]
The first term gives:
\[
\frac{1}{2} \cdot \frac{\pi}{2} = \frac{\pi}{4}
\]
The second term is:
\[
\frac{1}{2} \cdot \left[ \frac{\sin(2x)}{2} \right]_0^{\frac{\pi}{2}} = 0
\]
Step 4: Conclusion.
Thus, the value of the integral is \( \frac{\pi}{4} \).