understanding the solution of a given Lebesgue integration. The question and its solution are given below:




My questions are:
I am supposed to calculate the Lebesgue integration of the function $f$ on the interval $[0, \pi/2]$, why the solution divides the interval $[0, \pi/2]$ into what is shown in the picture? depending on what theorem? I am suspecting if this solution is correct, could anyone tell me the correct solution?
Thanks!
 A: Your solution is not correct. Since $$m\{x\mid \cos(x)\in \mathbb Q\}=0,$$
you have $$\int_0^{\pi/2}f(x)\,\mathrm d x=\int_0^{\pi/2}\sin^2(x)\,\mathrm d x.$$
A: A simpler approach: $\cos x$ takes any particular value only in a countbale set. Hence $\{x: \cos x \in \mathbb Q\}$ is a countable set. But countable sets have measure $0$. Hence the given integral is same as $\int_0^{\pi /2} \sin^{2}x dx=\frac {\pi} 4$. 
A: I think that your solution is not correct. 
You must use the fact that the integral of  each integrable function $f$ on a set of measure equal to $0$ is $0$.
But $m(cos^{-1}(\mathbb{Q}))=0$, so 
$\int_0^{\frac{\pi}{2}}fdx =\int_{[0,\frac{\pi}{2}]\cap cos^{-1}(\mathbb{Q})}fdx + \int_{[0,\frac{\pi}{2}]\cap cos^{-1}(\mathbb{Q})^c}fdx =$
$=0+ \int_{[0,\frac{\pi}{2}]\cap cos^{-1}(\mathbb{Q})^c}fdx=$
$= \int_{[0,\frac{\pi}{2}]\cap cos^{-1}(\mathbb{Q})^c}sin^2(x)dx=$
$= \int_{[0,\frac{\pi}{2}]\cap cos^{-1}(\mathbb{Q})}sin^2(x)dx + \int_{[0,\frac{\pi}{2}]\cap cos^{-1}(\mathbb{Q})^c}sin^2(x)dx=$
$= \int_{[0,\frac{\pi}{2}]}sin^2(x)dx$
Now you can compute this integral because the function $sin^2(x)$ is smooth and the domain of integration is an interval,  so the Lebesgue integral is the Riemann integral.
