Let \( f:\left(-\frac{\pi}{2},\frac{\pi}{2}\right)\rightarrow\mathrm{R} \) be a function such that \( f(x)=\cos[x] \), where [.] is greatest integer function then range \( (f(x)) \) is
Answer & explanation
Correct answer: option 3
The correct answer is Option (3) → \( \{1,cos1,cos2\} \)
Since \( \frac{\pi}{2}\approx 1.57 \), the domain is roughly \( -1.57\lt x\lt 1.57 \). Splitting it where [x] changes:
\( \displaystyle -1.57\lt x\lt -1:\ [x]=-2,\ f(x)=\cos(-2)=\cos 2 \)
\( \displaystyle -1\le x\lt 0:\ [x]=-1,\ f(x)=\cos(-1)=\cos 1 \)
\( \displaystyle 0\le x\lt 1:\ [x]=0,\ f(x)=\cos 0=1 \)
\( \displaystyle 1\le x\lt 1.57:\ [x]=1,\ f(x)=\cos 1 \)
Cosine is an even function, so \( \cos(-2)=\cos 2 \) and \( \cos(-1)=\cos 1 \).
Hence the range is \( \{1,\cos 1,\cos 2\} \).