Can we construct $g(x)\in C^1[a,b]$ such that $\int_a^b |f(x)-g(x)| \, dx<\varepsilon$ without Weierstrass approximation theorem? Let $f(x)$ be a Riemann integrable function on $[a,b]$, and forall $\varepsilon>0$,  can we construct a continuously differentiable function $g(x)$ such that $\int_a^b |f(x)-g(x)| \, dx<\varepsilon$ without using Weierstrass approximation theorem?
 A: Here is one way. The idea is straightforward, the details tedious.
Since $f$ is Riemann integrable, there is some partition $P$ such that
$U(f,p) - L(f,P) < \epsilon$.
Suppose the partition is $x_0=1,x_1,...,x_n=b$. Define the (discontinuous) step function $l(x) = \inf_{t \in [x_k,x_{k+1}]} f(t) $ for $x \in [x_k,x_{k+1})$ and $l(b) = l(x_{n-1})$. 
For convenience extend $f$ to the right by defining $f(x) = f(b)$.
Note that $l$ is Riemann integrable, $f(x) \ge l(x)$ for all $x$, and
$\int_a^b l(x) dx = L(f,P)$, so $\int_a^b |f(x)-l(x)| dx < \epsilon$.
Now we need to smooth the function $l$ out a bit:
Given an integrable function $f$ and $\tau>0$, define $\sigma_{f,\epsilon}$ as follows;
$\sigma_{f,\tau} (x) = { 1\over \tau} \int_x^{x+\tau} f(t) dt$. 
(Aside: Note that we can write $\sigma_{f,\tau} = f \star {1 \over \tau } 1_{[-\tau,0]}$.)
A little work shows that if $l$ is a step function, then $ \sigma_{l,\tau} $ is a
piecewise 'linear' function. Furthermore, if $l$ is bounded by $M$, then
$\int_a^b |l(x)-\sigma_{l,\tau}(x)| dx \le 2 (n+1)\tau M$, in particular, we can
pick $\tau$ such that $\int_a^b |l(x)-\sigma_{l,\tau}(x)| dx < \epsilon$. Let $l_1 = \sigma_{l,\tau}$.
Now repeat the process, note that if $h$ is continuous then
$\sigma_{h,\tau}$ is continuously differentiable and since
$h(x)-\sigma_{h,\tau}(x) = {1 \over \tau} \int_x^{x+\tau} (h(x)-h(t)) dt $,
we see that $h$ converges to $\sigma_{h,\tau}$ uniformly and so
$\lim_{\tau \to 0} \int_a^b |h(x)-\sigma_{h,\tau}(x)| dx = 0$.
As above,
choose $\tau$ such that
$\int_a^b |l_1(x)-\sigma_{{l_1},\tau}| dx < \epsilon$, and let $l_2 = \sigma_{{l_1},\tau}$.
Then $\int_a^b |f(x)-l_2(x)| dx < 3 \epsilon$.
