What is the difference between differentiability of a function and continuity of its derivative?
A function may or may not be continuous.
If it is continuous, it may or may not be differentiable. $f(x) = |x|$ is a standard example of a function which is continuous, but not (everywhere) differentiable. However, any differentiable function is necessarily continuous.
If a function is differentiable, its derivative may or may not be continuous. This is a bit more subtle, and the standard example of a differentiable function with discontinuous derivative is a bit more complicated: $$ f(x) = \cases{x^2\sin(1/x) & if $x\neq 0$\\ 0 & if $x = 0$} $$ It is differentiable everywhere, $f'(0) = 0$, but $f'(x)$ oscillates wildly between (a little less than) $-1$ and (a little more than) $1$ as $x$ comes closer and closer to $0$, so it isn't continuous.
- Indeed.
- Indeed, the derivative does not even exist at $x=0$ as you argued in (1).
- Continuity is a necessary condition for differentiability (but it is not sufficient, as you have found in (1)). Your example is not differentiable at $0$, since it is discontinuous there. In particular, you can see this directly since $$ \lim_{h\to0^+} \frac{f(h)-f(0)}{h} = \lim_{h\to0^+} \frac{(2-h)-2}{h} = -1, $$ whereas $$\lim_{h\to0^-} \frac{f(h)-f(0)}{h} = \lim_{h\to0^-} \frac{(1-h)-2}{h} = \lim_{h\to0^-} \frac{-1-h}{h}$$ does not even exist.
As you have shown the continuity of the derivative function doesn't guarantee that the function is itself continuous since it can be piecewise continuous.
WHat we can show is Continuous differentiability implies Lipschitz continuity.