Differentiability and Continuity

The proof is short. For x≠ax \ne a,
f(x)−f(a)=f(x)−f(a)x−a⋅(x−a).f(x) - f(a) = \frac{f(x) - f(a)}{x - a} \cdot (x - a).
As x→ax \to a, the fraction approaches f′(a)f'(a) and x−ax - a approaches 00, so f(x)−f(a)f(x) - f(a) approaches f′(a)⋅0=0f'(a) \cdot 0 = 0. That says lim⁡x→af(x)=f(a)\lim_{x \to a} f(x) = f(a), which is continuity at aa.
Equivalently, a function that isn't continuous at aa isn't differentiable there. In particular, if aa isn't in the domain of ff, it isn't in the domain of f′f'. The converse is false: a continuous function can fail to have a derivative.
A jump
A corner
A cusp
A vertical tangent (dashed)

Corners

Cusps and vertical tangents

Where two formulas meet

At a point where a piecewise function changes formulas, check continuity first. If ff isn't continuous there, it isn't differentiable. If it is, compare the one-sided derivatives.

A function that oscillates