I want to prove the following result:
If $\left( X, \mathcal{B}, \mu \right)$ is a $\sigma$-finite measure space and $f: X \rightarrow \mathbb{R}$ is a measurable function, then there is a sequence of integrable simple functions which converges pointwise to $f$.
To do so, I am given the hint as contruct $\phi_n: X \rightarrow \mathbb{R}$, as
$$\phi_n = \chi_{X_n} \left( \sum\limits_{k = 1}^{n2^n} \dfrac{k}{2^n} \chi_{f^{-1} \left[ \frac{k}{2^n}, \frac{k + 1}{2^n} \right]} + n \chi_{f^{-1} \left[ n, \infty \right)} \right).$$
Here, $X = \bigcup\limits_{n = 1}^{\infty} X_n$, where $\mu \left( X_n \right) < \infty$ for each $n \in \mathbb{N}$. Now, I can see that each $\phi_n$ is a simple function (since it can take only finitely many values and is defined on measurable sets. Also, it is integrable with the estimate
$$\int\limits_X \phi_n \mathrm{d}\mu = n \mu \left( X_n \right) \left( n 2^{n - 1} + 1 \right).$$
However, what I cannot see (directly) is that why should $\phi_n \to f$ pointwise?