The number of roots of the equation $x^2 + \sin^2 x = 1$ in the closed interval $\left[ 0, \frac{\pi}{2} \right]$ is\\ (A) 0\\ (B) 1\\ (C) 2\\ (D) 3