For each $x \in [0, 1]$, let
$$ f(x)= \begin{cases} \frac{1}{n},& \text{if } x=\frac{k}{n}, \text{for some }k,n\in \mathbb{N} &\text{with } \ g.c.d(k, n)=1\\ 0, & \text{otherwise} \\ \end{cases}$$
Evaluate the Lebesgue integral $\int_{[0, 1]}f dm$.
For each $x \in [0, 1]$, let
$$ f(x)= \begin{cases} x^2,& \text{if } x=\frac{1}{2^n},\text{for some }n \in \mathbb{N}\\ x^3 , &\text{if } x=\frac{1}{3^n},\text{for some }n \in \mathbb{N}\\ x^4, & \text{otherwise} \\ \end{cases}$$
Evaluate the Lebesgue integral $\int_{[0, 1]}f dm$.
My work: For question (1) I consider two partitions $\mathbb{Q} \cap [0, 1]$ and $\mathbb{Q^c} \cap [0, 1]$ then I get $L(p,f)=U(p, f)=0$ and the result of the integration is zero.(check this answer) but how to approach the 2nd question. please help to understand.