A function differentiable everywhere whose derivative alone is discontinuous. Zoom near the origin to watch the derivative oscillate.
The function itself settles smoothly at the origin. Its slope, though, never stops oscillating. Differentiable does not force the derivative to be continuous. Still, the derivative never skips an intermediate value.
For example, picture a ⚽ ball bouncing lower and faster each time it hits the floor. Its height calmly sinks to zero. Its bounce speed, though, keeps flickering to the very end.
f′(0)=h→0limhsin(1/h)=0
f′(x)=2xsin(1/x)−cos(1/x)(x=0),f′(2πn1)=−1
Examples & Exercises
For f(x)=x2sin(1/x) (x=0), f(0)=0, prove completely by the squeeze theorem that f′(0)=0.
hf(h)−f(0)=hsinh1,hsinh1≤∣h∣→0
r=0.1, h=0.01: the difference quotient ≈−0.0051 is near 0, and the left panel shows the secant slope collapsing onto the horizontal (dashed) tangent.Show proof
By the definition of the derivative, f′(0)=limh→0hf(h)−f(0) (h=0). Since f(0)=0 and f(h)=h2sin(1/h) for h=0, the difference quotient simplifies to hh2sin(1/h)−0=hsin(1/h).
Since ∣sin(1/h)∣≤1, we have ∣hsin(1/h)∣≤∣h∣.
As ∣h∣→0 (h→0), the squeeze theorem gives hsin(1/h)→0 — the limit of the difference quotient exists and f′(0)=0.
The oscillating factor sin(1/h) is completely damped by the factor h.
In the scene, shrinking h down to 0.0001 shows the difference quotient converging to 0 numerically (alongside the bound ∣hsin(1/h)∣≤∣h∣).
Prove completely, via the product and chain rules, that f′(x)=2xsin(1/x)−cos(1/x) for x=0.
f′(x)=dxd[x2sinx1]=2xsinx1−cosx1(x=0)
r=0.1: the right panel plots exactly this formula — the 2xsin(1/x) term decays to 0 while the −cos(1/x) term keeps oscillating with amplitude 1.Show proof
Fix x=0. Since f(x)=x2⋅sin(1/x) is a product of differentiable functions, apply the product rule: f′(x)=2x⋅sin(1/x)+x2⋅dxdsin(1/x).
By the chain rule, dxdsin(1/x)=cos(1/x)⋅dxd(1/x)=cos(1/x)⋅(−1/x2) (since 1/x is differentiable at x=0). Substituting, f′(x)=2xsin(1/x)+x2⋅cos(1/x)⋅(−1/x2)=2xsin(1/x)−cos(1/x) — proved.
Numerical check: f′(0.5)=2(0.5)sin2−cos2≈1.3254, matching the model. This formula is not defined at x=0 — f′(0) must be computed separately as the limit of the difference quotient, as in problem 1.
Prove completely, using the sequence xn=1/(2πn), that f′ is discontinuous at x=0.
r=0.01, h=0.001: zooming closer to 0, the right panel never stops oscillating, and the highlighted points xn=1/(2πn) keep landing on the dashed line y=−1.Show proof
Set xn=1/(2πn); then xn=0 and xn→0.
Plugging into problem 2's formula, f′(xn)=2xnsin(1/xn)−cos(1/xn)=2xnsin(2πn)−cos(2πn).
Since sin(2πn)=0 and cos(2πn)=1, we get f′(xn)=0−1=−1 — constant for every n.
Hence f′(xn)→−1, but f′(0)=0 by problem 1, so f′(xn)→f′(0) even though xn→0. By the sequential criterion, f′ is not continuous at 0 — limx→0f′(x) does not even exist (the never-ending oscillation in the right panel).
Remark: a discontinuous derivative still has the intermediate value property — by Darboux's theorem, f′ satisfies the IVP on intervals. Differentiability is strictly weaker than continuity of the derivative.