Proof of a theorem saying that we can make a measurable function continuous by altering it by a set of arbitarily small measure I found the following problem in the book of kolmogorov fomin Introductory real analysis (p.293 problem 10) which I have no idea how to show.
Prove that a function $f$ defined on a closed interval $[a,b]$ is $m$ measurable if and only if given any $\epsilon>0$ there is a continuous function $g$ on $[a,b]$ such that $m${$x:f(x)\neq g(x)$}$<\epsilon$
Hint use Egorov's theorem  
Does anyone have any idea how to prove this
Thanks in advance
 A: A way to approach such problems systematically is to begin with $f = \chi_{(c,d)}$ for some open subinterval of $[a,b]$. Then move to $f = \chi_E$ where $E$ is a finite disjoint union of open intervals, then $f = \chi_E$ where $E$ is Lebesgue measurable, then $f$ simple, then $f$ nonnegative and measurable, then $f$ measurable.
Can you prove it for $f = \chi_{(c,d)}$? If so, how far along the process can you go until you get stuck?
A: Suppose $f$ and $\epsilon$ are given.
First discard a set of small measure to make $f$ bounded.  The continuous
functions $g_n(x) = \dfrac{1}{2n} \int_{x-1/n}^{x+1/n} f(t) \; dt$ converge pointwise almost everywhere to $f$ (Lebesgue's differentiation theorem).
Egorov says that convergence is uniform on the complement of a set of small measure. Discarding another set of small measure, we have a compact set on which the convergence is uniform. The limit of a uniformly convergent sequence of continuous functions is continuous.  Then use the Tietze extension theorem to extend this continuous function to all of $[a,b]$. 
