Hunter Liu's Website

1. Compactness, Uniform Convergence, and the Weierstrass M-Test

Table of Contents | 2. The Diagonalisation Argument and Equicontinuity ≫

We’re going to kick off the new quarter with a review of some important concepts (namely, compactness and uniform convergence) before introducing a very useful tool called the Weierstrass M-Test.

Compact Metric Spaces

One of the biggest ideas in human history is the idea of “convergence”, which allows us to handle things like series, derivatives, integrals, etc. in a mathematically rigorous manner. Specifically, if \(\left( X, d \right)\) is a metric space, then we know what it means for a sequence \(\left\lbrace x_n \right\rbrace\) to converge to a limit \(x_\infty\).

There are three main ways for a sequence to fail to converge:

  1. \(\left\lbrace x_n \right\rbrace\) gets closer and closer to a “hole” in \(X\): the sequence \(x_n=\left( 1+\frac{1}{n} \right)^n\) is Cauchy in \(\mathbb{Q}\), but does not have a rational limit.
  2. \(\left\lbrace x_n \right\rbrace\) “spreads out” and never clumps up: the sequence \(x_n=n\) does not have a limit in \(\mathbb{Q}\) either.
  3. \(\left\lbrace x_n \right\rbrace\) “oscillates” between two ore more different values: \(x_n=(-1)^n\) does not spread out or get close to a missing point in \(\mathbb{Q}\), but fails to converge nonetheless.

Hopefully, you recognise that the first condition describes how \(\mathbb{Q}\) is not complete: it’s missing a lot of points that “should exist”. Note that the property of completeness does not depend on the topology induced by the metric; rather, it’s a property of the metric itself — see last quarter’s notes for more.

Often times, we’ll want to work with complete metric spaces because we won’t be “missing any points”. Limits will exist when they should exist, and this rules out case 1 from happening. However, sequences can still fail to converge if there’s too much space to “spread out”: \(\mathbb{R}\) is a good example of this.

You hopefully recognise that compactness is a way of saying that space is limited, hence sequences that fail to converge in a compact space must be teetering between several different points. There are two ways to phrase this idea of compactness: a metric-based definition and a topology-based definition.

Definition 1. Sequential Compactness

A metric space \(\left( X, d \right)\) is seqentially compact if every sequence \(\left\lbrace x_n \right\rbrace\) has a converging subsequence.

Definition 2. Covering Compactness

A metric space \(\left( X,d \right)\) is covering compact if for every open cover \(\left\lbrace U_\lambda \right\rbrace _{\lambda\in \Lambda}\) (that is, a collection of open sets \(U_\lambda\) such that \(\bigcup _{\lambda\in \Lambda}U_\lambda=X\)) has a finite subcover, i.e. \(X=U _{\lambda_1}\cup\cdots\cup U _{\lambda_n}\) for some \(\lambda_1,\ldots, \lambda_n\in \Lambda\).

Unlike completeness, the notion of compactness is purely topological. This makes a lot of intuitive sense if you identify “compact” with “topologically very small” (though what it means to be “topologically small” can have many different intuitive meanings).

Theorem 3.

A metric space is covering compact if and only if it is sequentially compact.

Remark 4.

For those of you that want to study topology more, it’s worth mentioning that separable metric spaces are also “topologicall small”, though they’re a bit “bigger” than compact spaces. Rather than open covers admitting finite subcovers, open covers instead admit countable subcovers, which is the “next smallest thing” after being finite.

This idea of “countable infinity is a small infinity” manifests itself all the time: the ability to construct partitions of unity on (topological) manifolds requires some countability assumptions, for instance. Pathologies like the long line illustrate what goes wrong when things get “too big”.

Let’s remind ourselves of a few facts about compact spaces that will (probably) be very relevant later on. If you haven’t seen any of these before, it’s a good idea to sit down and try to prove them as an exercise (or just learn the proofs from a textbook).

Theorem 5. Heine-Borel

A subset \(S\subseteq \mathbb{R}^n\) is compact (under the Euclidean metric) if and only if it is closed and bounded.

Proposition 6.

Let \(X\) be a compact metric space and \(Y\) any metric space. Every continuous function \(f:X\to Y\) is uniformly continuous.

Theorem 7.

Let \(\left( X,d_X \right)\) be a compact metric space and \(\left( Y,d_Y \right)\) be a complete metric space. Let \(C\left( X, Y \right)\) be the set of all continuous functions from \(X\) to \(Y\), and define the uniform metric \(d_\infty\) as \[d_\infty(f, g) = \sup _{x\in X} d_Y\left( f(x), g(x) \right).\] Then \(C\left( X, Y \right)\) is complete with respect to \(d_\infty\).

This theorem is of critical importance! This space of functions is typically not compact (the constant functions can “spread out” if \(Y\) is not compact), but we will see later on in this course a characterisation of certain compact and dense subsets of this space.

Proposition 8.

Let \(X\) be a compact metric space and \(Y\) any metric space. Let \(f:X\to Y\) continuous. Then \(f(X)=\left\lbrace f(x) : x\in X \right\rbrace\) is a compact subset of \(Y\).

Uniform Convergence

Returning to the uniform metric introduced above, we can immediately guess what it means for a sequence of (continuous) functions \(\left\lbrace f_n \right\rbrace\) on a compact metric space \(X\) to be uniformly Cauchy or uniformly convergent. Unpacking the definitions allows us to restate these definitions for situations where \(X\) is not compact (which is not uncommon):

Definition 9.

Let \(\left( X,d_X \right)\) and \(\left( Y,d_Y \right)\) be metric spaces, and let \(f_n:X\to Y\) be functions for every \(n\).

\(\left\lbrace f_n \right\rbrace\) is uniformly Cauchy if for every \(\epsilon>0\), there exists some \(N_\epsilon\) such that \(n,m>N_\epsilon\) implies \(d_Y\left( f_n(x),f_m(x) \right)<\epsilon\) for every \(x\in X\). \(\left\lbrace f_n \right\rbrace\) converges uniformly to a function \(f_\infty\) if for every \(\epsilon>0\) there exists some \(N_\epsilon\) such that \(n>N_\epsilon\) implies \(d_Y\left( f_n(x), f_\infty(x) \right)<\epsilon\) for every \(x\in X\).

We would like to restate our theorem from before in this setting; unfortunately, the metric may fail to be well-defined (exercise: why?). Rather, we get “shadows” of this fact as follows:

Proposition 10.

Let \(X\) be a metric space and let \(Y\) be a complete metric space. Let \(f_n:X\to Y\) be a sequence of functions. Then \(f_n\) converges uniformly to a limit if and only if \(f_n\) is uniformly Cauchy.

Proposition 11.

Let \(X\) and \(Y\) be metric spaces. Let \(f_n:X\to Y\) be a sequence of continuous functions that converge uniformly to a function \(f_\infty:X\to Y\). Then \(f_\infty\) is continuous.

The proofs of these two facts closely mimic the proof of the aforementioned theorem; this is left as a review exercise for the curious reader!

Hopefully all of these facts are familiar to you. During lecture yesterday, you should have also seen a new theorem about uniform convergence:

Theorem 12. Dini's Theorem

Let \(X\) be a compact metric space, and let \(\left\lbrace f_n \right\rbrace\) be a sequence of continuous functions \(f_n:X\to \mathbb{R}\) such that for each \(x\in X\), the sequence of real numbers \(\left\lbrace f_n(x) \right\rbrace\) is increasing. Suppose that \(f_\infty(x) = \lim _{n\to\infty} f_n(x)\) exists for each \(x\) and is continuous. Then \(f_n\to f_\infty\) uniformly.

Of course, this theorem does not work if the domain is not compact. For instance, consider the sequence of functions \[f_n(x) = \begin{cases} 1 & x < n, \\ n+1-x & n \leq x \leq n+1, \\ 0 & n+1< x,\end{cases}\] defined on \(\mathbb{R}\to \mathbb{R}\). This sequence increases pointwise to the constant function \(1\), but does not converge uniformly. Draw a picture, and think about how the proof of Dini’s theorem uses compactness in its argument!

The Weierstrass M-Test

One great application of the theory of uniform convergence is the Weierstrass M-test, which can be used to demonstrate the absolute and uniform convergence of a series on a compact set. The proof is very straightforward because we know some background on uniform convergence.

Theorem 13. Weierstrass M-Test

Let \(X\) be a metric space, and let \(f_n:X\to \mathbb{R}\) be a sequence of continuous functions. Suppose for each \(n\) there exists some \(M_n\in \mathbb{R}\) such that \(\left\lvert f_n(x) \right\rvert\leq M_n\) for all \(n\). Suppose additionally that \(\sum _{n=1}^{\infty}M_n<\infty\). Then the series \[\sum _{n=1}^{\infty}f_n(x)\] converges uniformly on \(X\) to a continuous function.

Proof

The series converges uniformly if and only if its partial sums are uniformly Cauchy; hence, we will show that for any \(\epsilon>0\), there exists some \(N_\epsilon\) such that \(n,m>N_\epsilon\) implies \(\left\lvert \sum _{j=n}^{m} f_j(x) \right\rvert < \epsilon\) for all \(x\in X\).

Since \(\sum _{j=1}^{\infty}M_j\) converges, there exists some \(N_\epsilon\) such that \(n,m>N_\epsilon\) implies \(\sum _{j=n}^{m}M_j<\epsilon\). Then, we have (by spamming the triangle inequality) that for all such \(n\) and \(m\), \[\left\lvert \sum _{j=n}^{m} f_j(x) \right\rvert\leq \sum _{j=n}^{m}\left\lvert f_j(x) \right\rvert\leq \sum _{j=n}^{m}M_j<\epsilon.\] Thus the partial sums are uniformly Cauchy, hence they converge uniformly to a limit. The uniform limit of continuous functions is continuous. \(\square\)

We will most often see this theorem applied to Taylor series and power series; sometimes, we will be very lucky and the conditions of the Weierstrass M-test will be met with no blood, sweat, or tears. But very often we will have to sweat a little, and less often we may even shed tears. I hope you never lose blood over the Weierstrass M-test.

Example 14.

Show that the series \(\sum _{n=0}^{\infty}\frac{x^n}{n!}\) converges to a continuous function on \(\mathbb{R}\).

You probably recognise this function as \(e^x\), and in calculus you probably cited Taylor’s theorem to obtain this fact. However, we have no such luxuries, and we would like to prove this fact using the techniques of real analysis.

Dini’s theorem is already out of the question. The series is not monotone when \(x<0\), and even if it were, we have no hope of applying Dini’s theorem on a non-compact domain. Thus, we should hope to apply the Weierstrass M-test (especially in a section titled as such), but an astute student may realise that the summands \(\frac{x^n}{n!}\) are unbounded when \(n>0\).

There is a neat trick: we instead restrict the domain to \(\left[ -N,N \right]\) for arbitrary positive integers \(N\), where we can apply the Weierstrass \(M\)-test. It then follows that for every \(N\), the series converges uniformly on \(\left[ -N,N \right]\) to a continuous function, hence the series converges on all of \(\mathbb{R}\) to a continuous function!

Remark 15.

While the pointwise convergence does extend by applying the Weierstrass M-test to each interval, we cannot hope for uniform convergence to extend to all of \(\mathbb{R}\). Of course the series does not converge uniformly on all of \(\mathbb{R}\); in general, the uniformity will not carry over because the \(N_\epsilon\)’s we implicitly carry around will ultimately depend on \(N\) (i.e., the size of our domain).

To make this more rigorous, fix any positive integer \(N\). Let \(f_n(x) = \frac{x^n}{n!}\). For \(n>2N\), we have that \[\left\lvert \frac{x^n}{n!} \right\rvert \leq \frac{N^n}{n!} = \frac{N ^{2N}}{(2N)!} \cdot \frac{N ^{n-2N}}{(2N)(2N+1)\cdots (n-1)(n)} \leq \frac{N ^{2N}}{(2N)!} \cdot \left( \frac{1}{2} \right) ^{n-2N}. \] Thus, we define \(M_n=\sup _{x\in \left[ -N,N \right]} \left\lvert f_n(x) \right\rvert<\infty\) when \(n< 2N\) and we define \(M_n=\frac{N ^{2N}}{(2N)!}\cdot \left( \frac{1}{2} \right) ^{n-2N}\) for \(n\geq 2N\).

Of course we have \(\left\lvert f_n(x) \right\rvert\leq M_n\) for all \(n\), and moreover, \[\sum _{n=1}^{\infty} M_n= \sum _{n=1}^{2N-1}M_n + \sum _{n=2N}^\infty M_n = \sum _{n=1}^{2N-1}M_n+\frac{N ^{2N}}{(2N)!}\sum _{n=2N}^{\infty} \left( \frac{1}{2} \right) ^{n-2N}.\] The first sum is just a finite number, and the sum on the right converges since it’s just a geometric series. By the Weierstrass M-test, \(\sum _{n=1}^{\infty}f_n(x) = \sum _{n=1}^{\infty} \frac{x^n}{n!}\) converges to a continuous function on \(\left[ -N,N \right]\). Since \(N\) is any positive integer, we conclude that the series converges on all of \(\mathbb{R}\).