Find an increasing sequence of step functions which converges pointwise everywhere to the function$$ f(x)=\chi_{[0,1] \cap \Bbb Q} (x) · x. $$
I know how to approximate a non-negative measurable function by an increasing sequence of non-negative simple functions. But I do not know the way of approximating any non-negative measurable function by an increasing sequence of step functions. Would anybody please help me finding this? Actually I want to know the geometrical approach behind that kind of approximations which will enable me to solve these types of problems on my own.
Please help me in this regard. Any geometrical approach will be appreciated.
Thank you very much.
Since a singleton in $\mathbb{R}$ is a degenerate interval, defining$$ A_m = \{ k \in \mathbb{Z} \mid 1 \leqslant k \leqslant m,\ (k, m) = 1 \},\\ f_n(x) = \sum_{m = 1}^n \sum_{k \in A_m} \frac{k}{m} χ_{\{\frac{k}{m}\}}(x), $$ then $\{f_n\}$ is an increasing sequence of step functions and converges to $f$ pointwise.