# Measurable indicator function that cannot be approximated by a continuous sequence $f_n$

Resnick's exercise 3.15 asks the following:

Suppose $-\infty<a\leq b<\infty$. Show that $1_{(a,b]}(x)$ can be approximated by bounded and continuous functions. That is, show $0\leq f_n \leq 1$ such that $f_n\rightarrow 1_{(a,b]}$ pointwise.

Question: First, below is my attempt at a solution (any comments, corrections, etc. are welcomed. Second, my question is if there exists a measurable indicator function that cannot be approximated in this way, and if so, how to show/find it.

Attempt at solution:

Resnick offer's a helpful hint that I believe makes the first part simple enough.

Let $f(x) = 1_{(a,b]}$ as stated.

If I define a sequence of measurable functions, $f_n$ such that: $f_n(x) = \begin{cases} 0, & x \leq a, x \geq b + \frac1n \\ 1, & a + \frac1n < x \leq b \end{cases}$ and linear otherwise

(formatting note...I am unsure how to use the large one-sided bracket for this function)

I believe this is sufficient to show the result, as the limit of the sequence meets the criteria. Please comment on any deficiencies.

Secondary question How is this result changed in order to find measurable functions that cannot be approximated as such. My intuition tells me this result, if it exists, can't be in the form of intervals, but what other measurable functions could it utilize? Indicator functions on sets?

Thanks as always!

-
For the secondary question, see math.stackexchange.com/questions/15088/… – Jonas Meyer Jun 6 '12 at 2:21
Regarding the formatting: use the cases environment. – Dylan Moreland Jun 6 '12 at 5:53