Hi Gowri;
I think the best you can do in approximating such function is Lusin's
Theorem, which is sometimes very useful. Anyways, here I provide a
counter example to your result (which I hope is right).
There exists a sequence {En} of disjoint measurable sets on R such
that
(i) the measure of En is less than 2^n
(ii)there exists a countable basis {In} of the topology of R then En
intersects In in a set of positive measure for every n
(note that you use this construction to solve exercise 8 of Rudin
Chapter 2)
Now consider the function f=sigma{(1/2)^n * (Characteristic function
of En)/ (measure of En)}. Then since the En are disjoint f converges
everywhere. It is easy to see that the L1 norm of f is finite, but its
integral on any interval of R is infinite. This last fact proves that
even if you change f on a set of measure 0, it will remain
discontinuous.
But you tell me: "f may not be in L^infinity". Then take the function
g=exp{-f} then g is bounded and is continuous if and only if f is
continuous (here we needed the fact that f is never infinite, which
explains my choice of this particular f rather than more easier
examples satisfying almost the same properties as f).
g is in L^infinity (bounded). If I can change g on a set of measure 0
to make it continuous then the same is true for f, which is a
contradiction.
Please check the above counter example and keep me in touch if
something is wrong.
Best Regards;
Zaher Hani