Space of Piecewise Linear Functions on Closed Interval is Dense in Space of Continuous Functions on Closed Interval

From ProofWiki
Jump to navigation Jump to search

Theorem

Let $I = \closedint a b$.

Let $\map \CC I$ be the set of continuous functions on $I$.

Let $\map {\mathrm {PL} } I$ be the set of piecewise linear functions on $I$.

Let $d$ be the metric induced by the supremum norm.


Then $\map {\mathrm {PL} } I$ is dense in $\struct {\map \CC I, d}$.


Proof

Let $f \in \map \CC I$.

Let $\epsilon \in \R_{>0}$ be a real number.

From Open Ball Characterization of Denseness:

it suffices to find a $p \in \map {\mathrm {PL} } I$ such that $p$ is contained in the open ball $\map {B_\epsilon} f$.

From Continuous Function on Closed Real Interval is Uniformly Continuous:

$f$ is uniformly continuous on $I$.

That is:

there exists a $\delta > 0$ such that for all $x, y \in I$ with $\size {x - y} < \delta$ we have $\size {\map f x - \map f y} < \epsilon/3$.

Let:

$P = \{a_0 = a, a_1, a_2, \ldots, a_n = b\}$

be a finite subdivision of $I$, with:

$\size {a_{i + 1} - a_i} < \delta$

for each $i$.

Let $p \in \map {\mathrm {PL} } I$ be such that:

$\map p {a_i} = \map f {a_i}$

for each $i$, with $p$ continuous.

We can explicitly construct such a $p$ by connecting $\tuple {a_i, \map f {a_i} }$ to $\tuple {a_{i + 1}, \map f {a_{i + 1} } }$ with a straight line segment for each $i$.

Fix $x \in I$.

Note that there exists precisely one $i$ such that $a_i \le x \le a_{i + 1}$, fix this $i$.

We then have:

\(\ds \size {\map p x - \map f {a_i} }\) \(=\) \(\ds \size {\map p x - \map p {a_i} }\)
\(\ds \) \(\le\) \(\ds \size {\map p {a_{i + 1} } - \map p {a_i} }\)
\(\ds \) \(=\) \(\ds \size {\map f {a_{i + 1} } - \map f {a_i} }\)
\(\ds \) \(<\) \(\ds \epsilon/3\)

since $\size {a_{i + 1} - a_i} < \delta$.

Since $\size {x - a_i} < \size {a_{i + 1} - a_i} < \delta$, we also have:

$\size {\map f x - \map f {a_i} } < \epsilon/3$

So:

\(\ds \size {\map p x - \map f x}\) \(\le\) \(\ds \size {\map p x - \map p {a_i} } + \size {\map f x - \map f {a_i} }\) Triangle Inequality
\(\ds \) \(<\) \(\ds 2 \epsilon/3\)

Note that $x \in I$ was arbitrary, so:

\(\ds \map d {f, p}\) \(=\) \(\ds \norm {f - p}_\infty\) Definition of Metric Induced by Norm
\(\ds \) \(=\) \(\ds \sup_{x \mathop \in I} \size {\map f x - \map p x}\)
\(\ds \) \(\le\) \(\ds 2 \epsilon/3\)
\(\ds \) \(<\) \(\ds \epsilon\)

so $p \in \map {B_\epsilon} f$.

$\blacksquare$