Problem: Let the function $f$ be defined such that $$ f(x)=\begin{cases} 1 \quad x\in\mathbb{R}\backslash\mathbb{Q}\\ 2 \quad x\in \mathbb{Q}\end{cases}.$$
Compute the folowing integral: $\quad$$\int_0^1 f(x)\,dx$.
Would it be $1$ because there are infinitely many irrational numbers between each rational number?
I don't even know where to start with this.
Riemann integral: $\int_0^1 f(x) dx$ is undefined, because the refinement of the partition of the interval does not result in a converging Riemann sum.
Lebesgue integral: $f\equiv 1$ almost everywhere, because the rational numbers are a countable set, which means that they are a set of measure zero and do not have any impact on the result. Therefore, $\int_0^1 f(x) dx = 1$