<p>Evaluate \(\displaystyle\int_0^{2\pi} [\cos x]\,dx\) where \([\cdot]\) denotes the greatest integer function.</p>
Step-by-Step Solution
Key Concept: Break [0,2\pi] into sub-intervals where cos x takes integer values: [-1,0,0,1] based on where cos x crosses integers.
Step 1: Determine the value of $[\cos x]$ over subintervals of $[0, \pi]$.
The greatest integer function $[y]$ takes integer values. The range of $\cos x$ on $[0, \pi]$ is $[-1, 1]$.
\begin{itemize}
\item For $x \in [0, \pi/2)$: $\cos x \in (0, 1]$.
At $x=0$, $\cos x = 1$, so $[\cos x] = 1$.
For $x \in (0, \pi/2)$, $\cos x \in (0, 1)$, so $[\cos x] = 0$.
The contribution of a single point to the integral is zero. Thus, for the purpose of integration over $[0, \pi/2)$, $[\cos x] = 0$.
\item For $x \in [\pi/2, \pi]$: $\cos x \in [-1, 0]$.
At $x=\pi/2$, $\cos x = 0$, so $[\cos x] = 0$.
For $x \in (\pi/2, \pi)$, $\cos x \in (-1, 0)$, so $[\cos x] = -1$.
At $x=\pi$, $\cos x = -1$, so $[\cos x] = -1$.
Thus, for the purpose of integration over $(\pi/2, \pi]$, $[\cos x] = -1$.
\end{itemize}
Step 2: Evaluate the integral.
The integral can be split based on these intervals:
$$ \int_0^{\pi} [\cos x] dx = \int_0^{\pi/2} [\cos x] dx + \int_{\pi/2}^{\pi} [\cos x] dx $$
Substituting the values of $[\cos x]$ determined in Step 1:
$$ = \int_0^{\pi/2} 0 \, dx + \int_{\pi/2}^{\pi} (-1) \, dx $$
$$ = 0 + (-1) \left[ x \right]_{\pi/2}^{\pi} $$
$$ = (-1) \left( \pi - \frac{\pi}{2} \right) $$
$$ = (-1) \left( \frac{\pi}{2} \right) $$
$$ = -\frac{\pi}{2} $$
Correct Answer: B