MATH-341 · Lesson 2 of 12 · 26 min
Pointwise and uniform convergence
Lesson 1 showed that pointwise limits of functions can lose continuity, integrals and derivatives. This lesson gives the precise definitions of pointwise and uniform convergence, shows how to test for each, and proves the uniform Cauchy criterion, which decides uniform convergence without knowing the limit.
Two definitions
Let \(A\) be a set of real numbers and let \(f_n: A \to \mathbb{R}\) and \(f: A \to \mathbb{R}\) be functions.
Definition. The sequence \((f_n)\) converges pointwise to \(f\) on \(A\) if for every \(x \in A\) and every \(\varepsilon > 0\) there is an \(N\) such that \(|f_n(x) - f(x)| < \varepsilon\) for all \(n \ge N\).
Definition. The sequence \((f_n)\) converges uniformly to \(f\) on \(A\) if for every \(\varepsilon > 0\) there is an \(N\) such that \(|f_n(x) - f(x)| < \varepsilon\) for all \(n \ge N\) and all \(x \in A\).
The only difference is the position of 'for all \(x\)'. In pointwise convergence \(N\) is chosen after \(x\), so it may depend on \(x\); in uniform convergence \(N\) is chosen before \(x\) and must serve every point at once. Uniform convergence implies pointwise convergence, and the limit is the same, since pointwise limits of real sequences are unique.
Geometrically, uniform convergence says that for every \(\varepsilon > 0\), the graphs of \(f_n\) eventually lie inside the band of vertical half-width \(\varepsilon\) around the graph of \(f\), the set of points \((x, y)\) with \(f(x) - \varepsilon < y < f(x) + \varepsilon\). Pointwise convergence only says that above each single \(x\) the values eventually enter the band.
The sup norm test
For a bounded function \(g\) on \(A\) write \(\|g\|_\infty = \sup_{x \in A} |g(x)|\), the sup norm. The definition of uniform convergence can then be restated in one line.
Theorem 2.1. \(f_n \to f\) uniformly on \(A\) if and only if \(\|f_n - f\|_\infty \to 0\), where for each large \(n\) the function \(f_n - f\) is bounded.
Proof. Suppose \(f_n \to f\) uniformly and let \(\varepsilon > 0\). Choose \(N\) with \(|f_n(x) - f(x)| < \varepsilon\) for all \(n \ge N\) and \(x \in A\). Then for \(n \ge N\), \(\varepsilon\) is an upper bound for \(\{|f_n(x) - f(x)| : x \in A\}\), so \(f_n - f\) is bounded and \(\|f_n - f\|_\infty \le \varepsilon\). Hence \(\|f_n - f\|_\infty \to 0\). Conversely, if \(\|f_n - f\|_\infty \to 0\), given \(\varepsilon > 0\) choose \(N\) with \(\|f_n - f\|_\infty < \varepsilon\) for \(n \ge N\). Then \(|f_n(x) - f(x)| \le \|f_n - f\|_\infty < \varepsilon\) for every \(x\). \(\square\)
In practice the test runs in three steps. First find the pointwise limit \(f\). Then compute or estimate \(M_n = \sup_{x \in A} |f_n(x) - f(x)|\), often by calculus. Finally decide whether \(M_n \to 0\). To prove uniform convergence it is enough to find any bound \(|f_n(x) - f(x)| \le b_n\) valid for all \(x\) with \(b_n \to 0\). To disprove it, it is enough to find points \(x_n \in A\) with \(|f_n(x_n) - f(x_n)|\) not tending to 0.
Worked examples
Worked problem
Powers of x
Decide whether \(f_n(x) = x^n\) converges uniformly on \([0, 1)\), on \([0, 1]\), and on \([0, b]\) for a fixed \(b < 1\).
Show solution
- The pointwise limit on \([0, 1)\) is 0, and on \([0, 1]\) it is \(f(x) = 0\) for \(x < 1\), \(f(1) = 1\).
- On \([0, 1)\), \(\sup_{0 \le x < 1} x^n = 1\) for every \(n\), since \(x^n \to 1\) as \(x \to 1^-\). So \(\|f_n - 0\|_\infty = 1\) does not tend to 0, and the convergence is not uniform. Equivalently, the points \(x_n = 2^{-1/n}\) satisfy \(x_n^n = \frac{1}{2}\).
- On \([0, 1]\) the same points show \(\sup |f_n - f| \ge \frac{1}{2}\), so again the convergence is not uniform. This also follows from lesson 3: a uniform limit of continuous functions is continuous, and \(f\) is not.
- On \([0, b]\) with \(b < 1\), \(\sup_{0 \le x \le b} x^n = b^n \to 0\). The convergence is uniform.
Answer: Not uniform on \([0, 1)\) or \([0, 1]\); uniform on every \([0, b]\) with \(b < 1\).
Worked problem
A moving bump that shrinks
Let \(g_n(x) = \frac{x}{1 + nx^2}\) on \(\mathbb{R}\). Show that \(g_n \to 0\) uniformly.
Show solution
- For each \(x\), \(g_n(x) \to 0\): at \(x = 0\) every term is 0, and otherwise the denominator grows like \(n\).
- To find \(\sup |g_n|\), differentiate: \(g_n^\prime(x) = \frac{1 - nx^2}{(1 + nx^2)^2}\), which vanishes at \(x = \pm\frac{1}{\sqrt{n}}\).
- Since \(g_n\) is odd, tends to 0 as \(|x| \to \infty\), and has critical points only at \(\pm\frac{1}{\sqrt{n}}\), its maximum absolute value is \(|g_n(\frac{1}{\sqrt{n}})| = \frac{1/\sqrt{n}}{2} = \frac{1}{2\sqrt{n}}\).
- So \(\|g_n\|_\infty = \frac{1}{2\sqrt{n}} \to 0\), and the convergence is uniform on all of \(\mathbb{R}\).
Answer: \(\|g_n\|_\infty = \frac{1}{2\sqrt{n}} \to 0\), so \(g_n \to 0\) uniformly.
Worked problem
A moving bump that does not shrink
Let \(h_n(x) = nxe^{-nx}\) on \([0, \infty)\). Find the pointwise limit and decide whether the convergence is uniform.
Show solution
- At \(x = 0\), \(h_n(0) = 0\). For \(x > 0\), \(h_n(x) = \frac{nx}{e^{nx}} \to 0\), since \(\frac{t}{e^t} \to 0\) as \(t \to \infty\). So the pointwise limit is 0.
- Substituting \(t = nx\), \(\sup_{x \ge 0} h_n(x) = \sup_{t \ge 0} te^{-t}\), which is attained at \(t = 1\) and equals \(\frac{1}{e}\).
- So \(\|h_n\|_\infty = \frac{1}{e}\) for every \(n\). The bump keeps its height and moves toward 0 at \(x = \frac{1}{n}\).
- On \([a, \infty)\) with \(a > 0\), however, \(h_n\) is decreasing for \(x \ge \frac{1}{n}\), so once \(\frac{1}{n} < a\) we get \(\sup_{x \ge a} h_n = nae^{-na} \to 0\).
Answer: Pointwise limit 0; not uniform on \([0, \infty)\), since the sup is always \(\frac{1}{e}\); uniform on \([a, \infty)\) for every \(a > 0\).
The last two examples show a common pattern. A pointwise limit fails to be uniform because the region where \(f_n\) differs significantly from \(f\) moves, typically toward a boundary point, as \(n\) grows. Restricting to a set that stays away from that point often restores uniformity.
Measuring the sup distance numerically
A computer cannot take a supremum over infinitely many points, but evaluating on a fine grid gives a lower bound for the sup and, when the functions are smooth, a good estimate. The code compares the three examples above.
import math
def sup_dist(f, g, a, b, pts=20001):
"""Largest |f(x) - g(x)| over an even grid on [a, b]: a lower bound for the sup."""
return max(abs(f(a + (b - a) * i / (pts - 1)) - g(a + (b - a) * i / (pts - 1))) for i in range(pts))
zero = lambda x: 0.0
print(" n x^n on [0,1) x^n on [0,0.9] x/(1+nx^2) on [-5,5] nx e^(-nx) on [0,5]")
for n in [1, 5, 25, 125, 625]:
d1 = sup_dist(lambda x: x ** n, zero, 0, 1 - 1e-9)
d2 = sup_dist(lambda x: x ** n, zero, 0, 0.9)
d3 = sup_dist(lambda x: x / (1 + n * x * x), zero, -5, 5)
d4 = sup_dist(lambda x: n * x * math.exp(-n * x), zero, 0, 5)
print(f"{n:3d} {d1:10.4f} {d2:12.3e} {d3:16.4f} {d4:14.4f}")
print("predicted: 1, 0.9^n, 1/(2 sqrt n), 1/e =", round(1 / math.e, 4))n x^n on [0,1) x^n on [0,0.9] x/(1+nx^2) on [-5,5] nx e^(-nx) on [0,5] 1 1.0000 9.000e-01 0.5000 0.3679 5 1.0000 5.905e-01 0.2236 0.3679 25 1.0000 7.179e-02 0.1000 0.3679 125 1.0000 1.907e-06 0.0447 0.3679 625 1.0000 2.521e-29 0.0200 0.3671 predicted: 1, 0.9^n, 1/(2 sqrt n), 1/e = 0.3679
The middle columns tend to 0, matching \(0.9^n\) and \(\frac{1}{2\sqrt{n}}\). The first column stays near 1 and the last at \(\frac{1}{e} \approx 0.3679\), so those sequences do not converge uniformly. When the bump becomes narrower than the grid spacing the estimate can drop, which is why a grid can suggest but never prove uniform convergence; the proofs above are what settle it.
The uniform Cauchy criterion
Often we want to prove that a sequence of functions converges uniformly without knowing its limit in advance, for example when the functions are partial sums of a series. The tool is a uniform version of the Cauchy criterion.
Definition. A sequence \((f_n)\) of functions on \(A\) is uniformly Cauchy if for every \(\varepsilon > 0\) there is an \(N\) such that \(|f_m(x) - f_n(x)| < \varepsilon\) for all \(m, n \ge N\) and all \(x \in A\).
Theorem 2.2 (uniform Cauchy criterion). A sequence \((f_n)\) of functions on \(A\) converges uniformly on \(A\) if and only if it is uniformly Cauchy.
Proof. Suppose \(f_n \to f\) uniformly. Given \(\varepsilon > 0\), choose \(N\) with \(|f_n(x) - f(x)| < \frac{\varepsilon}{2}\) for all \(n \ge N\) and all \(x\). For \(m, n \ge N\) the triangle inequality gives \(|f_m(x) - f_n(x)| \le |f_m(x) - f(x)| + |f(x) - f_n(x)| < \varepsilon\).
Conversely, suppose \((f_n)\) is uniformly Cauchy. For each fixed \(x\), the real sequence \((f_n(x))\) is Cauchy, so by completeness of \(\mathbb{R}\) it converges; call its limit \(f(x)\). This defines the candidate limit \(f\). Now let \(\varepsilon > 0\) and choose \(N\) with \(|f_m(x) - f_n(x)| < \frac{\varepsilon}{2}\) for all \(m, n \ge N\) and all \(x\). Fix \(n \ge N\) and \(x \in A\), and let \(m \to \infty\) in this inequality. Since \(f_m(x) \to f(x)\) and the absolute value is continuous, we get \(|f(x) - f_n(x)| \le \frac{\varepsilon}{2} < \varepsilon\). This holds for every \(n \ge N\) and every \(x\), with \(N\) independent of \(x\), so \(f_n \to f\) uniformly. \(\square\)
The key step is letting \(m \to \infty\) in a non-strict inequality, which preserves it. The same trick appears whenever we prove completeness of a space of functions, and it will reappear in lesson 8 when we show that the space \(C[a, b]\) of continuous functions with the sup distance is complete.
Uniform convergence and algebra
Uniform limits behave well under addition and scalar multiplication: if \(f_n \to f\) and \(g_n \to g\) uniformly on \(A\), then \(f_n + g_n \to f + g\) and \(cf_n \to cf\) uniformly, because \(\|(f_n + g_n) - (f + g)\|_\infty \le \|f_n - f\|_\infty + \|g_n - g\|_\infty\). Products need more care. If \(f_n \to f\) and \(g_n \to g\) uniformly and all the functions are bounded by a common constant \(M\), then \[|f_ng_n - fg| \le |f_n||g_n - g| + |g||f_n - f| \le M\|g_n - g\|_\infty + M\|f_n - f\|_\infty,\] so \(f_ng_n \to fg\) uniformly. Without boundedness this fails: on \(\mathbb{R}\), \(f_n(x) = x + \frac{1}{n}\) converges uniformly to \(x\), but \(f_n(x)^2 = x^2 + \frac{2x}{n} + \frac{1}{n^2}\) does not converge uniformly to \(x^2\), because \(\frac{2x}{n}\) is unbounded in \(x\) for each \(n\).
A uniform limit of bounded functions is bounded. If \(\|f_N - f\|_\infty < 1\) and \(|f_N| \le M\), then \(|f| \le M + 1\). In contrast, the pointwise limit of bounded functions can be unbounded: \(f_n(x) = \min(n, \frac{1}{x})\) on \((0, 1]\) is bounded for each \(n\), but converges pointwise to \(\frac{1}{x}\).
Uniform convergence on subsets
If \(f_n \to f\) uniformly on \(A\), then also on every subset of \(A\), and if \(f_n \to f\) uniformly on \(A\) and on \(B\), then on \(A \cup B\): take the larger of the two values of \(N\). By induction this extends to finite unions, but not to infinite ones. The powers \(x^n\) converge uniformly on \([0, 1 - \frac{1}{k}]\) for each \(k\), but not on the union \([0, 1)\). This motivates a weaker notion that is extremely common in practice.
Definition. The sequence \(f_n\) converges locally uniformly, or uniformly on compact sets, on an open interval \(I\) if it converges uniformly on every closed bounded subinterval \([a, b] \subseteq I\).
The powers \(x^n\) converge locally uniformly to 0 on \((-1, 1)\), and \(nxe^{-nx}\) converges locally uniformly to 0 on \((0, \infty)\). Power series, as lesson 5 shows, always converge locally uniformly inside their interval of convergence, though not usually uniformly on the whole interval. Because continuity and differentiability are local properties, locally uniform convergence is enough for most of the theorems in lesson 3.
Common mistakes
MistakeChoosing \(N\) after \(x\) when proving uniform convergence.
InsteadFor uniform convergence \(N\) must depend only on \(\varepsilon\). Any bound \(|f_n(x) - f(x)| \le b_n\) with \(b_n\) independent of \(x\) and \(b_n \to 0\) does the job.
MistakeConcluding uniform convergence because \(f_n(x) \to f(x)\) at every grid point quickly.
InsteadA grid cannot see a bump narrower than its spacing; \(nxe^{-nx}\) has sup \(\frac{1}{e}\) for every \(n\).
MistakeForgetting to find the pointwise limit first.
InsteadThe only candidate for a uniform limit is the pointwise limit; compute it before estimating \(\sup |f_n - f|\).
MistakeAssuming uniform convergence on each \([0, 1 - \frac{1}{k}]\) gives it on \([0, 1)\).
InsteadUniform convergence passes to finite unions, not infinite ones.
Summary and key terms
- Pointwise: \(N\) may depend on \(x\). Uniform: one \(N\) for all \(x\).
- \(f_n \to f\) uniformly if and only if \(\|f_n - f\|_\infty \to 0\).
- To disprove uniform convergence, find \(x_n\) with \(|f_n(x_n) - f(x_n)|\) bounded away from 0.
- A sequence converges uniformly if and only if it is uniformly Cauchy, a fact that rests on the completeness of the real line.
- Uniform convergence is preserved by sums, by products of uniformly bounded sequences, and on finite unions of sets.
- Locally uniform convergence means uniform convergence on every closed bounded subinterval.
- Sup norm
- \(\|g\|_\infty = \sup_{x \in A} |g(x)|\).
- Uniformly Cauchy
- \(|f_m(x) - f_n(x)| < \varepsilon\) for all \(m, n \ge N\) and all \(x\).
- Locally uniform convergence
- Uniform convergence on every closed bounded subinterval.
- Pointwise limit
- The function \(f(x) = \lim f_n(x)\), defined point by point.
Practice problems
Work each problem on paper first, then reveal the answer to check.
Does \(f_n(x) = \frac{\sin(nx)}{n}\) converge uniformly on \(\mathbb{R}\)?
Show answer
Yes: \(|f_n(x)| \le \frac{1}{n}\) for all \(x\), so \(\|f_n\|_\infty \le \frac{1}{n} \to 0\).
Does \(f_n(x) = \frac{nx}{1 + n^2x^2}\) converge uniformly on \([0, 1]\)? On \([1, 2]\)?
Show answer
The pointwise limit is 0. The maximum on \([0, 1]\) is at \(x = \frac{1}{n}\) with value \(\frac{1}{2}\), so not uniform there. On \([1, 2]\), \(f_n(x) \le \frac{nx}{n^2x^2} = \frac{1}{nx} \le \frac{1}{n}\), so uniform.
Let \(f_n(x) = x^n(1 - x)\) on \([0, 1]\). Find \(\|f_n\|_\infty\) and decide whether \(f_n \to 0\) uniformly.
Show answer
The derivative vanishes at \(x = \frac{n}{n + 1}\), giving \(\|f_n\|_\infty = (\frac{n}{n + 1})^n \frac{1}{n + 1} \le \frac{1}{n + 1} \to 0\). Uniform.
Prove that if \(f_n \to f\) uniformly on \(A\) and each \(f_n\) is bounded, then \(f\) is bounded.
Show answer
Choose \(N\) with \(\|f_N - f\|_\infty < 1\). If \(|f_N| \le M\), then \(|f(x)| \le |f(x) - f_N(x)| + |f_N(x)| < 1 + M\).
Show that \(f_n(x) = \sqrt{x^2 + \frac{1}{n}}\) converges uniformly to \(|x|\) on \(\mathbb{R}\).
Show answer
\(0 \le \sqrt{x^2 + \frac{1}{n}} - |x| = \frac{1/n}{\sqrt{x^2 + 1/n} + |x|} \le \frac{1/n}{\sqrt{1/n}} = \frac{1}{\sqrt{n}}\), which tends to 0 independently of \(x\).
Lesson quiz · 5 questions
Score 60% or more to complete this lesson.
Create a free account to save your progress, take quizzes and earn a certificate.