Step 1: Understanding the Concept:
The area $A$ bounded by a continuous curve $y = f(x)$ and the $x$-axis from $x = a$ to $x = b$ is given by the definite integral:
\[ A = \int_{a}^{b} |f(x)| \, dx \]
Detailed Explanation:
Let us analyze the function and the interval:
- The function is $y = \cos x$.
- The interval is $\left[-\frac{\pi}{2}, \frac{\pi}{2}\right]$.
- Within this interval (the first and fourth quadrants), the value of $\cos x$ is always non-negative ($\cos x \ge 0$).
- Therefore, we can drop the absolute value bars:
\[ A = \int_{-\pi/2}^{\pi/2} \cos x \, dx \]
Integrating the function:
\[ A = \Big[ \sin x \Big]_{-\pi/2}^{\pi/2} \]
Substitute the upper and lower limits:
\[ A = \sin\left(\frac{\pi}{2}\right) - \sin\left(-\frac{\pi}{2}\right) \]
Using the identity $\sin(-\theta) = -\sin\theta$:
\[ A = 1 - (-1) = 2 \text{ square units} \]
Thus, the area under the curve is 2 square units.
Step 2: Final Answer:
The area is 2 square units, which corresponds to Option (B).