How to write down, think about, and evaluate a simple Lebesgue integral I sometimes come across integrals of the following form, which I think are related to the Lebesgue integral:
$$\int_A f(x)d\mu(x).$$
What does the $d\mu(x)$ mean? I think this means integrate with respect to outer measure $\mu$ over $A$, which takes into account a covering of values $x\in A$. Could someone perhaps provide an example of how to evaluate such integrals for some specific example to galvanize my thoughts/understanding further.
My attempt at an example: Suppose $A=\mathbb{R}$ and $f(x)=1_\mathbb{Q}(x)$ is the indicator function for the rationals. Since the rationals are countable we can construct a cover of $\mathbb{Q}$ of the form $$I_i=\left[q_i-\frac{1}{2N^i},q_i+\frac{1}{2N^i}\right],$$ where $q_i\in\mathbb{Q}$. Then the integral is written (?) and evaluated (?) like this,
$$\int_\mathbb{R} f(x)d\mu(x)=\sum_{k=0}^\infty\lambda^*(I_i)=\sum_{i=0}^\infty \frac{1}{N^i}=\frac{1}{N-1}\to 0$$ as $N\to\infty$.
I'm unsure whether I've written some (or all !) things correctly, and whether I'm on the right lines.
 A: If $\mu$ is the lebesgue measure and $f=1_{\mathbb Q}$, then$$\int fd\mu= f\cdot \mu(\mathbb Q)=0$$
In general case, if $\nu$ is a measure, and $f$ is a simple function, i.e. $f=\sum_{i=1}^n a_i\chi_{A_i}$ where $A_i$ are measurable, then $$\int fd\nu=\sum_{i=1}^n a_i\nu(A_i).$$
A: In this case, $\mu$ denotes some positive measure, not an outer measure, and the integral is indeed a Lebesgue integral. But you can consider that an outer measure is a first step towards a measure. This is a classic way to construct the Lebesgue measure. The Lebesgue measure is the measure, denoted by $\lambda$ or just $dx$ which gives you a "good" generalization of the Riemann integral. That's why, if you replace $\mu$ by specifically the Lebesgue measure, you obtain
$$\int_Af(x)dx$$
So if the Riemann integral over $A$ of $f$ exists, you can consider you integral as being equal to it. The difference is that the Lebesgue integral can be used to integrate many more functions than those that are just Riemann-integrable: measurable functions.
