Derivatives in one dimension

Derivatives

Definition 1. Let $U \subseteq \R$ be open, $a \in U$, and $f\colon U \to \R$ be a function. We say $f$ is differentiable at $a$ if \begin{equation} \lim_{x \to a} \frac{f(x) - f(a)}{x - a} \quad\text{exists.} \end{equation} The value of the limit is called the derivative of $f$ at $a$, and denoted by $f’(a)$, $\dot f(a)$, $\frac{df}{dx}(a)$, $\partial_x f(a)$, $d_x f(a)$, $f_x(a)$ etc. (We will usually use $f’(a)$ or $\partial_x f(a)$.)

We say $f$ is differentiable on $U$ for every $a \in U$, $f$ is differentiable at $a$.

Proposition 2. If $f\colon U \to \R$ is differentiable at $a$, then $f$ is continuous at $a$.

Remark 3. The converse is false – a continuous function need not be differentiable.

Rules for differentiation

Proposition 4 (Product rule). If $f, g\colon U \to \R$ are differentiable at $a \in U$, then $f g$ is differentiable at $a$, and $(fg)’(a) = f(a) g’(a) + f’(a) g(a)$.

Proposition 5 (Quotient rule). If $f, g\colon U \to \R$ are differentiable at $a \in U$, and $g(a) \neq 0$, then that $f/g$ is differentiable at $a$, and \begin{equation} \paren[\Big]{\frac{f}{g}}’(a) = \frac{g(a)f’(a) - f(a) g’(a)}{g(a)^2} \,. \end{equation}

Proposition 6 (Chain rule). If $f, g\colon \R \to \R$ are such that $f$ is differentiable at $g(a)$ and $g$ is differentiable at $a$, then prove $f \circ g$ is differentiable at $a$ and $(f \circ g)’(a) = f’(g(a)) g’(a)$.

Higher order derivatives

Proposition 7. If $f\colon U \to \R$ is differentiable, then $f’$ need not be continuous (let alone differentiable).

Proof sketch. Let $f(x) = x^2 \sin(1/x)$ for $x \neq 0$, and $f(0) = 0$.

Definition 8. Let $f^{(1)} = f’$, and $n \in \N$. We say $f$ is $n$-times differentiable if $f^{(n-1)}$ is differentiable, and we define $f^{(n)} = (f^{(n-1)})’$. Here $f^{(n)}$ is called the $n$-th derivative of $f$.

Problem 9. For any $n \in \N$, find a function $f\colon U \to \R$ such that $f$ is $n$-times differentiable, but $f^{(n)}$ is not continuous.

Hint. You wasted a click.

Problem 10. Suppose $f$ and $g$ are $n$ times differentiable at $a$. Show that $fg$ is also $n$ times differentiable at $a$, and find a formula for $(fg)^{(n)}(a)$ in terms of derivatives of $f$ and $g$.

Problem 11. Let $n \in \N$. Suppose $f$ is $n$ times differentiable at $g(a)$ and $g$ is $n$ times differentiable at $a$. Show that $f \circ g$ is $n$ times differentiable at $a$.

Hint. I don’t recommend trying to find a formula for $(f \circ g)^{(n)}$.

Mean value theorems

Theorem 12 (Lagrange Mean Value Theorem). Suppose $f \colon [a, b] \to \R$ is a function which is continuous on $[a, b]$, and differentiable on $(a, b)$. There exists $\xi \in (a, b)$ such that \begin{equation} f’(\xi) = \frac{f(b) - f(a)}{b - a} \end{equation}

Theorem 13 (Cauchy Mean Value Theorem). Suppose $f, g \colon [a, b] \to \R$ are two functions which are continuous on $[a, b]$, and differentiable on $(a, b)$. There exists $\xi \in (a, b)$ such that \begin{equation} f’(\xi) (g(b) - g(a)) = g’(\xi) (f(b) - f(a)) \end{equation}

Lemma 14. If $U \subseteq \R$ is open, $f \colon U \to \R$ is differentiable, and $f$ attains a local extremum at $a \in U$, then $f’(a) = 0$.

Proof sketch of Theorem 13. Define \begin{equation} h(x) = (g(b) - g(a))( f(x) - f(a)) - (f(b) - f(a))( g(x) - g(a)) \end{equation} and use the extreme value theorem.

Monotonicity

Proposition 15. Let $I \subseteq \R$ be an interval, and $f \colon I \to \R$ be differentiable on $\mathring I$. If $f’$ is identically $0$, then $f$ is a constant.

Proposition 16. Let $I \subseteq \R$ be an interval. A differentiable function $f \colon I \to \R$ is increasing if and only if $f’ \geq 0$.

Proposition 17. Let $I \subseteq \R$ be an interval. If $f \colon I \to \R$ is differentiable and $f’ > 0$, then $f$ is strictly increasing.

Remark 18. If $f$ is differentiable and strictly increasing, you can only conclude $f’ \geq 0$ (for instance $f(x) = x^3$.

Remark 19. Similar results are true for decreasing functions with the inequalities on $f’$ reversed.

Convexity

Definition 20. Let $I \subseteq \R$ be an interval. We say a function $f \colon I \to \R$ is convex if for every $x, y \in I$, $\theta \in [0, 1]$ we have $f(\theta x + (1 - \theta) y) \leq \theta f(x) + (1 - \theta) f(y)$.

Proposition 21. A differentiable function $f$ is convex if and only if $f’$ is increasing.

Proof sketch. First show that a function is convex if and only if for every $x < y < z \in I$ we have \begin{equation} \frac{f(y) - f(x)}{y - x} \leq \frac{f(z) - f(x)}{z - x} \leq \frac{f(z) - f(y)}{z - y} \,. \end{equation}

Problem 22. If $f$ is convex on $I$ and differentiable at $a \in I$ show that $f(x) \geq f(a) + f’(a)(x - a)$. (That is convex functions lie above their tangent.)

Problem 23. Let $f \colon I \to \R$ be convex. Show that one of the following holds:

  1. $f$ is monotone on $I$.
  2. There exists $x_* \in I$ such that $f$ is decreasing on $(-\infty, x_*) \cap I$ and increasing on $(x_*, \infty) \cap I$.

Update (2026-02-16) Changed $(-\infty, x_*] \cap I$ to $(-\infty, x_*) \cap I$, and $[x_*, \infty) \cap I$ to $(x_*, \infty) \cap I$ to avoid a degenerate edge case.

Theorem 24 (Jensen’s inequality). Say $f \colon I \to \R$ is convex, and $c_1$, …, $c_n \in [0, 1]$ are such that $\sum_1^n c_n = 1$. For any $x_1$, …, $x_n \in I$ show that \begin{equation} f\paren[\Big]{ \sum_1^n c_i x_i } \leq \sum_1^n c_i f(x_i) \,. \end{equation}

Problem 25 (Young’s inequality). If $p, q > 1$ are such that $1/p + 1/q = 1$, and $x, y \in \R$ show that $xy \leq \abs{x}^p / p + \abs{y}^q / q$.

Theorem 26 (Inequality of the means). If $x_1$, …, $x_n \geq 0$ then \begin{equation} \frac{1}{n} \sum_{i = 1}^n x_i \geq \paren[\Big]{ \prod_{i=1}^n x_i }^{1/n} \end{equation}

Proof sketch. Use the fact that the natural logarithm is concave, and Jensen’s inequality

L’Hôpital’s rule

Theorem 27 (L’Hôpital’s rule). Let $I \subseteq \R$ be an open interval, $a \in I$, and let $I^* = I - \set{a}$. Suppose $f, g$ are two differentiable functions on $I^*$ such that \begin{equation}\label{e:0by0}\tag{Z} \lim_{x \to a} f(x) = \lim_{x \to a} g(x) = 0\,. \end{equation} If $\lim_{x \to a} f’(x) / g’(x)$ exists then $\lim_{x \to a} f(x) / g(x)$ exists and equals $\lim_{x \to a} f’(x) / g’(x)$.

Problem 28. Show that L’Hôpital’s rule is still true if we instead of \eqref{e:0by0} we assume \begin{equation} \lim_{x \to a} f(x) = \lim_{x \to a} g(x) = \infty\,. \end{equation}

Regularity of derivatives

We’ve seen before that if $f$ is differentiable, then $f’$ need not be continuous. Even though $f’$ is not continuous, it is not “too nasty”, as the next two results show.

Proposition 29. Let $f$ be a differentiable function. If $\lim_{x \to a} f’(x)$ exists, then it must equal $f’(a)$.

Theorem 30 (Intermediate value theorem for derivatives). Let $f \colon [a, b] \to \R$ be differentiable on $[a, b]$. If $\alpha$ lies between $f’(a)$ and $f’(b)$ then there exists $\xi \in [a, b]$ such that $f’(\xi) = \alpha$.

Proof sketch. Remember, $f’$ is not continuous, so you can’t use the intermediate value theorem. For the proof, suppose first $f’(a) < 0 < f’(b)$. Show that $f$ attains an interior minimum, and hence produce $\xi \in (a, b)$ such that $f’(\xi) = 0$. Now reduce the case for general $\alpha$ to this case.

Taylor’s theorem

If $f \colon \R \to \R$ is differentiable at $a$, then we know that $f(x) \approx f(a) + (x-a) f’(a)$. In this sense, the function $f(a) + (x-a) f’(a)$ is a first order approximation of $f$. Higher order approximations of $f$ can be found, provided the higher order derivatives of $f$ exist.

Suppose $f$ is $n$-times differentiable at $a \in \R$. Define $P_{n,f}$, the $n^\text{th}$ Taylor polynomial of $f$ at $a$ by \begin{equation} P_{n,f}(x) = \sum_{k=0}^n \frac{f^{(k)}(a)}{k!} (x-a)^k\,. \end{equation}

Problem 31 (Taylor’s theorem). Suppose $f$ is $n$ times differentiable at $a$. Show that $\lim_{x \to a} \frac{f(x) - P_{n,f}(x)}{(x - a)^n} = 0$.

Hint. Show that $P_{n,f}’(x) = P_{n-1,f’}(x)$, and use L’Hôpital’s rule.

The above says that $f(x) - P_{n,f}(x)$ is of smaller order than $(x-a)^n$. We’d expect it to be of order $(x-a)^{n+1}$. This is indeed the case, under a stronger assumption.

Theorem 32 (Taylor’s theorem). Suppose $f$ is $n$ times differentiable at $a$, and $f^{(n)}$ is continuous at $a$. Further, suppose there exists $r > 0$ such that $f^{(n)}$ is differentiable on $B^*(a, r) - \{a\}$. For all $x \in B^*(a,r)$, there exists $\xi$ between $x$ and $a$ such that \begin{equation} f(x) = P_{n,f}(x) + \frac{f^{(n+1)}(\xi)}{(n+1)!} (x - a)^{n+1}\,. \end{equation}

Proof sketch. Apply the Cauchy Mean Value Theorem Cauchy mean value theorem repeatedly to $\frac{f(x) - P_{n,f}(x)}{(x-a)^{n+1}}$.

Taylor’s theorem can be used to prove the “derivative tests” for extrema.

Theorem 33. Let $n \geq 1$, and suppose $f$ is $n$-times differentiable at $a$. Suppose $f^{(1)}(a)$, $f^{(2)}(a)$, …, $f^{(n-1)}(a) = 0$.

  1. If $n$ is even and $f^{(n)}(a) > 0$, then $f$ attains a local minimum at $a$.
  2. If $n$ is even and $f^{(n)}(a) < 0$, then $f$ attains a local maximum at $a$.
  3. If $n$ is odd, and $f^{(n)}(a) \neq 0$, then $f$ does not attain a local extremum at $a$.

Remark 34. Above when we say $f$ is $n$-times differentiable at $a$, we implicitly assume there exists $r > 0$ such that $f$ is defined on $B(a, r)$, and each of the functions $f$, $f^{(1)}$, …, $f^{(n-1)}$ are all defined on $B(a, r)$, and $f^{(n-1)}$ is differentiable at $a$. The $n$-th derivative $f^{(n)}$ may not exist points other than $a$.