Real Analysis – Extension of Continuous Function on a Closed Subset of $\mathbb{R}$

continuityreal-analysis

Any help with this problem is appreciated. It comes up in the context of Lusin's theorem, where it was assumed to be true.

Suppose $E$ is a closed subset of $\mathbb{R}$ and $f:E\rightarrow \mathbb{R}$ is continuous. There exists a continuous function $g: \mathbb{R} \rightarrow \mathbb{R}$ such that $f(x)=g(x)$ for $x \in E$ and $g$ satisfies $$\sup_{x \in \mathbb{R}} |g(x)| \leq \sup_{x \in E} |f(x)|\;.$$

Best Answer

$\Bbb R\setminus E$ is open, so it can be written as a union of pairwise disjoint open intervals. (Infinite intervals, e.g. $(a,\to)$, are permitted.)

Suppose that $(a,b)$ is one of these intervals; extend $f$ to $(a,b)$ by defining

$$g(x)=\frac{f(b)-f(a)}{b-a}(x-a)+f(a)$$

for $x\in(a,b)$. In other words, just make the graph of $g\upharpoonright[a,b]$ the straight line segment with endpoints $\langle a,f(a)\rangle$ and $\langle b,f(b)\rangle$. If $(a,\to)$ is one of the intervals, let $g(x)=f(a)$ for $x>a$. And if $(\leftarrow,a)$ is one of the intervals, let $g(x)=g(a)$ for $x<a$. The resulting function $g$ clearly has the desired properties.

Related Question