Skip to main content

Section 5.1 Derivative

Continuity says that nearby inputs produce nearby outputs. The derivative asks for something more precise: whether, near a point, the change in \(f(x)\) is approximately proportional to the change in \(x\text{.}\) This leads to the slope of the tangent line and, more importantly for analysis, to a first-order approximation of the function.

Subsection 5.1.1 Derivative at a Point

Let \(S \subseteq \R\text{,}\) let \(f \colon S \to \R\text{,}\) and let \(c \in S\) be a cluster point of \(S\text{.}\) We say that \(f\) is differentiable at\(c\) if the limit
\begin{equation*} \lim_{x\to c}\frac{f(x)-f(c)}{x-c} \end{equation*}
exists. In that case, this limit is called the derivative of \(f\) at \(c\) and is denoted by
\begin{equation*} f'(c)=\lim_{x\to c}\frac{f(x)-f(c)}{x-c}. \end{equation*}
If \(S\) is an interval and \(c\) is an endpoint of \(S\text{,}\) then the same definition is understood one-sidedly, using only points of \(S\) near \(c\text{.}\) Thus, on \([a,b]\text{,}\) differentiability at \(a\) means the existence of the right-hand limit
\begin{equation*} \lim_{x\to a^+}\frac{f(x)-f(a)}{x-a}, \end{equation*}
and differentiability at \(b\) means the existence of the left-hand limit
\begin{equation*} \lim_{x\to b^-}\frac{f(x)-f(b)}{x-b}. \end{equation*}
We say that \(f\) is differentiable on an interval if it is differentiable at each point of the interval, with this endpoint convention when needed.

Example 5.1.1.

The function \(f(x)=x^2\) is differentiable on \(\R\text{,}\) and \(f'(c)=2c\) for every \(c \in \R\text{.}\) Indeed,
\begin{equation*} \frac{x^2-c^2}{x-c}=x+c \to 2c \quad\text{as } x\to c. \end{equation*}

Example 5.1.2.

The function \(f(x)=|x|\) is not differentiable at \(0\text{.}\) For \(x \gt 0\text{,}\) \((|x|-|0|)/(x-0)=1\text{,}\) while for \(x \lt 0\text{,}\) \((|x|-|0|)/(x-0)=-1\text{.}\) Since the left and right limits are different, the derivative at \(0\) does not exist.
The graph of y equals absolute value of x has a V-shape with vertex at the origin.
Figure 5.1.3. The graph of \(|x|\) has a corner at \(0\text{,}\) so there is no single tangent slope there.

Subsection 5.1.2 Carathéodory’s Criterion

The derivative is defined as a limit of quotients, but there is another viewpoint that is often more flexible: differentiability at \(c\) means that \(f(x)-f(c)\) factors as \(x-c\) times a function that is continuous at \(c\text{.}\)

Proof.

First suppose that \(f\) is differentiable at \(c\text{.}\) Define
\begin{equation*} \varphi(x)=\begin{cases} \dfrac{f(x)-f(c)}{x-c} & \text{if } x \neq c,\\ f'(c) & \text{if } x=c. \end{cases} \end{equation*}
Then \(f(x)-f(c)=\varphi(x)(x-c)\) for every \(x \in S\text{.}\) Also, for \(x \neq c\) the definition of derivative gives
\begin{equation*} \varphi(x)=\frac{f(x)-f(c)}{x-c} \to f'(c)=\varphi(c) \quad\text{as } x\to c, \end{equation*}
so \(\varphi\) is continuous at \(c\text{.}\)
Conversely, suppose there exists \(\varphi \colon S \to \R\text{,}\) continuous at \(c\text{,}\) such that \(f(x)-f(c)=\varphi(x)(x-c)\) for every \(x \in S\text{.}\) Then for \(x \neq c\) we have
\begin{equation*} \frac{f(x)-f(c)}{x-c}=\varphi(x). \end{equation*}
Since \(\varphi\) is continuous at \(c\text{,}\) it follows that
\begin{equation*} \lim_{x\to c}\frac{f(x)-f(c)}{x-c} = \lim_{x\to c}\varphi(x)=\varphi(c). \end{equation*}
Hence \(f\) is differentiable at \(c\) and \(f'(c)=\varphi(c)\text{.}\)
Since Carathéodory’s Criterion is equivalent to the classical limit definition of differentiability, we will use these two formulations interchangeably.

Proof.

By Proposition 5.1.4, there exists \(\varphi \colon S \to \R\text{,}\) continuous at \(c\text{,}\) such that
\begin{equation*} f(x)=f(c)+\varphi(x)(x-c). \end{equation*}
The function \(x \mapsto x-c\) is continuous, so \(x \mapsto \varphi(x)(x-c)\) is continuous at \(c\) by Proposition 4.3.2. Therefore \(f\) is continuous at \(c\text{.}\)

Subsection 5.1.3 Rules of Differentiation

Carathéodory’s criterion is especially effective for proving the differentiation rules. The point is that differentiability has been converted into a factorization statement, and such factorizations are easy to combine.

Proof.

By Proposition 5.1.4, there exist functions \(\varphi_f,\varphi_g \colon S \to \R\text{,}\) both continuous at \(c\text{,}\) such that
\begin{equation*} f(x)-f(c)=\varphi_f(x)(x-c) \quad\text{and}\quad g(x)-g(c)=\varphi_g(x)(x-c). \end{equation*}
Also \(\varphi_f(c)=f'(c)\) and \(\varphi_g(c)=g'(c)\text{.}\)
Multiplying the first identity by \(\alpha\text{,}\) we get
\begin{equation*} (\alpha f)(x)-(\alpha f)(c)=\alpha\varphi_f(x)(x-c). \end{equation*}
Since \(\alpha\varphi_f\) is continuous at \(c\text{,}\) Proposition 5.1.4 shows that \(\alpha f\) is differentiable at \(c\) and \((\alpha f)'(c)=\alpha\varphi_f(c)=\alpha f'(c)\text{.}\)
Adding the two identities gives
\begin{equation*} (f+g)(x)-(f+g)(c) =(\varphi_f(x)+\varphi_g(x))(x-c). \end{equation*}
Since \(\varphi_f+\varphi_g\) is continuous at \(c\text{,}\) \(f+g\) is differentiable at \(c\text{,}\) and
\begin{equation*} (f+g)'(c)=\varphi_f(c)+\varphi_g(c)=f'(c)+g'(c). \end{equation*}
For the product,
\begin{equation*} \begin{aligned} (fg)(x)-(fg)(c) &= g(x)(f(x)-f(c)) + f(c)(g(x)-g(c)) \\ &= \bigl(g(x)\varphi_f(x)+f(c)\varphi_g(x)\bigr)(x-c). \end{aligned} \end{equation*}
By Proposition 5.1.5, \(g\) is continuous at \(c\text{.}\) Therefore \(x \mapsto g(x)\varphi_f(x)+f(c)\varphi_g(x)\) is continuous at \(c\text{.}\) Another application of Proposition 5.1.4 yields the product rule:
\begin{equation*} (fg)'(c) = g(c)\varphi_f(c)+f(c)\varphi_g(c) = f'(c)g(c)+f(c)g'(c). \end{equation*}

Proof.

By Proposition 5.1.4, there exist functions \(\varphi \colon S \to \R\) and \(\psi \colon T \to \R\) such that \(\varphi\) is continuous at \(c\text{,}\) \(\psi\) is continuous at \(f(c)\text{,}\) and
\begin{equation*} f(x)-f(c)=\varphi(x)(x-c) \end{equation*}
for \(x \in S\text{,}\) while
\begin{equation*} g(u)-g(f(c))=\psi(u)(u-f(c)) \end{equation*}
for \(u \in T\text{.}\) Also \(\varphi(c)=f'(c)\) and \(\psi(f(c))=g'(f(c))\text{.}\)
Substituting \(u=f(x)\) into the second identity gives
\begin{equation*} \begin{aligned} (g \circ f)(x)-(g \circ f)(c) &= \psi(f(x))(f(x)-f(c)) \\ &= \psi(f(x))\varphi(x)(x-c). \end{aligned} \end{equation*}
By Proposition 4.3.3, \(\psi \circ f\) is continuous at \(c\text{,}\) and hence so is \((\psi \circ f)\varphi\text{.}\) Therefore Proposition 5.1.4 shows that \(g \circ f\) is differentiable at \(c\text{,}\) with
\begin{equation*} (g \circ f)'(c) = \psi(f(c))\varphi(c)=g'(f(c))f'(c). \end{equation*}

Example 5.1.8.

The hypotheses in the sum, product, and chain rules are sufficient, but not necessary. For example:
  • Neither \(f(x)=|x|\) nor \(g(x)=-|x|\) is differentiable at \(0\text{,}\) but \(f+g=0\) is differentiable at \(0\text{.}\)
  • The function \(g(x)=|x|\) is not differentiable at \(0\text{,}\) but \(xg(x)=x|x|\) is differentiable at \(0\text{.}\)
  • The function \(f(x)=|x|\) is not differentiable at \(0\text{,}\) but if \(h(x)=x^2\text{,}\) then \((h \circ f)(x)=|x|^2=x^2\) is differentiable at \(0\text{.}\)

Subsection 5.1.4 Derivatives of Inverse Functions

Suppose \(f\) has an inverse function \(f^{-1}\text{.}\) Since \(f^{-1}(f(x))=x\text{,}\) the chain rule suggests that the derivative of the inverse should be the reciprocal of the derivative of \(f\text{.}\) The next proposition makes this precise.

Proof.

Let \(g=f^{-1}\text{.}\) By Proposition 4.4.14, the inverse \(g\) is continuous on \(J\text{.}\) By Proposition 5.1.4, there exists a function \(\varphi \colon I \to \R\text{,}\) continuous at \(x_0\text{,}\) such that
\begin{equation*} f(x)-f(x_0)=\varphi(x)(x-x_0) \qquad \text{for every } x \in I, \end{equation*}
and \(\varphi(x_0)=f'(x_0)\text{.}\)
Now let \(y \in J\text{.}\) Since \(y=f(g(y))\) and \(y_0=f(x_0)=f(g(y_0))\text{,}\) substituting \(x=g(y)\) gives
\begin{equation*} y-y_0=\varphi(g(y))(g(y)-g(y_0)). \end{equation*}
Because \(g\) is continuous at \(y_0\) and \(\varphi\) is continuous at \(x_0=g(y_0)\text{,}\) the function \(y \mapsto \varphi(g(y))\) is continuous at \(y_0\text{.}\) Also, \(\varphi(g(y_0))=\varphi(x_0)=f'(x_0)\neq 0\text{,}\) so \(\psi(y)=1/\varphi(g(y))\) is defined and continuous at \(y_0\text{.}\) Therefore
\begin{equation*} g(y)-g(y_0)=\psi(y)(y-y_0). \end{equation*}
Another application of Proposition 5.1.4 shows that \(g\) is differentiable at \(y_0\) and that
\begin{equation*} g'(y_0)=\psi(y_0)=\frac{1}{\varphi(g(y_0))} =\frac{1}{\varphi(x_0)}=\frac{1}{f'(x_0)}. \end{equation*}
If \(f\) is differentiable on \(I\) and \(f'\) never vanishes there, then the same argument applies at each point \(x_0 \in I\text{.}\) Hence \(g\) is differentiable on \(J\) and satisfies \(g'(y)=1/f'(g(y))\) for every \(y \in J\text{.}\) If \(f'\) is continuous on \(I\text{,}\) then \(g\) is continuous on \(J\text{,}\) so \(f' \circ g\) is continuous on \(J\) by Proposition 4.3.3. Since \(f'(g(y))\neq 0\) for every \(y \in J\text{,}\) \(g'(y)=1/f'(g(y))\) is continuous on \(J\text{.}\)
The proposition explains how to differentiate an inverse once we know that the inverse exists and is continuous. To guarantee this locally, it is enough to assume that the derivative is continuous near the point and does not vanish there.

Proof.

Since \(f'\) is continuous at \(x_0\) and \(f'(x_0)\neq 0\text{,}\) there exists an open interval \(I \subseteq (a,b)\) containing \(x_0\) such that either \(f'(x)\gt 0\) for every \(x \in I\) or \(f'(x)\lt 0\) for every \(x \in I\text{.}\) By Proposition 5.4.2, the restriction \(f|_I\) is strictly monotone, hence injective.
Because \(f|_I\) is continuous and \(I\) is an interval, \(J=f(I)\) is also an interval. Now apply Proposition 5.1.9 to the restriction \(f|_I \colon I \to J\text{.}\) Since \(f'\) is continuous on \(I\) and never vanishes on \(I\text{,}\) the inverse \(g \colon J \to I\) is continuously differentiable and satisfies \(g'(y)=1/f'(g(y))\) for all \(y \in J\text{.}\)

Example 5.1.11.

The inverse function theorem is a local result. Let \(f(x)=x^2\) on \((-2,2)\text{,}\) and take \(x_0=1\text{.}\) Then \(f'(1)=2\neq 0\text{,}\) so the theorem applies near \(1\text{.}\) For example, on \(I=(0,2)\) the function is injective, and its inverse is \(g(y)=\sqrt{y}\text{.}\) But \(f\) is not injective on all of \((-2,2)\text{,}\) since \(f(1)=f(-1)\text{.}\) Thus the interval \(I\) in the theorem may have to be smaller than the original domain.

Example 5.1.12.

The condition \(f'(x_0)\neq 0\) cannot be omitted. The function \(f(x)=x^3\) is a continuous bijection from \(\R\) onto \(\R\text{,}\) and it is differentiable everywhere. Its inverse is \(g(y)=\sqrt[3]{y}\text{.}\) However, \(f'(0)=0\text{,}\) and \(g\) is not differentiable at \(0\text{,}\) because
\begin{equation*} \frac{g(y)-g(0)}{y-0}=\frac{\sqrt[3]{y}}{y} =\frac{1}{y^{2/3}} \end{equation*}
for \(y\neq 0\text{,}\) and this does not approach a finite limit as \(y \to 0\text{.}\)

Example 5.1.13.

The continuity of \(f'\) near \(x_0\) is also important for the local existence of an inverse. Define
\begin{equation*} f(x)=\begin{cases} x+x^2\sin(1/x) & \text{if } x\neq 0,\\ 0 & \text{if } x=0. \end{cases} \end{equation*}
Then \(f\) is differentiable at \(0\) and \(f'(0)=1\text{.}\) For \(x\neq 0\text{,}\)
\begin{equation*} f'(x)=1+2x\sin(1/x)-\cos(1/x). \end{equation*}
This derivative is not continuous at \(0\text{.}\)
In fact, \(f\) is not injective on any neighborhood of \(0\text{.}\) For \(n \in \N\text{,}\) let
\begin{equation*} a_n=\frac{1}{2\pi n+\frac{1}{2n}} \qquad \text{and} \qquad b_n=\frac{1}{2\pi n-\frac{1}{2n}}. \end{equation*}
Then \(0 \lt a_n \lt b_n\) and \(a_n,b_n \to 0\text{.}\) A Taylor expansion of \(\sin t\) and \(\cos t\) at \(t=0\) shows that, for all sufficiently large \(n\text{,}\)
\begin{equation*} f'(a_n) \gt 0 \qquad \text{and} \qquad f'(b_n) \lt 0. \end{equation*}
Since \(f'\) is continuous on the closed interval \([a_n,b_n]\text{,}\) the function \(f\) attains its maximum on that interval at some interior point. Therefore \(f\) takes some value twice on \([a_n,b_n]\text{.}\) As these intervals shrink to \(0\text{,}\) no neighborhood of \(0\) can be one-to-one.