I have really hard time figuring out how one goes about finding the Lebesgue integrals given a function $f$ and a measure $\mu$.
In my scrip the Lebesgue integral is given as
$$\int f d\mu := \sum_{i=1}^n a_i \mu(A_i)$$
where as I understand $f$ has to be a non-negative simple function, meaning that it has to have a representation as
$$ f = \sum_{i=1}^n a_i \mathbb{1}_{A_i} $$
where $\mathbb{1}_{A_i}$ is the indicator function (equal to $1$ if some $x$ is in the set $A_i$ and $0$ otherwise).
Now I understand that but have not idea of how to solve for the integral any given function. Do I have to first find the summation representation of the function and then make up some partition $A_i$?
For example, following my script, how do i find the Lebesgue integral of the indicator function of the rational numbers in the interval $[0;1]$? Note that I'm not so much interested in solving this particular problem, but more on finding out what the procedure is for solving it, so any explanations in that directions will help.
It appears that you are talking about integrals of simple functions and not more general integrable functions. Suppose you are given a measurable function which takes only finite number of values, say $c_1,c_2,...,c_n$. Let $E_i=f^{-1}\{c_i\}$. Then we can verify that $f=\sum_{i=1}^{n} c_i I_{E_{i}}$. Hence $\int f=\sum_{i=1}^{n} c_i \mu (E_i)$. (Note that we have obtained the representation $f=\sum_{i=1}^{n} c_i I_{E_{i}}$ explicitly).