[Math] Part of proof of the set of continuous integrable functions is dense in $L^1(\Bbb R)$

integrationlebesgue-integralmeasure-theoryreal-analysis

I want to prove: If $g$ belongs to $L(\Bbb R, \Bbb B, \lambda)$ and $\epsilon\gt 0$, then there exists a continuous function $f$ such that $\Vert g-f\Vert_1=\int \lvert g-f\rvert \,\text{d}\lambda \lt \epsilon$.

I know this then implies the set of continuous integrable functions is dense in $L^1(\Bbb R)$
in the metric $d(f,g)=\int_{\Bbb R}|f-g|\,\text{d}\mu$.
Note that $\Bbb B$ denotes the Borel set; $\lambda$ denotes the Lebesgue Measure on $\Bbb R$; $L^1$ denotes space of lebesgue integrable functions. I'm not sure if Show that there exists a continuous function $f$ such that $\int |\chi_A-f| d\lambda\lt \epsilon$ could help deducing the proof. Could someone show how to prove the above statement? Thanks.

Best Answer

You know from Show that there exists a continuous function $f$ such that $\int |\chi_A-f| d\lambda\lt \epsilon$ that for every $\epsilon \gt0$ and every indicator function $\chi_A$ there exists a continuous function $f$ such that $$||\chi_A-f||_1\lt \varepsilon.$$

Step 1: Assume $g$ is a simple function, i.e. it can be written as a linear combination of indicator functions: $$ g = \sum_{i=1}^n \chi_{A_i} .$$ From the above result, we have that for each $i=1,\dots,n$ exists a continuous function $f_i$ with $$||\chi_{A_i}-f_i||_1 \lt \frac{\varepsilon}{n}.$$ Thus, the function $f:=\sum_{i=1}^n f_i$ is continuous and we have $$ || g - f ||_1 \leq \sum_{i=1}^n || \chi_{A_i} - f_i || < \varepsilon.$$ In short: For every simple function $g$ and every $\varepsilon >0$ exists a continous function $f$ with $$ || g - f ||_1 < \varepsilon.$$

Step 2: If $ g $ is integrable, then there exists a sequence of simple functions $g_n$ with $||g_n - g||_1 \to 0$.
From step 1 we have that for any $n \in \mathbb{N}$ a continuous function $f_n$ exists with $|| f_n - g_n || < \frac{1}{n}$. Thus $$ ||f_n -g ||_1 \leq ||f_n - g_n ||_1 + ||g_n -g ||_1 < \frac{1}{n} + ||g_n -g ||_1 \to 0.$$

In short: For every integrable function $g$ and every $\varepsilon >0$ exists a continuous function $f$ with $$ || g - f ||_1 < \varepsilon.$$

Related Question