Differentiability Does Not Guarantee a Continuous Derivative
Differentiability is a local condition on the function: it asks whether difference quotients based at a point have a limit. It does not require the derivatives at nearby points to approach the derivative at that point. The examples in Derivative-Based Counterexamples already show that derivative values near a point can behave very differently from the derivative there. We now make the resulting failure of continuity explicit.
For a function \(f\) differentiable on an open interval containing \(a\), the derivative \(f'\) is itself a function on that interval. Its continuity at \(a\) is a separate question.
There are two especially instructive ways continuity can fail. Nearby derivative values may oscillate between distinct limits along different sequences, or their magnitudes may grow without bound. We will verify both possibilities directly. The first is a useful model because the derivative stays bounded but has no limit.
A Bounded Derivative Can Oscillate Without a Limit
The following result gives a family of functions with a derivative that oscillates near the origin. Taking the exponent parameter to be \(2\) will provide our first example.
Proof. For \(h\ne0\), the difference quotient at the origin is
Its absolute value is at most \(|h|^q\), which tends to zero as \(h\to0\). Thus \(f'(0)=0\). For \(x\ne0\), the product and chain rules give
To test continuity at zero, consider the positive sequences
Both sequences tend to zero. Since \(1/x_n^q=2\pi n\), substitution into the derivative formula gives
For the other sequence, \(1/y_n^q=(2n+1)\pi\), so
If \(f'\) were continuous at zero, both sequences of derivative values would tend to \(f'(0)=0\). Instead, one is constantly \(-q\), and the other is constantly \(q\). Since \(q>0\), these values differ, so \(f'\) is not continuous at zero. \(\square\)
Worked Example: A Bounded Oscillating Derivative
Take \(q=2\) in the theorem, so \(f(0)=0\) and \(f(x)=x^3\sin(1/x^2)\) when \(x\ne0\). The difference quotient at zero is
It tends to zero, so \(f'(0)=0\). At nonzero \(x\),
Choose \(x_n=(2\pi n)^{-1/2}\) and \(y_n=((2n+1)\pi)^{-1/2}\). For the first sequence, the sine term is zero and the cosine term is \(1\), giving \(f'(x_n)=-2\). For the second, the sine term is zero and the cosine term is \(-1\), giving \(f'(y_n)=2\). Both sequences approach zero, but the derivative values have different limits. Thus \(f'\) is discontinuous at zero, even though \(f'(0)=0\).
This example also shows that unboundedness is not necessary for discontinuity. For \(x\ne0\), the formula implies
In particular, the derivative values remain bounded for \(x\) sufficiently close to zero. Their failure to settle to a single value comes from oscillation, not growth in magnitude.
Nearby Derivative Values Can Also Become Unbounded
A different choice of powers makes the oscillating term in the derivative grow in magnitude. This gives another way for continuity to fail: a continuous function at a point must have nearby values close to its value there, whereas an unbounded derivative cannot satisfy that condition.
Worked Example: An Unbounded Derivative Near the Origin
Define \(g(0)=0\) and \(g(x)=x^2\sin(1/x^3)\) for \(x\ne0\). At zero,
Therefore \(g'(0)=0\). At nonzero \(x\), differentiation gives
Set \(x_n=(2\pi n)^{-1/3}\), so \(x_n\to0\) and \(1/x_n^3=2\pi n\). The sine term vanishes and the cosine term equals \(1\). Hence
These values tend to \(-\infty\). Thus \(g'\) is unbounded in every neighborhood of zero, so it cannot be continuous there. Notice that the difference quotient at zero and the derivative values at the \(x_n\) answer different questions: the former establishes \(g'(0)\), while the latter describes derivatives at nonzero inputs.
A Finite Limit of Nearby Derivatives Must Match
When nearby derivative values do have a finite limit, the Mean Value Theorem forces that limit to equal the derivative at the point. This fact is useful when checking a proposed continuity claim: there cannot be a finite punctured limit different from \(f'(a)\).
Proof. For any \(x\ne a\) sufficiently close to \(a\), \(f\) is continuous on the closed interval with endpoints \(a\) and \(x\), and differentiable in its interior. The Mean Value Theorem therefore gives a point \(c_x\) strictly between \(a\) and \(x\) such that
As \(x\to a\), the point \(c_x\), lying between \(a\) and \(x\), also tends to \(a\). Since \(c_x\ne a\), the assumed limit of \(f'\) implies \(f'(c_x)\to L\). Consequently,
The first equality is the definition of \(f'(a)\), which exists by hypothesis. This proves the result. \(\square\)
The theorem does not say that every derivative has a limit at each point. It says that if a finite limit of nearby derivative values exists, its value is already determined. In the oscillating example, the two sequences show that no such limit exists. In the unbounded example, the displayed sequence rules out a finite limit as well.
Worked Example: Adding a Linear Term
Let \(H(x)=x+f(x)\), where \(f\) is the function from the bounded oscillation example. Since \(f'(0)=0\), direct use of the difference quotient gives
For \(x\ne0\), the derivative is
Along \(x_n=(2\pi n)^{-1/2}\), this gives \(H'(x_n)=1-2=-1\). Along \(y_n=((2n+1)\pi)^{-1/2}\), it gives \(H'(y_n)=1+2=3\). Neither sequence of values tends to \(H'(0)=1\), and they also disagree with each other. Thus the derivative can be discontinuous even when its value at the point is nonzero.
The added linear term changes the derivative at zero from \(0\) to \(1\), and shifts both oscillating sequences of values by \(1\). It does not remove the discontinuity.
What These Examples Do—and Do Not—Show
The examples establish that a function can be differentiable everywhere while its derivative is discontinuous. They also distinguish three different situations: bounded oscillation, unbounded derivative values near a point, and oscillation around a nonzero derivative value. In each case, continuity is tested by comparing \(f'(x)\) with \(f'(a)\) as \(x\) approaches \(a\), rather than by looking only at whether \(f'(a)\) exists.
A common pitfall is to infer continuity of \(f'\) from differentiability of \(f\). Differentiability guarantees that the derivative exists, but it does not guarantee that nearby derivative values approach it. Another pitfall is to treat a formula for \(f'(x)\) at \(x\ne a\) as if it automatically applied at \(a\). The derivative at \(a\) must be established from its difference quotient, as in the examples above.
There is also an important restriction on how a derivative can be discontinuous. Darboux’s Theorem for Derivatives, which is studied in the next two tutorials, says that derivatives have the intermediate value property. In particular, a derivative cannot have a simple jump discontinuity: if it takes values on opposite sides of a number between two inputs, it must take that intermediate value somewhere between them. The oscillation in our examples is consistent with this property; the derivative moves through intermediate values rather than jumping over them. The next tutorial examines this feature in detail.
Use the difference quotient at the point where continuity is being tested.
Obtain a formula for nearby derivative values, without assuming that the formula extends to the point.
Two sequences with different limiting derivative values disprove continuity; a sequence with unbounded derivative values does so as well.
Check Your Understanding
Use the definitions and arguments in this tutorial to assess each question.
- What two facts must be compared to determine whether \(f'\) is continuous at \(a\)?
- For \(f(x)=x^3\sin(1/x^2)\), what are the values of \(f'(x_n)\) and \(f'(y_n)\) for the sequences used in the worked example?
- Why does the sequence \(x_n=(2\pi n)^{-1/3}\) show that the derivative of \(g(x)=x^2\sin(1/x^3)\) is unbounded near zero?
- What does the Mean Value Theorem imply if \(f'(x)\) has a finite limit as \(x\to a\), with \(x\ne a\)?
- Why do the examples of oscillating derivatives not contradict Darboux’s Theorem for Derivatives?