f(x) = x^2 sin(1/x), f(0) = 0
Continuity at 0: |f(x)| <= x^2 -> 0. Yes, continuous.
Differentiability at 0: f'(0) = lim [h^2 sin(1/h)]/h = lim h*sin(1/h) = 0. Yes, differentiable.
But f' is discontinuous at 0: For x != 0: f'(x) = 2x sin(1/x) - cos(1/x). As x->0, the -cos(1/x) term oscillates between -1 and 1. So lim f'(x) does not exist.
Lesson: f'(a) can exist even when f' is discontinuous at a. The derivative exists via the limit definition, but f' is not continuous.
Contrast with x*sin(1/x), f(0)=0: f'(0) = lim sin(1/h) = DNE. So f is continuous but NOT differentiable at 0.
Rule of thumb: x^n * sin(1/x): differentiable at 0 if n >= 2, not differentiable if n = 1.