Proving that a measurable function on $\mathbb{R}$ is nearly continuous

lebesgue-measuremeasure-theoryreal-analysis

Q) Prove that for any measurable function $f:\mathbb{R}\to \mathbb{C}$ and $\epsilon > 0$, there exists a continuous $g:\mathbb{R}\to \mathbb{C}$ such that the set $\{x\in \mathbb{R}: f(x)\neq g(x)\}$ Lebesgue measure is less than $\epsilon$.

I know this would be true if the domain of $f$ were a finite measure set, say $E$, by Lusin's theorem. May I know how to generalize this to $\mathbb{R}$?
By Lusin's, $\exists F_n\subset E$, $F_n$ closed s.t. $m(E-F_n)<\epsilon$ and $g_n:=f|_{F_n}$ is continuous and thus $m(f\neq g_n) \leq m(E-F_n)<\epsilon$.

Best Answer

Luzin's Theorem can be generalized to the whole space.

So you can find a closed subset $F \subseteq \Bbb{R}$ such that $m(F^c)<\epsilon$ and $g=f|_F$ is continuous.

By Tietze's theorem $g$ can be extended to a continuous function $G$ on the whole real line.

Thus $m(\{f \neq G\}) \leq m(F^c) <\epsilon$