A Lovely Approximation Theorem

Problem 1. Let f : [0, 1] \to \mathbb R be a continuous function. Prove that there exists a continuous function g : [0, 1] \to \mathbb R with the following property:

For any \epsilon > 0, there exists a finite set \{x_0,x_1,\dots,x_n\} with x_0 = 0, x_n = 1 such that each g|_{[x_i,x_{i+1}]} is a linear function and

x \in [0,1] \quad \Rightarrow \quad |f(x) - g(x)| < \epsilon.

In approximation-theoretic terms, we say that f can be uniformly approximated by a piecewise linear function.

To solve this problem, we need the uniform-continuity property of continuous functions. We won’t define uniform continuity formally, but still prove the key quantitative result.

Problem 2. Let f : [a, b] \to \mathbb R be a continuous function. Then for any \epsilon > 0, there exists \delta > 0 such that for any x,y \in [a,b],

|x - y| < \delta \quad \Rightarrow \quad |f(x) - f(y)| < \epsilon.

Concisely, continuous functions on compact sets are uniformly continuous.

(Click for Solution)

Solution. We will prove this lemma by way of contradiction. Suppose the negation of the conclusion holds. Particularising to \delta = 1/n, there exists \epsilon_0 > 0 such that for any n \in \mathbb N, there exist x_n, y_n \in [a, b] with the property

\displaystyle |x_n - y_n| < \frac 1n \quad \wedge \quad |f(x_n) - f(y_n)| \geq \epsilon_0.

Now, the sequences \{x_n\}, \{y_n\} are both bounded, and thus have convergent subsequences by the Bolzano-Weierstrass theorem. Thus, without loss of generality, we will assume x_n \to x and y_n \to y.

(Remark. This technique is known as passing to a subsequence, which is commonly further abbreviated into the phrase compactness argument.)

Since f is continuous at x \in [a, b], there exists \delta > 0 such that

\displaystyle |x - u| < \delta \quad \Rightarrow \quad |f(x) - f(u)| < \frac{\epsilon_0}{2}.

Since x_n \to x, there exists N_1 \in \mathbb N such that

\displaystyle n > N_1 \quad \Rightarrow \quad |x_n - x| < \frac{\delta}{2}.

By the Archimedean property, find N_2 \in \mathbb N such that 1/N_2 < \delta/2. Then, for n > \max\{N_1,N_2\},

\begin{aligned} |x - y_n| &\leq |x - x_n| + |x_n - y_n|  < \frac{\delta}{2} + \frac 1n < \frac{\delta}{2} + \frac{\delta}{2} = \delta \end{aligned}

implies

\begin{aligned} \epsilon_0 \leq |f(x_n) - f(y_n)| &\leq |f(x_n) - f(x)| + |f(x) - f(y_n)| < \frac{\epsilon_0}{2} + \frac{\epsilon_0}{2} = \epsilon_0, \end{aligned}

a contradiction.

With this lemma at hand, we can now prove our elegant approximation theorem. Let’s restate the problem for clarity.

Problem 1 (Restated). Let f : [0, 1] \to \mathbb R be a continuous function. Prove that there exists a continuous function g : [0, 1] \to \mathbb R with the following property:

For any \epsilon > 0, there exists a finite set \{x_0,x_1,\dots,x_n\} with x_0 = 0, x_n = 1 such that each g|_{[x_i,x_{i+1}]} is a linear function and

x \in [0,1] \quad \Rightarrow \quad |f(x) - g(x)| < \epsilon.

(Click for Solution)

Solution. Fix \epsilon > 0. Using Problem 2, find \delta > 0 such that for any x, y \in [a, b],

\displaystyle |x - y| < \delta \quad \Rightarrow \quad |f(x) - f(y)| < \frac{\epsilon}{2}.

By the Archimedean property, find n \in \mathbb N such that 1/n < \delta. Define x_i = i/n for i = 0, 1,\dots,n. Define g by

\displaystyle g(x) = \frac{f(x_{i+1}) - f(x_i)}{1/n} \cdot (x - x_i) + f(x_i),\quad x \in [x_i, x_{i+1}].

One can check that g : [0, 1] \to \mathbb R is a well-defined continuous function with f(x_i) = g(x_i) and g|_{[x_i,x_{i+1}]} being a linear function for each i.

Fix x \in [a, b]. Then there exists i =0,1,\dots,n such that x \in [x_i, x_{i+1}]. Thus,

\begin{aligned} |f(x) - g(x)| &\leq |f(x) - f(x_i)| + |f(x_i) - g(x)| \\&\leq |f(x) - f(x_i)| + |g(x) - f(x_i)| \\ &= |f(x) - f(x_i)| + n \cdot |f(x) - f(x_i)| \cdot |x-x_i| \\ &< |f(x) - f(x_i)| + n \cdot |f(x) - f(x_i)| \cdot \frac 1n \\ &= 2 \cdot |f(x) - f(x_i)| < 2 \cdot \frac{\epsilon}{2} = \epsilon, \end{aligned}

where the last inequality follows from |x-x_i| < 1/n < \delta.

—Joel Kindiak, 25 Dec 24, 1847H

,

Published by


Leave a comment