# if f is continuous almost everywhere , must there exist a function g such that g=f almost everywhere and g is continuous?

if f is continuous almost everywhere , must there exist a function g such that g=f almost everywhere and g is continuous?
I have one example that shows it could happen. Let f be defined as 1 on irrationals and 0 the rationals. Then the constant function g defined as 1 everywhere is such that: g=f a.e. and g is continuous. Thus the statement may be true but I am not able to show why. Thanks for any tips!

No. Consider $f\colon \mathbb R \to \mathbb R$ given by $$f(x) = \begin{cases} 1 & x \ge 0\\ 0 & x < 0\end{cases}$$ $f$ is continuous on $\mathbb R -\{0\}$, but cannot be made into a continuous function by change on a set of measure zero.
• I was thinking about this example and I don't know how to prove that $f$ cannot be made into a continuous function just by changing it on a set of measure zero, could you help me to show this? – user156441 Apr 16 '15 at 1:51