I'm having trouble understanding the implication Rudin makes here at the last two sentences.
How do the integrals look like (1):
I was thinking they are like this:
$$ \int_X g d\mu = \sum_{k=1} ^{\infty} \int_X \chi_{E_{k}} d \mu $$
I'm having trouble how this is (1)...
There are two major facts employed here. The first is that we can interchange the series sign with integral sign by a suitable application of the monontone convergence theorem. The second is that $\int_{A} g = \int g1_{A}$ for all measurable $A$.