# Prove there exists a continuous function

Let $f$ be a measurable real-valued function on an interval $[a,b]$. Prove that given $\delta>0$ there is a continuous function $\phi$ on $[a,b]$ such that $m(\{x: f(x) \ne g(x)\}) < \delta$. Is the same true for a function $f$ defined on $\mathbb R$?

-
Hint: Use Lusin's theorem and the Tietze extension theorem for the first part. For the second one note that $\delta = \sum_{n \ge 1} \delta 2^{-n}$ and decompose $\mathbb R$ into intervals –  martini May 12 '12 at 18:35
I've added TeX to your question (math rendering). You should check where you want to write $f$, $g$ and $\phi$, the question seems to be mixed-up a little. –  Martin Sleziak May 12 '12 at 18:37
Martini, can you please provide a decomposition of R into the intervals you are talking about? I got the first part down by heart. But I'm still very confused by the second. Thank you! –  Jason May 20 '12 at 20:18