Piecewise linear continuous approximation of continuous function

analysisreal-analysissequence-of-function

Let $f:\mathbb{R} \rightarrow \mathbb{R}$ be a continuous function. Does there exist a sequence of piecewise linear continuous function such that $f_n \rightarrow f$ pointwise?.

Best Answer

Assume wlog that $f(x)=0$ for all $x\in\Bbb Z$ (by subtracting a suitable piecewise linear function if necessary). Given $\epsilon>0$, we can construct piecewise linear $g$ with $|g-f|_\infty<\epsilon$. Indeed, for each $x\in \Bbb R$, there exists $\delta=\delta(x)>0$ such that $|f(y)-f(x)|<\frac\epsilon2$ for all $y$ with $|y-x|<\delta(x)$. The open intervals $(x-\frac12\delta(x),x+\frac12\delta(x))$ with $n\le x\le n+1$ cover the compact interval $[n,n+1]$, hence so does already a finite subcover. Let $x_0=n<x_1<\ldots <x_m=n+1$ be the centres of these finitely many intervals. Let $g$ be the piecewise linear interpolation of $f$ though the places $x_i$ in $[n,n+1]$ and accordingly in all other unit intervals between consecutive integers. The $|g-f|_\infty<\epsilon$ because for $0\le i<m$, we have $|x_i-x_{i+1}|<\max\{\delta(x_i),\delta(x_{i+1})\}$ and hence for $x\in[x_i,x_{i+1}]$ either $|g(x)-f(x)|\le |g(x)-g(x_i)|+|f(x)-f(x_i)|<\epsilon$ or $|g(x)-f(x)|\le |g(x)-g(x_{i+1})|+|f(x)-f(x_{i+1})|<\epsilon$.

By the above, we can even achieve $f_n\to f$ uniformly.

Related Question