The exercise states:
Let $a,b\in\mathbb{R}$, $a<b$ and let $(C[a,b],\Vert\cdot\Vert)$ denote the vector space of continuous real functions on $[a,b]$ endowed with the uniform norm. Let $C^1[a,b]\subset C[a,b]$ denote the set of continuously differentiable functions and define $$ M_K=\{f\in C[a,b]: |f(x)-f(y)|\leq K|x-y|\quad\mathrm{for\;every\;}x,y\mathrm{\;in\;}[a,b]\}\\ A_K=\{f\in C^1[a,b]: |g'(x)|\leq K \quad\mathrm{for\;every\;}x\mathrm{\;in\;}[a,b]\} $$ Show that $\bar{A_K}=M_K$
I've shown that $M_K$ is closed and therefore, the fact that $A_K\subset M_K$ implies $\bar{A_K}\subset M_K$ but I couldn't prove the other inclusion. My attempt so far was to take advantage of the fact that we are dealing with a metric space and hence it will suffice to show that every $f\in M_K$ can be approximated by a sequence of functions in $A_K$. This is somehow equivalent to show that every Lipschitz function can be approximated by continuously differentiable functions, but this is something I couldn't show.
So...could you please give me some hints to solve this? Thank you in advance.
One approach was pointed out by Christian Remling in a comment: use the fact that Lipschitz functions are absolutely continuous, hence represented as an indefinite integral of an $L^1$ function. Approximate that function by a continuous one, truncating to size if necessary. Then integrate.
Here is another, more direct approach. Extend $f$ to $\mathbb{R}$ by letting $f(x)=f(a)$ for $x<a$ and $f(x)=f(b)$ for $x>b$. This is still a Lipschitz function, same constant. Let $f_\epsilon$ be the convolution of $f$ with a standard mollifier $\phi_\epsilon$. Then
Hence, $|f'|\le K$ everywhere.