I am trying to prove the next:
Let $f\in\mathcal{L}_p(\mathbb{R},\mathcal{A}_{\mathbb{R}}^*,\overline{\lambda)},$ $p\in[1,+\infty),$ and $\epsilon>0$ given.
Then there is $A=A(\epsilon)>0$ and $g:\mathbb{R}\rightarrow\mathbb{R}$ continuous with $g(x)=0$ for all $x\notin[-A,A]$ such that $||f-g||<\epsilon.$
Here $\mathcal{A}_{\mathbb{R}}^*$ is the $\sigma-$algebra of Lebesgue and $\overline{\lambda}$ the Lebesgue measure on $\mathbb{R}.$
I was using Lusin's theorem to give a continuous map $g_{\epsilon}:\mathbb{R}\rightarrow\mathbb{R}$ for each $\epsilon>0$ such that $\overline{\lambda}(\{x\in\mathbb{R}:f(x)\neq g_{\epsilon}(x)\})<\epsilon,$ but I cannot see how to use this to give to $g$ the asked property.
I was thinking to use regularity of Lebesgue measure to give two disjoint closed subsets, one of them a compact set of the form $[-A,A]$ of $\mathbb{R}$ and give a continuous function on $\mathbb{R}$ such that $0\leq f(x)\leq 1$ for each $x \in\mathbb{R}$ and $f(x)=0 \in\mathbb{R}-[-A,A] $ and $f(x)=1 \in [-A,A] $ but in this way I don't know how to ensure that $||f-g||<\epsilon.$
Any kind of help is thanked in advanced.