We are tasked with evaluating the integral: \[ I = \int_0^{\frac{\pi}{2}} \sin^2(x) \, dx. \]
We use the identity for \( \sin^2(x) \): \[ \sin^2(x) = \frac{1 - \cos(2x)}{2}. \]
Thus, the integral becomes: \[ I = \int_0^{\frac{\pi}{2}} \frac{1 - \cos(2x)}{2} \, dx = \frac{1}{2} \int_0^{\frac{\pi}{2}} (1 - \cos(2x)) \, dx. \]
We can now split the integral: \[ I = \frac{1}{2} \left[ \int_0^{\frac{\pi}{2}} 1 \, dx - \int_0^{\frac{\pi}{2}} \cos(2x) \, dx \right]. \]
Evaluating each integral: \[ \int_0^{\frac{\pi}{2}} 1 \, dx = \frac{\pi}{2}, \quad \int_0^{\frac{\pi}{2}} \cos(2x) \, dx = 0. \]
Therefore, the value of the integral is: \[ I = \frac{1}{2} \left( \frac{\pi}{2} - 0 \right) = \frac{\pi}{4}. \]