Is a continuous function necessarily the pointwise limit of a sequence of uniformly continuous functions

continuitypointwise-convergencereal-analysisuniform-continuityuniform-convergence

The pointwise limit of a sequence of uniformly continuous functions needn't be continuous. I've been wondering about the converse:

Is a continuous function $f$ necessarily the pointwise limit of some sequence of uniformly continuous functions $(f_n)_{n\in\mathbb{N}}$?

I'm having trouble establishing or disproving this.

Best Answer

If the domain of $f$ is $\Bbb R$, then the answer is yes. The proof is quite easy: let $f_n: \Bbb R \to \Bbb R$ defined by $$f_n(x)= \begin{cases} f(-n) & x<-n \\ f(x) & -n \le x \le n \\ f(n) & x>n \end{cases}$$ these are uniformly continuous and they pointwise converge to $f$.