Lipschitz continuous vs. continuously differentiable
Lipschitz continuity and continuous differentiability both rule out functions that are too steep or too wild, but in different ways. A Lipschitz continuous function has a bounded slope but may have corners. A continuously differentiable function has no corners, but its slope may be unbounded on an unbounded domain.
On a compact interval $[a, b]$:
continuously differentiable ⊂ Lipschitz continuous
Definitions
Consider a function $f$ and the lines through pairs of points on its graph. The function $f$ is Lipschitz continuous if there is a number $L$ such that every one of those lines has a slope between $-L$ and $L$.
Consider a function $f : X \to Y$ between metric spaces. The function $f$ is Lipschitz continuous if there exists $L \geq 0$ such that
\[d(f(x), f(y)) \leq L d(x, y) \quad \text{for all } x, y \in X.\]The smallest such $L$ is the Lipschitz constant of $f$.
Examples
-
$x \mapsto \abs{x}$ on $[-1, 1]$
$x \mapsto \abs{x}$ is Lipschitz continuous with constant $1$, because $\abs{\abs{x} - \abs{y}} \leq \abs{x - y}$.
-
$x \mapsto x^2$ on $[0, 1]$
$x \mapsto x^2$ on $[0, 1]$ is Lipschitz continuous because that derivative is at most $2$ on $[0, 1]$.
-
$f(x) = x^2 \sin(1/x)$ for $x \neq 0$, $f(0) = 0$, on $[-1, 1]$
The function $f(x) = x^2 \sin(1/x)$ is Lipschitz continuous on $[-1, 1]$ because it is differentiable everywhere with $\abs{f^{\prime}(x)} \leq 3$.
Non-examples
-
$f(x) = x^2$ on $\reals$
$x \mapsto x^2$ on $\reals$ is not Lipschitz continuous, because its slope $2x$ is unbounded on $\reals$.
-
The Cantor function on $[0, 1]$
The Cantor function is not Lipschitz continuous, because it rises by $2^{-n}$ over intervals of length $3^{-n}$, so its slopes are unbounded.
-
$x \mapsto \sin(1/x)$ on $(0, 1]$
$x \mapsto \sin(1/x)$ on $(0, 1]$ is not Lipschitz continuous, because the slopes between pairs of points on its graph are unbounded. With the points $x_n$ and $y_n$ from the uniform continuity explanation, the slope between $(x_n, 1)$ and $(y_n, -1)$ has absolute value \[\frac{2}{\abs{x_n - y_n}} = \frac{2 \left(\frac{\pi}{2} + 2 \pi n\right) \left(\frac{3\pi}{2} + 2 \pi n\right)}{\pi},\] which grows without bound as $n \to \infty$, so no Lipschitz constant $L$ works.
-
$x \mapsto \sqrt{x}$ on $[0, 1]$
$x \mapsto \sqrt{x}$ is not Lipschitz continuous, because its slope is unbounded near $0$.
Properties
- Every Lipschitz continuous function is uniformly continuous.
- A Lipschitz continuous function on an interval is absolutely continuous.
- A Lipschitz continuous function on $\reals^n$ is differentiable almost everywhere (Rademacher’s theorem).
- A differentiable function on an interval is Lipschitz continuous with constant $L$ if and only if $\abs{f^{\prime}(x)} \leq L$ for all $x$ (by the mean value theorem).
- If $f : \reals^n \to \reals^n$ is Lipschitz continuous, then for every initial condition $x_0 \in \reals^n$, the differential equation $\dot{x} = f(x)$ with $x(0) = x_0$ has exactly one solution, and the solution is defined for all $t \in \reals$ (the global Picard–Lindelöf theorem). If $f$ is only locally Lipschitz continuous, then the solution exists and is unique on some time interval around $0$, but the solution can blow up in finite time: the solution of $\dot{x} = x^2$ with $x(0) = 1$ is $x(t) = 1 / (1 - t)$, which blows up at $t = 1$.
A function $f$ is called continuously differentiable if the derivative $f^{\prime}$ exists at each point in the domain of $f$ and the derivative is itself a continuous function.
Consider a function $f : U \to \reals^m$ on an open set $U \subseteq \reals^n$. The function $f$ is continuously differentiable if every partial derivative of $f$ exists and is continuous on $U$.
Examples
-
$f(x) = x^2$ on $\reals$
$x \mapsto x^2$ on $\reals$ is continuously differentiable because its derivative $2x$ is continuous.
-
$x \mapsto \sin x$
$x \mapsto \sin x$ is continuously differentiable, because its derivative $\cos x$ is continuous.
-
$x \mapsto x \abs{x}$
$x \mapsto x \abs{x}$ is continuously differentiable, because its derivative $x \mapsto 2 \abs{x}$ is continuous.
-
$x \mapsto x^2$ on $[0, 1]$
$x \mapsto x^2$ on $[0, 1]$ is continuously differentiable because its derivative $2x$ is continuous.
-
$x \mapsto \sin(1/x)$ on $(0, 1]$
$x \mapsto \sin(1/x)$ is continuously differentiable, and so continuous, on $(0, 1]$.
Non-examples
-
$f(x) = \abs{x}$
$f(x) = \abs{x}$ is not continuously differentiable, because $f$ has no derivative at $0$, so the derivative is not a continuous function on all of $\reals$.
-
$x \mapsto \abs{x}$ on $[-1, 1]$
$x \mapsto \abs{x}$ is not continuously differentiable, because it is not differentiable at $0$.
-
$f(x) = x^2 \sin(1/x)$ for $x \neq 0$, $f(0) = 0$
$f(x) = x^2 \sin(1/x)$ for $x \neq 0$, $f(0) = 0$, is not continuously differentiable, because $f^{\prime}(x) = 2x \sin(1/x) - \cos(1/x)$ has no limit as $x \to 0$.
-
$f(x) = x^2 \sin(1/x)$ for $x \neq 0$, $f(0) = 0$, on $[-1, 1]$
The function $f$ is not continuously differentiable, because its derivative is not continuous at $0$. At $0$, we have $f^{\prime}(0) = 0$ because \[\lim_{h \to 0} \frac{f(h) - f(0)}{h} = \lim_{h \to 0} h \sin(1/h) = 0.\] Away from $0$, the product and chain rules give \[f^{\prime}(x) = 2x \sin(1/x) - \cos(1/x),\] The points $x_n = 1 / (2 \pi n)$ tend to $0$, but $f^{\prime}(x_n) = 0 - \cos(2 \pi n) = -1$ for every $n$, so $f^{\prime}(x_n)$ does not tend to $f^{\prime}(0) = 0$. That is, \[f^{\prime}(0) \neq \lim_{x \to 0} f^{\prime}(x),\] because the limit does not exist. The discontinuity of $f^{\prime}$ at $0$ is not a jump discontinuity, at which the limits from the left and from the right exist but differ. Instead, $f^{\prime}$ oscillates: as $x \to 0$, the term $2x \sin(1/x)$ tends to $0$, but the term $-\cos(1/x)$ oscillates between $-1$ and $1$ faster and faster, so $f^{\prime}(x)$ has no limit from either side. This oscillation is the only way that a derivative can fail to be continuous, by Darboux’s theorem: every derivative has the intermediate value property, so a derivative cannot have a jump discontinuity, such as the jump of a step function.
- The Cantor function on $[0, 1]$
-
$x \mapsto \sqrt{x}$ on $[0, 1]$
$x \mapsto \sqrt{x}$ on $[0, 1]$ is not Lipschitz continuous or continuously differentiable on $[0, 1]$, because its slope is unbounded near $0$.
Properties
- A continuously differentiable function is locally Lipschitz continuous, and it is Lipschitz continuous on every compact convex subset of its domain.
Examples
| Example | Lipschitz continuous | continuously differentiable | Why |
|---|---|---|---|
| $x \mapsto \abs{x}$ on $[-1, 1]$ | ✓ | ✗ | |
| $f(x) = x^2 \sin(1/x)$ for $x \neq 0$, $f(0) = 0$, on $[-1, 1]$ | ✓ | ✗ | |
| $x \mapsto x^2$ on $[0, 1]$ | ✓ | ✓ | |
| $f(x) = x^2$ on $\reals$ | ✗ | ✓ | The squaring function, as a function $f : \reals \to \reals$. |
Notes
- If $f$ is continuously differentiable on $[a, b]$, then $f^{\prime}$ is a continuous function on a compact set, so $\abs{f^{\prime}}$ is bounded by some $L$. By the mean value theorem, $f$ is Lipschitz continuous with constant $L$.
- On every domain, a continuously differentiable function is locally Lipschitz continuous: it is Lipschitz continuous on each compact interval in its domain.