The question was:
Find $\int_{[0, \pi/2]} f$ if $$f(x) = \begin{cases} \sin{x}, & if \cos(x) \in \mathbb{Q}, \\ \sin^2{x}, & if \cos(x) \not\in \mathbb{Q}. \end{cases}$$
My answer was:
Assume that $0 \leq x \leq \pi/2$, then taking the cosine of this, we get $\cos 0 \geq \cos x \geq \cos (\pi/2),$ so, $1 \geq \cos (x) \geq 0$ (because $\cos (x)$ is a decreasing function in this interval.)\
Now, by monotonicity of measure $$m\{x \in [0, \pi/2] \mid \cos(x)\in \mathbb Q\} \subseteq m\{[0, \pi/2] \cap \mathbb{Q}\}.$$
But,$m\{[0, \pi/2] \cap \mathbb{Q}\} = 0.$\
This is because $\mathbb{Q}$ is countable and hence its measure is 0 and $\{[0, \pi/2] \cap \mathbb{Q}\} \subset \mathbb{Q}$, then by monotonicity of measure $m\{[0, \pi/2] \cap \mathbb{Q}\} = 0.$\
And since the integral of each integrable function $f$ on a set of measure equal to $0$ is $0$, we have:\
$\int_{[0, \pi/2]} f = \int_{[0, \pi/2] \cap \mathbb{Q}} f + \int_{[0, \pi/2] \cap \mathbb{Q}^c} f = 0 + \int_{[0, \pi/2] \cap \mathbb{Q}^c} f = \int_{[0, \pi/2] \cap \mathbb{Q}^c} \sin^2{x} = \int_{[0, \pi/2] \cap \mathbb{Q}} \sin^2{x} + \int_{[0, \pi/2] \cap \mathbb{Q}^c} \sin^2{x} dx = \int_{[0, \pi/2]} \sin^2{x} dx,$\
Where in the last equality we have changed the Lebesgue integral over $[0, \pi/2]$ into Riemann integral over $[0, \pi/2]$ because our function $\sin^2{x}$ is Riemann integrable and bounded by $[0,1]$ and the domain of integration is closed and bounded interval then by \textbf{ Theorem 3, on page 73} the Lebesgue integral is the Riemann integral.\
Now we can compute this integral:\
$$\int_0^{\pi/2}f(x)\,\mathrm d x=\int_0^{\pi/2}\sin^2(x)\,\mathrm d x = \int_0^{\pi/2} \{ \frac{1 - \cos{2x}}{2} \} d x = \frac{\pi}{4} - ( \frac{1}{4} \times 0) = \frac{\pi}{4}. $$
But it turns out that:
My justification in this step:
$$m\{x \in [0, \pi/2] \mid \cos(x)\in \mathbb Q\} \subseteq m\{[0, \pi/2] \cap \mathbb{Q}\}.$$ was wrong, could anyone help me correct this step please?