MATH-341 · Lesson 3 of 12 · 24 min
Uniform convergence, continuity, integration and differentiation
This lesson proves the three interchange theorems that make uniform convergence worth defining. A uniform limit of continuous functions is continuous. On a closed bounded interval, the integral of a uniform limit is the limit of the integrals. And a sequence of differentiable functions can be differentiated term by term provided the derivatives converge uniformly. We also prove Dini's theorem, which gives uniform convergence for free in an important special case.
Continuity survives uniform limits
Theorem 3.1 (uniform limit theorem). Let \(f_n \to f\) uniformly on \(A\). If every \(f_n\) is continuous at \(c \in A\), then \(f\) is continuous at \(c\). In particular, a uniform limit of continuous functions is continuous.
Proof. Let \(\varepsilon > 0\). By uniform convergence choose \(N\) with \(|f_N(x) - f(x)| < \frac{\varepsilon}{3}\) for every \(x \in A\). Since \(f_N\) is continuous at \(c\), choose \(\delta > 0\) such that \(|f_N(x) - f_N(c)| < \frac{\varepsilon}{3}\) whenever \(x \in A\) and \(|x - c| < \delta\). For such \(x\), \[|f(x) - f(c)| \le |f(x) - f_N(x)| + |f_N(x) - f_N(c)| + |f_N(c) - f(c)| < \frac{\varepsilon}{3} + \frac{\varepsilon}{3} + \frac{\varepsilon}{3} = \varepsilon.\] So \(f\) is continuous at \(c\). \(\square\)
This is the 'epsilon over three' argument, and it shows precisely where uniformity enters. The first term \(|f(x) - f_N(x)|\) must be small at the variable point \(x\), not only at \(c\), and only a single \(N\) that works at every point near \(c\) makes that possible. In Abel's example of lesson 1 no such \(N\) exists near \(\pi\), and continuity fails there.
Since continuity at \(c\) depends only on the behaviour of \(f\) near \(c\), the theorem holds under locally uniform convergence: if \(f_n \to f\) uniformly on every closed bounded subinterval of an open interval \(I\) and every \(f_n\) is continuous, then \(f\) is continuous on \(I\). The theorem also gives a quick test for non-uniform convergence: if continuous \(f_n\) converge pointwise to a discontinuous \(f\), the convergence cannot be uniform. That is the fastest way to see that \(x^n\) does not converge uniformly on \([0, 1]\).
The converse is false. A pointwise limit of continuous functions can be continuous without the convergence being uniform: \(nxe^{-nx} \to 0\) on \([0, \infty)\), and the limit 0 is continuous, but the sup distance is always \(\frac{1}{e}\).
Dini's theorem
There is one situation in which a continuous pointwise limit forces uniform convergence. It was found by Ulisse Dini in 1878.
Theorem 3.2 (Dini). Let \(f_n\) be continuous functions on a closed bounded interval \([a, b]\) that converge pointwise to a continuous function \(f\), and suppose the sequence is monotone: \(f_1(x) \ge f_2(x) \ge \dots\) for every \(x\), or \(f_1(x) \le f_2(x) \le \dots\) for every \(x\). Then \(f_n \to f\) uniformly on \([a, b]\).
Proof. Replacing \(f_n\) by \(f_n - f\), or by \(f - f_n\) in the increasing case, we may assume the \(g_n = f_n - f\) are continuous, decrease at each point, and converge pointwise to 0. Then \(g_n \ge 0\), and \(\sup g_n\) is a decreasing sequence. Suppose the convergence is not uniform. Then there is \(\varepsilon > 0\) such that \(\sup g_n \ge \varepsilon\) for all \(n\), and since \(g_n\) is continuous on the compact set \([a, b]\) the extreme value theorem gives points \(x_n\) with \(g_n(x_n) \ge \varepsilon\). By the Bolzano–Weierstrass theorem a subsequence \(x_{n_k}\) converges to some \(x^* \in [a, b]\). Fix any \(m\). For \(n_k \ge m\), monotonicity gives \(g_m(x_{n_k}) \ge g_{n_k}(x_{n_k}) \ge \varepsilon\). Letting \(k \to \infty\) and using continuity of \(g_m\), \(g_m(x^*) \ge \varepsilon\). This holds for every \(m\), contradicting \(g_m(x^*) \to 0\). \(\square\)
All four hypotheses matter. The powers \(x^n\) decrease on \([0, 1]\), but the limit is discontinuous. The functions \(nxe^{-nx}\) have a continuous limit but are not monotone in \(n\). On the non-compact interval \([0, 1)\), \(x^n\) decreases to the continuous limit 0, but not uniformly. And without continuity of the \(f_n\), decreasing indicator functions of \((0, \frac{1}{n})\) converge pointwise to 0 but not uniformly.
Integration
Theorem 3.3. Let \(f_n\) be Riemann integrable on \([a, b]\) and suppose \(f_n \to f\) uniformly on \([a, b]\). Then \(f\) is Riemann integrable and \[\int_a^b f_n \to \int_a^b f.\]
Proof. We first show \(f\) is integrable, using the criterion from MATH-241 that a bounded function is integrable if for every \(\eta > 0\) there is a partition \(P\) with \(U(f, P) - L(f, P) < \eta\). Let \(\varepsilon_n = \|f_n - f\|_\infty\), which tends to 0. Then \(f_n - \varepsilon_n \le f \le f_n + \varepsilon_n\) on \([a, b]\), so \(f\) is bounded, and for any partition \(P\) \[U(f, P) - L(f, P) \le U(f_n, P) - L(f_n, P) + 2\varepsilon_n(b - a),\] because on each subinterval the supremum of \(f\) is at most that of \(f_n\) plus \(\varepsilon_n\) and the infimum is at least that of \(f_n\) minus \(\varepsilon_n\). Given \(\eta > 0\) choose \(n\) with \(2\varepsilon_n(b - a) < \frac{\eta}{2}\), then a partition \(P\) with \(U(f_n, P) - L(f_n, P) < \frac{\eta}{2}\). This gives \(U(f, P) - L(f, P) < \eta\), so \(f\) is integrable. Finally \[\Big|\int_a^b f_n - \int_a^b f\Big| \le \int_a^b |f_n - f| \le \varepsilon_n(b - a) \to 0. \quad \square\]
The bound \(\varepsilon_n(b - a)\) uses the length of the interval, and the theorem fails on unbounded intervals. The functions \(f_n = \frac{1}{n}\) on \([0, n]\) and 0 beyond converge uniformly to 0 on \([0, \infty)\), but \(\int_0^\infty f_n = 1\) for every \(n\). On the other hand, uniform convergence is far from necessary: \(x^n \to 0\) is not uniform on \([0, 1]\), yet \(\int_0^1 x^n = \frac{1}{n + 1} \to 0\). The dominated convergence theorem of MATH-441 gives the right general condition, and it needs the Lebesgue integral.
Differentiation needs more
Uniform convergence of \(f_n\) says nothing about the derivatives. The functions \(f_n(x) = \frac{\sin(nx)}{\sqrt{n}}\) converge uniformly to 0 on \(\mathbb{R}\), since \(\|f_n\|_\infty = \frac{1}{\sqrt{n}}\), but \(f_n^\prime(x) = \sqrt{n}\cos(nx)\), which at \(x = 0\) tends to infinity, and at most other points oscillates without converging. A function can be uniformly close to 0 while wiggling steeply. Even when the derivatives do converge, the limit need not be the derivative of the limit: the functions \(f_n(x) = \sqrt{x^2 + \frac{1}{n}}\) converge uniformly to \(|x|\), which is not differentiable at 0, although every \(f_n\) is smooth and \(f_n^\prime(x) = \frac{x}{\sqrt{x^2 + 1/n}}\) converges at every point.
The right hypothesis is uniform convergence of the derivatives. We prove the theorem first under the assumption that the derivatives are continuous, where the fundamental theorem of calculus gives a short proof, and then state the general version.
Theorem 3.4. Let \(f_n\) be continuously differentiable on \([a, b]\). Suppose \(f_n^\prime \to g\) uniformly on \([a, b]\) and \((f_n(x_0))\) converges for some \(x_0 \in [a, b]\). Then \(f_n\) converges uniformly on \([a, b]\) to a differentiable function \(f\) with \(f^\prime = g\).
Proof. By theorem 3.1, \(g\) is continuous. Let \(c = \lim f_n(x_0)\) and define \(f(x) = c + \int_{x_0}^x g(t)\,dt\). By the fundamental theorem of calculus, \(f\) is differentiable with \(f^\prime = g\). By the fundamental theorem again, \(f_n(x) = f_n(x_0) + \int_{x_0}^x f_n^\prime(t)\,dt\), so \[|f_n(x) - f(x)| \le |f_n(x_0) - c| + \Big|\int_{x_0}^x (f_n^\prime - g)\Big| \le |f_n(x_0) - c| + (b - a)\|f_n^\prime - g\|_\infty.\] The right side is independent of \(x\) and tends to 0, so \(f_n \to f\) uniformly. \(\square\)
Theorem 3.5 (general form). The conclusion of theorem 3.4 holds if each \(f_n\) is merely differentiable on \([a, b]\), with \(f_n^\prime \to g\) uniformly and \((f_n(x_0))\) convergent.
Proof. First, \((f_n)\) is uniformly Cauchy. Applying the mean value theorem to \(f_m - f_n\) between \(x_0\) and \(x\) gives a point \(\xi\) with \[|f_m(x) - f_n(x)| \le |f_m(x_0) - f_n(x_0)| + |x - x_0|\,|f_m^\prime(\xi) - f_n^\prime(\xi)| \le |f_m(x_0) - f_n(x_0)| + (b - a)\|f_m^\prime - f_n^\prime\|_\infty,\] which is small for large \(m, n\) since \((f_n(x_0))\) is Cauchy and \((f_n^\prime)\) is uniformly Cauchy. Let \(f\) be the uniform limit. Now fix \(c \in [a, b]\) and let \(\varepsilon > 0\). For \(x \ne c\), write \(D_n(x) = \frac{f_n(x) - f_n(c)}{x - c}\) and \(D(x) = \frac{f(x) - f(c)}{x - c}\). The mean value theorem applied to \(f_m - f_n\) on the interval between \(c\) and \(x\) gives \(|D_m(x) - D_n(x)| \le \|f_m^\prime - f_n^\prime\|_\infty\). Choose \(N\) with \(\|f_m^\prime - f_n^\prime\|_\infty < \frac{\varepsilon}{3}\) for \(m, n \ge N\); letting \(m \to \infty\) gives \(|D(x) - D_n(x)| \le \frac{\varepsilon}{3}\) for \(n \ge N\) and all \(x \ne c\). Choose \(n \ge N\) also with \(|f_n^\prime(c) - g(c)| < \frac{\varepsilon}{3}\), and then \(\delta > 0\) with \(|D_n(x) - f_n^\prime(c)| < \frac{\varepsilon}{3}\) for \(0 < |x - c| < \delta\), by differentiability of \(f_n\) at \(c\). For such \(x\), \(|D(x) - g(c)| \le |D(x) - D_n(x)| + |D_n(x) - f_n^\prime(c)| + |f_n^\prime(c) - g(c)| < \varepsilon\). So \(f^\prime(c) = g(c)\). \(\square\)
A numerical counterexample
The code checks the two failure modes. For \(f_n(x) = \frac{\sin(nx)}{\sqrt{n}}\) the sup norm shrinks while the derivative at 0 grows. For the tent functions the integrals stay at 1 while the values at a fixed point become 0.
import math
print(" n sup|f_n| f_n'(0) f_n'(1) f_n(x) = sin(nx)/sqrt(n)")
for n in [1, 10, 100, 1000, 10000]:
sup = 1 / math.sqrt(n)
d0 = math.sqrt(n) * math.cos(0.0)
d1 = math.sqrt(n) * math.cos(n * 1.0)
print(f"{n:5d} {sup:9.4f} {d0:9.2f} {d1:9.2f}")
def tent(n, x):
"""Rises to height n at 1/n, back to 0 at 2/n, then 0."""
if x <= 1 / n:
return n * n * x
if x <= 2 / n:
return 2 * n - n * n * x
return 0.0
def integral(f, a, b, m=200000):
h = (b - a) / m # midpoint rule
return h * sum(f(a + (i + 0.5) * h) for i in range(m))
print()
print(" n integral of tent_n over [0,1] tent_n(0.3) sup tent_n")
for n in [2, 5, 10, 50, 100]:
print(f"{n:3d} {integral(lambda x: tent(n, x), 0, 1):14.6f} {tent(n, 0.3):18.3f} {n:9d}") n sup|f_n| f_n'(0) f_n'(1) f_n(x) = sin(nx)/sqrt(n)
1 1.0000 1.00 0.54
10 0.3162 3.16 -2.65
100 0.1000 10.00 8.62
1000 0.0316 31.62 17.78
10000 0.0100 100.00 -95.22
n integral of tent_n over [0,1] tent_n(0.3) sup tent_n
2 1.000000 1.200 2
5 1.000000 2.500 5
10 1.000000 0.000 10
50 1.000000 0.000 50
100 1.000000 0.000 100The derivative at 0 grows like \(\sqrt{n}\) even though the functions are uniformly within \(\frac{1}{\sqrt{n}}\) of 0, and at \(x = 1\) the derivatives oscillate. The tent integrals stay at 1 while each fixed point eventually sees the value 0. Neither phenomenon contradicts a theorem: the derivatives of \(\frac{\sin(nx)}{\sqrt{n}}\) do not converge uniformly, and the tents do not converge uniformly.
Worked problem
Applying the differentiation theorem
Let \(f_n(x) = \sum_{k=1}^{n} \frac{\sin(kx)}{k^3}\). Show that \(f_n\) converges uniformly on \(\mathbb{R}\) to a differentiable function \(f\), and find \(f^\prime\).
Show solution
- The derivatives are \(f_n^\prime(x) = \sum_{k=1}^{n} \frac{\cos(kx)}{k^2}\). For \(m > n\), \(|f_m^\prime(x) - f_n^\prime(x)| \le \sum_{k=n+1}^{m} \frac{1}{k^2}\), which is small for large \(n\) since \(\sum \frac{1}{k^2}\) converges. So \((f_n^\prime)\) is uniformly Cauchy and converges uniformly, by theorem 2.2, to \(g(x) = \sum_{k=1}^{\infty} \frac{\cos(kx)}{k^2}\).
- At \(x_0 = 0\), \(f_n(0) = 0\) for all \(n\), which converges.
- Each \(f_n\) is continuously differentiable on every \([a, b]\), so theorem 3.4 applies on every closed bounded interval.
Answer: \(f_n\) converges uniformly on every \([a, b]\), and indeed on \(\mathbb{R}\), to a differentiable \(f\) with \(f^\prime(x) = \sum_{k \ge 1} \frac{\cos(kx)}{k^2}\).
Worked problem
A limit of integrals by uniform convergence
Compute \(\lim_{n \to \infty} \int_0^1 n\sin\frac{x}{n}\,dx\).
Show solution
- Let \(f_n(x) = n\sin\frac{x}{n}\). Since \(\sin t\) is close to \(t\) for small \(t\), we expect \(f_n(x) \to x\).
- Taylor's theorem with remainder gives \(t - \frac{t^3}{6} \le \sin t \le t\) for \(t \ge 0\). With \(t = \frac{x}{n}\) and multiplying by \(n\): \(x - \frac{x^3}{6n^2} \le f_n(x) \le x\).
- So \(|f_n(x) - x| \le \frac{x^3}{6n^2} \le \frac{1}{6n^2}\) on \([0, 1]\), a bound independent of \(x\). The convergence is uniform.
- By theorem 3.3, \(\int_0^1 f_n \to \int_0^1 x\,dx = \frac{1}{2}\).
Answer: The limit is \(\frac{1}{2}\).
Common mistakes
MistakeUsing theorem 3.3 on an unbounded interval.
Instead\(\frac{1}{n}\) on \([0, n]\) converges uniformly to 0 on \([0, \infty)\) with integrals all equal to 1.
MistakeDifferentiating a uniformly convergent sequence term by term.
InsteadUniform convergence of the derivatives is needed, plus convergence at one point.
MistakeApplying Dini without monotonicity or on a non-compact set.
Instead\(nxe^{-nx}\) is not monotone in \(n\); \(x^n\) on \([0, 1)\) is monotone but the set is not compact.
MistakeThinking a continuous limit proves uniform convergence.
InsteadContinuity of the limit is necessary, not sufficient, for uniform convergence of continuous functions.
Summary and key terms
- A uniform limit of continuous functions is continuous, by the epsilon-over-three argument.
- Dini: on a closed bounded interval, a monotone sequence of continuous functions with a continuous pointwise limit converges uniformly.
- On a closed bounded interval, uniform convergence lets limits and integrals be interchanged.
- If \(f_n^\prime \to g\) uniformly and \(f_n(x_0)\) converges, then \(f_n\) converges uniformly to \(f\) with \(f^\prime = g\).
- Uniform convergence of \(f_n\) alone does not control \(f_n^\prime\).
- Uniform limit theorem
- Uniform limits of continuous functions are continuous.
- Dini's theorem
- Monotone convergence of continuous functions to a continuous limit on a compact interval is uniform.
- Epsilon over three
- Splitting an estimate into three terms, each less than ε/3.
- Term-by-term differentiation
- Concluding \((\lim f_n)^\prime = \lim f_n^\prime\), valid when the derivatives converge uniformly.
Practice problems
Work each problem on paper first, then reveal the answer to check.
Use the uniform limit theorem to show that \(f_n(x) = \frac{1}{1 + x^{2n}}\) does not converge uniformly on \([0, 2]\).
Show answer
The pointwise limit is 1 on \([0, 1)\), \(\frac{1}{2}\) at 1 and 0 on \((1, 2]\). It is discontinuous, so the convergence of these continuous functions cannot be uniform.
Compute \(\lim \int_0^1 \frac{\sin(nx)}{n}\,dx\) in two ways.
Show answer
Directly, \(\big|\int_0^1 \frac{\sin nx}{n}\big| \le \frac{1}{n} \to 0\). By theorem 3.3, the integrands converge uniformly to 0, so the limit is \(\int_0^1 0 = 0\).
Show that \(f_n(x) = (1 + \frac{x}{n})^n\) converges uniformly to \(e^x\) on \([0, 1]\) using Dini.
Show answer
For \(x \ge 0\) the sequence increases in \(n\) (by the AM–GM inequality) and converges to \(e^x\). The functions and the limit are continuous on the compact interval \([0, 1]\), so Dini applies.
Give an example of differentiable \(f_n \to f\) uniformly on \([-1, 1]\) with \(f\) not differentiable.
Show answer
\(f_n(x) = \sqrt{x^2 + \frac{1}{n}}\) converges uniformly to \(|x|\).
Let \(f_n(x) = \frac{x}{n}e^{-x/n}\) on \([0, \infty)\). Show \(f_n \to 0\) pointwise but not uniformly, while \(\int_0^\infty f_n = n\).
Show answer
At each \(x\), \(f_n(x) \le \frac{x}{n} \to 0\). The sup of \(te^{-t}\) is \(\frac{1}{e}\), attained at \(x = n\). Substituting \(x = nt\), \(\int_0^\infty f_n = n\int_0^\infty te^{-t}\,dt = n\).
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.