I2.4 Given that $f(x)=c \left\lvert\, \frac{1}{x}-\left\lfloor\frac{1}{x}+\frac{1}{2}\right\rfloor\right.$, where $\lfloor x\rfloor$ is the greatest integer less than or equal to the real number $x$. If $d$ is the maximum value of $f(x)$, find the value of $d$.
Let $\frac{1}{x}+\frac{1}{2}=a+b$, where $a$ is an integer and $0 \leq b<1$.
$\left\lfloor\frac{1}{x}+\frac{1}{2}\right\rfloor=a \Rightarrow-\left\lfloor\frac{1}{x}+\frac{1}{2}\right\rfloor=-a \Rightarrow \frac{1}{x}-\left\lfloor\frac{1}{x}+\frac{1}{2}\right\rfloor=a+b-\frac{1}{2}-a=b-\frac{1}{2}$
$0 \leq b<1 \Rightarrow-\frac{1}{2} \leq b-\frac{1}{2}<\frac{1}{2} \Rightarrow\left|b-\frac{1}{2}\right| \leq \frac{1}{2} \quad$ (equality holds when $b=0$ )
$$
\left.f(x)=200 \times\left|\frac{1}{x}-\left\lfloor\frac{1}{x}+\frac{1}{2}\right\rfloor=200 \times\right| b-\frac{1}{2} \right\rvert\, \leq 200 \times \frac{1}{2}=100
$$
$d=100$ (You may verify the result by putting $x=2$.)