Question about approximating measurable functions with continuous functions.

80 Views Asked by At

I faced the following question:

Prove that every Lebesgue measurable function $f:[0,1] \rightarrow \mathbb{R}$ is a limit almost everywhere of a sequence $\{f_n\}$ of continuous functions. Is it always possible to choose this sequence to be monotone?

I have proved the first part but I am not sure about the second part. I believe it is not always possible to choose this sequence to be monotone but I don't have any example. (I am thinking about Dirichlet function).

any help would be appreciated.