Using Darboux theorem for $f'$ check whether the given function $f(x)=x-\left[x\right], x\in[0,2]$ is a derivative of a function 
Using Darboux theorem for $f'$ check whether the given function $f(x)=x-\left[x\right], x\in[0,2]$ is a derivative of a function.

Please help me to solve the problem. I see that $f(x)=0=f(2)$. What to do?

Hint: Note that
$$f(x)=\begin{cases} x, &0\leq x<1\\
x-1, &1\leq x<2\\
0, &x=2\end{cases}.$$
Thus $f$ has a jump discontinuity at $x=1$. 
On the other hand Darboux theorem tells you that the derivative of a function satisfies the intermediate value property. Now can you see that $f$ fails to satisfy this property?
