If $f(x) = x – [x]$ then find the derivative at $x = 0.5$

calculusderivatives

If $f(x) = x – [x]$ where $[\,\,\,]$ denotes the greatest integer function, then find $f'\left(\dfrac12\right)$.

My approach:
$$\dfrac{dy}{dx} = \lim_{h\to0}\dfrac{\Big((x+h) – [x+h]\Big) – \Big((x) – [x]\Big)}{h}$$
$$\implies\dfrac{dy}{dx}\bigg|_{x = 1/2} = \lim_{h\to0}\dfrac{\Big((1/2+h) – [1/2+h]\Big) – \Big(1/2 – [1/2]\Big)}{h}$$
$$\implies\dfrac{dy}{dx}\bigg|_{x = 1/2} = \lim_{h\to0}\dfrac{(1/2+h) – [1/2+h] -(1/2 – 0)}{h}$$
$$\implies\dfrac{dy}{dx}\bigg|_{x = 1/2} = \lim_{h\to0}\dfrac{h – [1/2+h]}{h}$$
Since $h$ is tending to $0%$, the greatest integer function $[1/2+h]$ will be $0$ and hence the derivative will be $1$.


Is this approach correct?

Also, I'm wondering if there is another interesting method to solve the problem as I'm seeing the derivative question involving the greatest integer function first time in my book.

Best Answer

You don't need all that. If $x\in(0,1)$, then $f(x)=x-\lfloor x\rfloor=x$, and therefore $f'\left(\frac12\right)=1$.