Consider the function over [0,1] given by $f(x)= \begin{cases} 0 & x \in \mathbb{Q}\\ x & x \notin \mathbb{Q} \end{cases}$
In order to compute the Lebesgue integral of $f$ we need to find an increasing sequence of simple functions which are all less than or equal to and converge to $f$.
I was thinking if the function $f_{n}(x)= \frac{1}{n}\lfloor nx \rfloor$ , $x \notin \mathbb{Q}$, would work.
Thanks in advance!
Did you mean the function $f_n(x)=\frac1n \lfloor nx\rfloor$ if $x\notin \Bbb Q$ and $0$ otherwise? It's the step function with $n$ steps with all rationals set to $0$.
If so, yes, that works. Each step covers a set of the form $[\frac in,\frac{i+1}n]\backslash\Bbb Q$, which is Lebesgue measurable.