= Solution
The <Tietze extension theorem> states: if $X$ is a <normal topological space>, $A\subseteq X$ is closed, and $f:A\to[-M,M]$ is continuous, then there is a continuous $F:X\to[-M,M]$ with $F|_A=f$.
We first prove an approximation lemma. Given continuous $h:A\to[-r,r]$, the closed subsets
$$
A_-=\{x\in A:h(x)\leq-r/3\},
\qquad
A_+=\{x\in A:h(x)\geq r/3\}
$$
are disjoint and closed in $X$. By the <Urysohn lemma>, there is a continuous $g:X\to[-r/3,r/3]$ equal to $-r/3$ on $A_-$ and $r/3$ on $A_+$. Then
$$
|h-g|\leq\frac{2r}{3}\quad\hbox{on }A.
$$
Starting with $h_0=f$ and $r_0=M$, apply the lemma recursively to obtain continuous $g_j:X\to\mathbb R$ such that
$$
\|g_j\|_\infty\leq\frac{r_j}{3},
\qquad
h_{j+1}=h_j-g_j|_A,
\qquad
\|h_{j+1}\|_\infty\leq r_{j+1},
$$
where $r_j=M(2/3)^j$. The series
$$
F=\sum_{j=0}^\infty g_j
$$
converges uniformly by the Weierstrass test, so its sum is continuous. On $A$, its remainder after $j$ terms is $h_{j+1}$, which tends uniformly to zero; hence $F|_A=f$. The bounds also keep $F$ in $[-M,M]$ after the standard endpoint-preserving version of the construction, proving the theorem.
Back to article page