Uniformly continuous function approximated by Lipschitz Let $f~:~\mathbb R \to \mathbb R$ a uniformly continuous function.
How could I construct a sequence $(f_n)_{n\ge 0}$ of Lipschitz functions such that $(f_n)$ uniformly converges towards $f$? 
 A: f uniformly continuous $\Rightarrow$ for all $\epsilon > 0$ there exists a $\delta = \delta(\epsilon) > 0$ such that $|x-y| < \delta \Rightarrow |f(x) - f(y)| < \epsilon$. 
The idea is to build a piecewise linear approximation to $f$ (which will clearly be Lipschitz). For each $n$, we can build $f_n$ in the following way:


*

*Choose $\epsilon_n = \frac{1}{n}$. Then by the above defn. of uniform continuity, there exists a corresponding $\delta = \delta_n$ such that $|x-y| < \delta_n \Rightarrow |f(x) - f(y)| < \frac{1}{n}$

*Divide $\mathbb{R}$ into intervals of size $\frac{\delta_n}{2}$. Build $f_n$ by just evaluating $f$ at the endpoints of these intervals and linearly interpolating within each interval. 

*We know that $f$ can't grow by more than $\frac{1}{n}$, within one of these subintervals. so all of the linear pieces have a bounded slope. To fully check whether $f_n$ is Lipschitz, you have to choose arbitrary $x,y \in \mathbb{R}$ and check the Lipschitz condition, not just $x,y$ within one of these subintervals, so I'll leave it to you to check that. 

*Within each interval, $f$ can't differ from the value of $f$ at the left endpoint by more than $\frac{1}{n}$ by uniform continuity, and similarly, the value of $f_n$ can't differ by the value of $f$ at the left endpoint by linearity within the interval, so by the triangle inequality, $||f_n - f||_{L^\infty} \le \frac{2}{n}$. 

*Taking the limit as $n \rightarrow \infty$ shows uniform convergence. 
