Differentiability at a Point (First Principles)
A function f is differentiable at a point x=a if the derivative
f′(a)=limh→0hf(a+h)−f(a)
exists as a finite number. This is the definition itself — no shortcut formula, no
continuity check by itself proves this. Testing it this way (plugging directly into
the difference-quotient limit) is called checking differentiability from first
principles, and it is the go-to method whenever f is defined piecewise, or
involves a factor like sin(1/x) or ∣x∣ that ordinary differentiation rules
cannot safely be applied to right at the point in question.
Why you cannot always just "differentiate normally"
If f near a were a single smooth formula (a polynomial, a standard trig/exp/log
expression), you could differentiate it with the usual rules and simply evaluate at
a. But when the formula for f changes at a (a piecewise definition), or
contains a term that oscillates wildly near a (like sin(1/x) as x→0), the
ordinary rules do not apply directly at that exact point — you must go back to the
limit definition.
Worked example: f(x)=x2sin(1/x) for x=0, f(0)=0, at x=0
By the definition,
f′(0)=limh→0hf(0+h)−f(0)=limh→0hh2sin(1/h)−0=limh→0hsin(h1).
The factor sin(1/h) oscillates between −1 and 1 forever as h→0 and never
settles down — so you cannot just "plug in" h=0 inside it. Instead, bound it: since
−1≤sin(1/h)≤1 for every h=0,
−∣h∣≤hsin(1/h)≤∣h∣.
As h→0, both −∣h∣ and ∣h∣ go to 0. By the Squeeze (Sandwich) Theorem,
the quantity trapped between them also goes to 0. Hence
f′(0)=0.
So f IS differentiable at x=0, with f′(0)=0 — even though the oscillating
sin(1/x) term looks alarming, the x2 factor "kills" the oscillation fast enough
as x→0.
The relationship to continuity — and why this is a DIFFERENT check
Every differentiable function is automatically continuous at that point
(differentiability is the stronger condition). But the CONVERSE is false — a function
can be perfectly continuous at a point and still fail to be differentiable there (the
classic example is f(x)=∣x∣ at x=0: continuous, but the left-hand and right-hand
derivatives disagree, −1 vs 1, so no single derivative exists). This means
checking continuity is not enough to answer a "is f differentiable here?" …