I'am trying to understand Lebesgue integration
Compute $\int_{0}^{\pi}$ f(x)dx
Where
$f(x) = \begin{cases} sin x & \text{ if } x \in \mathbb{I} \\ cosx & \text{ if } x \in \mathbb{Q} \end{cases}$
I tried this
(L)$\int_{[0,\pi]} f(x) dx = (L)\int_{[0,\pi] \cap \mathbb{Q}} f(x)dx + (L)\int_{[0,\pi] \cap \mathbb{I}} f(x)dx = (L)\int_{[0,\pi] \cap \mathbb{Q}} cos x dx + (L)\int_{[0,\pi] \cap \mathbb{I}} sinxdx = (R)\int_{[0,\pi]} cos x dx + (R)\int_{[0,\pi]} sinxdx = \int_{0}^{\pi} (sinx+cosx)dx = sin(\pi) - sin(0) + - (cos(\pi) - cos(0)) = 0 - (-2) = 2$
Is my sollution correct? Can you recommend any good materials with emamples of lebesgue integration?
Thank you!
Note that the set $\Bbb Q$ has Lebesgue measure zero. Thus, we outright have
$$\int_{[0,\pi] \cap \Bbb Q} \cos(x)dx = 0$$
since a subset of the rationals will obviously have measure zero. Similarly, $\Bbb I \cap [0,\pi]$ has Lebesgue measure $\pi$ as result since $\Bbb I = \Bbb R \setminus \Bbb Q$. In doing so, we notice that
$$\int_{[0,\pi]} f(x)dx = \int_0^\pi \sin(x)dx$$
as a result. Your answer still ends up being correct, but only by chance: the working is wrong.