Skip to main content

Section 5.2 Differentiability Classes

Continuity and differentiability come in layers. A function may be differentiable without having a continuous derivative, and a function may have many derivatives without having one more. This leads to the standard hierarchy of classes \(C^n\) and \(D^n\text{.}\)

Subsection 5.2.1

Let \(I \subseteq \R\) be an open interval. For \(n \in \N\text{,}\) let \(D^n(I)\) be the set of functions \(f \colon I \to \R\) that are \(n\) times differentiable on \(I\text{,}\) and let \(C^n(I)\) be the set of functions whose \(n\)-th derivative exists and is continuous on \(I\text{.}\) We also set \(C^0(I)\) equal to the set of continuous functions on \(I\text{.}\)

Proof.

The inclusion \(D^1(I) \subseteq C^0(I)\) is just the fact that differentiability implies continuity (Proposition 5.1.5). More generally, if \(f \in D^{n+1}(I)\text{,}\) then \(f^{(n)}\) is differentiable on \(I\text{,}\) hence continuous. Therefore \(f \in C^n(I)\text{,}\) so
\begin{equation*} D^{n+1}(I) \subseteq C^n(I) \end{equation*}
for every \(n \ge 0\text{.}\)
On the other hand, if \(f \in C^n(I)\text{,}\) then by definition \(f^{(n)}\) exists, so certainly \(f \in D^n(I)\text{.}\) Thus
\begin{equation*} C^n(I) \subseteq D^n(I) \end{equation*}
for every \(n \ge 1\text{.}\) Chaining these inclusions gives the stated hierarchy.
Since \(D^{n+1}(I) \subseteq C^n(I) \subseteq D^n(I)\) for each \(n \ge 1\text{,}\) a function belongs to every \(C^n(I)\) if and only if it belongs to every \(D^n(I)\text{.}\) This proves the identity for \(C^\infty(I)\text{.}\)
The inclusions in Proposition 5.2.1 are all strict. The first strict inclusion already appears in Example 5.1.13: there exists a differentiable function whose derivative is not continuous at \(0\text{.}\) The next two examples show that this phenomenon persists at every order.

Example 5.2.2.

For each \(n \ge 1\text{,}\) define
\begin{equation*} f_n(x)=\begin{cases} x^n & \text{if } x \ge 0,\\ -x^n & \text{if } x \lt 0. \end{cases} \end{equation*}
Then
\begin{equation*} f_n \in C^{n-1}(\R) \setminus D^n(\R). \end{equation*}
Solution.
For \(0 \le k \le n-1\) and \(x \ne 0\text{,}\) repeated differentiation gives
\begin{equation*} f_n^{(k)}(x)=\begin{cases} \dfrac{n!}{(n-k)!}x^{n-k} & \text{if } x \gt 0,\\ -\dfrac{n!}{(n-k)!}x^{n-k} & \text{if } x \lt 0. \end{cases} \end{equation*}
Since \(n-k \ge 1\text{,}\) both one-sided limits at \(0\) are equal to \(0\text{.}\) So each derivative up to order \(n-1\) extends continuously across \(0\text{.}\) Hence \(f_n \in C^{n-1}(\R)\text{.}\)
For \(x \ne 0\text{,}\) the \(n\)-th derivative is
\begin{equation*} f_n^{(n)}(x)=\begin{cases} n! & \text{if } x \gt 0,\\ -n! & \text{if } x \lt 0. \end{cases} \end{equation*}
The left and right limits at \(0\) are different, so \(f_n^{(n)}(0)\) does not exist. Therefore \(f_n \notin D^n(\R)\text{.}\)

Example 5.2.3.

For each \(n \ge 1\text{,}\) define
\begin{equation*} g_n(x)=\begin{cases} x^{2n}\sin(1/x) & \text{if } x \ne 0,\\ 0 & \text{if } x=0. \end{cases} \end{equation*}
Then
\begin{equation*} g_n \in D^n(\R) \setminus C^n(\R). \end{equation*}
Solution.
We claim that, for each \(k=0,1,\dots,n\text{,}\) the derivative \(g_n^{(k)}(x)\) for \(x \ne 0\) is a finite linear combination of terms of the form
\begin{equation*} x^m \sin(1/x) \qquad \text{and} \qquad x^m \cos(1/x), \end{equation*}
where \(m \ge 2n-2k\text{.}\) This is true for \(k=0\text{.}\) If it holds for some \(k\text{,}\) then differentiating one such term either lowers the power of \(x\) by \(1\) or by \(2\text{,}\) so after one more differentiation all exponents are still at least \(2n-2(k+1)\text{.}\) Thus the claim follows by induction.
In particular, if \(k \le n-1\text{,}\) then every exponent that occurs is at least \(2\text{.}\) Hence \(g_n^{(k)}(x) \to 0\) as \(x \to 0\text{.}\) Therefore \(g_n^{(k)}(0)=0\text{,}\) and
\begin{equation*} \frac{g_n^{(k)}(h)-g_n^{(k)}(0)}{h} = \frac{g_n^{(k)}(h)}{h} \to 0 \qquad \text{as } h \to 0, \end{equation*}
because every term in \(g_n^{(k)}(h)/h\) still has a positive power of \(h\text{.}\) Thus \(g_n^{(k+1)}(0)\) exists and equals \(0\text{.}\) By induction, \(g_n \in D^n(\R)\text{.}\)
After differentiating exactly \(n\) times, there is a term with power \(x^0\text{:}\) it comes from differentiating the trigonometric factor in every step. So \(g_n^{(n)}(x)\) has the form
\begin{equation*} g_n^{(n)}(x)=A(x)+B(x)\sin(1/x)+C(x)\cos(1/x) \end{equation*}
for \(x \ne 0\text{,}\) where \(A,B,C\) are finite linear combinations of powers of \(x\) and at least one of \(B(0)\) or \(C(0)\) is nonzero. Consequently, \(g_n^{(n)}(x)\) oscillates as \(x \to 0\) and is not continuous at \(0\text{.}\) Hence \(g_n \notin C^n(\R)\text{.}\)
Later, in Section 6.3, we will meet analytic functions. Every analytic function belongs to \(C^\infty\text{,}\) but the example above shows that belonging to \(C^\infty\) is still not enough to force a function to agree with a power series.