Differentiability is a stronger condition than continuity. If f is differentiable at a, it must be continuous at a. However, continuity does not guarantee differentiability — the classic counterexample is f(x) = |x| at x = 0.
A function is differentiable at x = a if lim(h->0) [f(a+h)-f(a)]/h exists. This requires both the left-hand derivative (h->0-) and right-hand derivative (h->0+) to exist and be equal.
Non-differentiability occurs in three scenarios: (1) corners/cusps where the function is continuous but one-sided derivatives differ, (2) vertical tangents where the derivative is infinite, (3) discontinuities where the function isn't even continuous.
For piecewise functions, check differentiability at junction points by computing both one-sided derivatives. If f(x) = {g(x), x <= a; h(x), x > a}, then f is differentiable at a if: (1) g(a) = h(a) (continuity), and (2) g'(a) = h'(a-) and h'(a+) exist and are equal.
The function f(x) = |g(x)| is not differentiable where g(x) = 0 (provided g'(x) != 0 there). The function f(x) = max(g(x), h(x)) is not differentiable where g(x) = h(x) (provided g'(x) != h'(x)).
JEE commonly tests: how many points of non-differentiability does f(x) = |x-1| + |x-2| + ... have? Answer: at x = 1, 2, ... (each |x-a| contributes a corner at x = a).
An interesting result: *sin with f(0) = 0 is differentiable at 0 if n >= 2 (f'(0) = 0), but not differentiable at 0 if n = 1 (sin oscillates).