---
title: Compactness in function spaces
heading: Equicontinuity and the Arzelà–Ascoli theorem
eyebrow: A14 · Lesson 29 · Arzelà–Ascoli
xp: 40
---

::: hook
In $\mathbb R^n$, every bounded sequence has a convergent subsequence (lesson 13's compactness). In a space of functions that fails: $x^n$ stays between 0 and 1 on [0, 1], yet no subsequence converges uniformly. Something more than boundedness is needed, and the **Arzelà–Ascoli theorem** says exactly what: the functions must also be **equicontinuous**, with one δ serving the whole family. That theorem is how existence is proved when no formula is available: for ODE solutions without Lipschitz conditions, for minimizers in optimal control, and for the eigenfunctions of integral operators.
:::

::: play
- The curves are $x^n$ for the chosen n and for 2n, on [0, 1]. Each is bounded by 1.
- Raise n: the curves pile up near x = 1, where they rise ever more steeply from near 0 to 1. Their sup distance doesn't shrink: it stays at ¼ for every n.
- The readout gives the δ that $x^n$ needs at x = 1 for ε = ½. It goes to 0 as n grows: no single δ works for the whole family, which is the missing equicontinuity.
:::

```sim plot
view: graph
x: x = 0..1
y: y = 0..1.05
slider: n = 1..100 step 1 = 10
plot: x^n | label: xⁿ | samples: 500
plot: x^(2*n) | label: x²ⁿ | color: ch3 | samples: 500
readout: delta needed at the right end for epsilon one half = 1 - 0.5^(1/n) | digits: 4
readout: sup distance between the two curves = 0.25 | digits: 3
```

::: predict
## The functions $f_a(x) = \sin(ax)$ for $0 \le a \le 10$ form one family on [0, 1]. Is it equicontinuous?

- [x] Yes: δ = ε/10 works for every member
- [ ] No: sine functions oscillate
- [ ] Only if a is a whole number
- [ ] No family of more than countably many functions can be

::: reveal
Yes. Every member has $\lvert f_a'\rvert = a\lvert\cos ax\rvert \le 10$, so $\lvert f_a(x) - f_a(y)\rvert \le 10\lvert x - y\rvert$, and δ = ε/10 serves them all. A common Lipschitz bound is the easiest way to get equicontinuity. If a could be any real number, the slopes would be unbounded and no single δ would work.
:::
:::

::: nameit
## Equicontinuity

A family $\mathcal F$ of functions on a set K is **equicontinuous** if for every ε > 0 there's one δ > 0 such that $\lvert x - y\rvert < \delta$ implies $\lvert f(x) - f(y)\rvert < \varepsilon$ for every f in $\mathcal F$. A common Lipschitz constant L gives it with δ = ε/L.

## The theorem

**Arzelà–Ascoli.** If a sequence of functions on a compact interval is uniformly bounded and equicontinuous, it has a subsequence that converges uniformly. Equivalently, a set in $C[a, b]$ with the sup norm has compact closure exactly when it's bounded and equicontinuous.

## Why it's needed

In $C[0, 1]$, the closed unit ball isn't compact: $x^n$, or a narrowing bump that moves, has no uniformly convergent subsequence. Boundedness controls heights; equicontinuity controls slopes uniformly, ruling out ever-steeper features.

## Uses

- **Peano's existence theorem.** For $\dot y = f(t, y)$ with f merely continuous, Euler polygons with shrinking steps are bounded and equicontinuous (their slopes are bounded by $\max\lvert f\rvert$), so a subsequence converges to a solution, possibly one of several.
- **Integral operators.** $g(x) = \int K(x, t)f(t)\,dt$ with a continuous kernel maps bounded sets of f to equicontinuous families of g, so the operator is **compact**. Compact operators have eigenvalues that pile up only at 0, the basis of Sturm–Liouville expansions.
- **Optimization.** Minimizing sequences that are bounded and equicontinuous have convergent subsequences, so minimizers exist.
:::

::: example
## Show that $x^n$ isn't equicontinuous at x = 1 by finding the δ each member needs for ε = ½.

::: solution
1. **Find each member's δ.** $\lvert x^n - 1^n\rvert < \frac12$ requires $x > 2^{-1/n}$, so the largest δ for $x^n$ at 1 is
   $$\delta = 1 - 2^{-1/n}$$
2. **Watch it shrink.** That's 0.067 for n = 10 and 0.0069 for n = 100, and it tends to 0.
3. **Conclude.** No positive δ works for every n, so the family isn't equicontinuous, and Arzelà–Ascoli doesn't apply.
4. **No uniformly convergent subsequence.** Indeed, for every n,
   $$\lVert x^n - x^{2n}\rVert_\infty = \frac14$$
   (at $x^n = \frac12$), so no subsequence is uniformly Cauchy.

**Answer:** $x^n$ needs $\delta = 1 - 2^{-1/n}$, which tends to 0, so no single δ works and the family isn't equicontinuous at 1.
:::
:::

::: example
## A family of functions satisfies $\lvert f\rvert \le 2$ and $\lvert f'\rvert \le 5$ on [0, 1]. Find a δ that works for all of them with ε = 0.01, and say what Arzelà–Ascoli then promises.

::: solution
1. **A Lipschitz bound.** By the mean value theorem,
   $$\lvert f(x) - f(y)\rvert \le 5\lvert x - y\rvert$$
2. **Choose δ.**
   $$\begin{aligned} \delta &= 0.01/5 \\ &= 0.002 \end{aligned}$$
   works for every member.
3. **Apply Arzelà–Ascoli.** The family is uniformly bounded and equicontinuous, so every sequence in it has a uniformly convergent subsequence.
4. **What the limit keeps.** Its limit also satisfies $\lvert f\rvert \le 2$ and the Lipschitz bound 5 (though it may lose differentiability at isolated points).
5. **Why it matters.** This is the compactness that makes "choose the best function in the family" a well-posed problem.

**Answer:** δ = 0.002 works for every member, and Arzelà–Ascoli promises that every sequence in the family has a uniformly convergent subsequence.
:::
:::

::: example
## $g(x) = \int_0^1e^{-\lvert x - t\rvert}f(t)\,dt$ with $\lvert f\rvert \le 1$. Show the family of all such g is equicontinuous and bounded.

::: solution
1. **Bounded.**
   $$\lvert g(x)\rvert \le \int_0^1e^{-\lvert x - t\rvert}dt$$
   which is largest at x = ½, where it equals
   $$2(1 - e^{-1/2}) = 0.787$$
2. **The kernel is 1-Lipschitz in x.**
   $$\lvert e^{-\lvert x - t\rvert} - e^{-\lvert y - t\rvert}\rvert \le \lvert x - y\rvert$$
3. **Equicontinuous.** So for every admissible f,
   $$\lvert g(x) - g(y)\rvert \le \lvert x - y\rvert$$
4. **A compact operator.** By Arzelà–Ascoli the operator $f \mapsto g$ maps the unit ball into a set with compact closure: it's a compact operator.

**Answer:** every such g has $\lvert g\rvert \le 0.787$ and $\lvert g(x) - g(y)\rvert \le \lvert x - y\rvert$, so the family is bounded and equicontinuous.
:::
:::

::: check
given: n = 5 | 20 | 100; e = 0.5 | 0.1
answer: 1 - (1 - e)^(1/n)
tolerance: 0.5%

## What is the largest δ that makes $\lvert x^{\given{n}} - 1\rvert < \given{e}$ whenever $1 - \delta < x \le 1$?

::: right
Right. $1 - (1 - \varepsilon)^{1/n}$, which shrinks to 0 as n grows.
:::

::: misses
- [e/n] That's the linear estimate from the slope n at 1; the exact value is $1 - (1 - \varepsilon)^{1/n}$.
- [any] Solve $x^n = 1 - \varepsilon$.
:::
:::

::: check
given: L = 5 | 20; e = 0.01 | 0.001
answer: e/L
tolerance: 0.5%

## Every function in a family has Lipschitz constant at most {L}. What δ works for all of them with ε = {e}?

::: right
Right. $\delta = \varepsilon/L$, the same for every member.
:::

::: misses
- [e*L] Divide by L: steeper functions need smaller δ.
- [any] $\lvert f(x) - f(y)\rvert \le L\lvert x - y\rvert$.
:::
:::

::: check
given: n = 2 | 5 | 10; m = 30 | 50
answer: 1 - n/m
tolerance: 0.5%

## $f_k(x) = \max(0, 1 - k\lvert x - \frac12\rvert)$ is a tent of height 1 and half-width $\frac1k$. What is $\lVert f_{\given{n}} - f_{\given{m}}\rVert_\infty$?

::: right
Right. The difference is largest at $x = \frac12 \pm \frac1m$, where $f_m$ has fallen to 0 and $f_n$ is still $1 - \frac nm$.
:::

::: misses
- [n/m] At the narrow tent's edge, the wide one is at $1 - \frac nm$.
- [any] Look where the narrower tent reaches 0.
:::
:::

::: check
given: a = 1 | 2 | 5
answer: 2*(1 - exp(-a/2))/a
tolerance: 0.5%

## $g(x) = \int_0^1e^{-\given{a}\lvert x - t\rvert}f(t)\,dt$ with $\lvert f\rvert \le 1$. What bound on $\lvert g\rvert$ holds for every such f?

::: right
Right. The kernel's integral is largest at x = ½: $\frac{2(1 - e^{-a/2})}{a}$.
:::

::: misses
- [1] Integrate the kernel instead of bounding it by 1.
- [any] $\max_x\int_0^1e^{-a\lvert x - t\rvert}dt$, at the midpoint.
:::
:::

::: check
kind: parts
given: M = 1 | 3; L = 2 | 10; e = 0.1 | 0.01

## A family on [0, 1] has $\lvert f\rvert \le$ {M} and Lipschitz constant {L}.

::: part
answer: e/L
tolerance: 0.5%

### What δ makes every member vary by less than {e} over any interval of length δ?

::: misses
- [any] $\varepsilon/L$.
:::
:::

::: part
answer: ceil(L/e)
tolerance: 0

### On a grid of spacing δ = ε/L, how many intervals cover [0, 1]? (Values at the grid points then pin down every member within about ε.)

::: misses
- [any] $\lceil 1/\delta\rceil$.
:::
:::
:::

::: check
kind: choice

## Which family of functions on [0, 1] is equicontinuous?

- [ ] $\{x^n : n \ge 1\}$
- [x] $\{\sin(x + c) : c \in \mathbb R\}$
- [ ] $\{\sin(nx) : n \ge 1\}$
- [ ] $\{n x : n \ge 1\}$

::: right
Right. Every shifted sine has slope at most 1, so δ = ε works for all of them.
:::

::: misses
- [1] Near 1 the members get ever steeper.
- [3] The slopes grow with n.
- [4] Unbounded slopes, and unbounded values too.
:::
:::

::: check
kind: derivation
vars: n = 1..200, e = 0.01..0.9

## How much room does $x^n$ give at x = 1?

::: step
answer: (1 - e)^(1/n)

### Below what x does $x^n$ fall more than ε below 1?
:::

::: step
answer: 1 - (1 - e)^(1/n)

### So what is the largest δ that works at x = 1?
:::

::: right
Right. For large n this is about $\frac{-\ln(1 - \varepsilon)}{n}$, which goes to 0: no common δ.
:::
:::

::: explain
## Why isn't boundedness enough for compactness in a space of continuous functions?

::: model
In $\mathbb R^n$ a bounded set lives in a box that can be cut into finitely many small boxes, so some small box holds infinitely many points of any sequence, giving a convergent subsequence. A space of functions has infinitely many independent directions: a bounded family can keep producing new features at ever finer scales, such as steeper rises or narrower bumps, that are all far apart in sup norm. Equicontinuity forbids features finer than a fixed scale δ, so on a grid of spacing δ each function is determined, to within ε, by finitely many values, each in a bounded range. That puts the family back into a finite-dimensional box at every resolution, which is what compactness needs.
:::
:::

::: practice

::: check
given: n = 10 | 50; e = 0.2 | 0.05
answer: 1 - (1 - e)^(1/n)
tolerance: 0.5%

## δ for $x^{\given{n}}$ at 1 with ε = {e}?

::: misses
- [any] $1 - (1 - \varepsilon)^{1/n}$.
:::
:::

::: check
given: n = 3 | 8; m = 30 | 80
answer: 1 - n/m
tolerance: 0.5%

## Sup distance between tents {n} and {m}?

::: misses
- [any] $1 - \frac nm$.
:::
:::
:::
