[Math] Find the range of $f(x)=\sin[x]$ where $(-\pi/4)\le x \le (\pi/4)$ and [x] is the greatest integer function of x

functionstrigonometry

Question:

Find the range of $f(x)=\sin[x]$ where $(-\pi/4)\le x \le (\pi/4)$ and $[x]$ denotes the greatest integer function of $x$.

Since $\pi=3.141…$, $\pi/4 < 1$. $\therefore [π/4]=0$. So, upper limit of $f(x)$ is $0$ also $-\pi/4 > -1$ so $[-\pi/4]$ is $-1$. Therefore, the range should be $\{\sin(-1),0\}$. Though I think I'm right, the solution in the answer key is given as $\{\sin(-1),0,\sin(1)\}$.

How is it possible to get $\sin(1)$ as a result?

Best Answer

The floor function of a float/real returns the integer right below the number.

For $0\le x <1$, $\lfloor x\rfloor=0$ and for $1\le x \le \frac{\pi}{4}$, $\lfloor x\rfloor=1$. So the domain consists of $x \in \{-1, 0, 1\}$ and the range thus becomes $\{\sin(−1),\sin(0),\sin(1)\}$.