\[
\newcommand{\C}{\mathbb{C}}
\newcommand{\haar}{\mathsf{m}}
\newcommand{\P}{\mathcal{P}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\N}{\mathbb{N}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\d}{\mathsf{d}}
\newcommand{\g}{>}
\newcommand{\l}{<}
\newcommand{\intd}{\,\mathsf{d}}
\newcommand{\Re}{\mathsf{Re}}
\newcommand{\area}{\mathop{\mathsf{Area}}}
\newcommand{\met}{\mathop{\mathsf{d}}}
\newcommand{\emptyset}{\varnothing}
\newcommand{\B}{\mathscr{B}}
\]
In the context of the measure space $(\R,\mathsf{Bor}(\R),\lambda)$ where $\lambda$ is the Lebesgue measure, verify each of the following functions is $(\mathsf{Bor}(\R),\mathsf{Bor}(\R))$ measurable and calculate its integral. For optional fun, determine which of these functions is Riemann integrable.
- $f(x) = 1_\mathbb{Q}(x)$
- $f(x) = 1_{[\pi,\infty)}(x) \cdot \dfrac{|\sin(x)|}{x}$
- $f(x) = 1_{[0,1]}(x) \cdot x^2$
- $f(x) = 1_{(0,1)}(x) \cdot \dfrac{1}{2\sqrt{x}}$
- $f(x) = \begin{cases} \tfrac{1}{q} & x = \tfrac{p}{q} \textsf{ in lowest terms} \\ 0 & x \in \R \setminus \mathbb{Q} \end{cases}$