let's consider the function $$f: [0,1] \to \mathbb{R}^+, \quad f(x) = \begin{cases} x^{-a} & x \in \mathbb{Q} \; \text{and} \; x>0\\ 0 & \text{otherwise}. \end{cases}$$ for some $a \geq 1$.
Is it correct to conclude that this function is Lebesgue integrable, since $f$ differs from the constant function $g (x) = 0$ only on a null set?
The function $$\tilde{f}: [0,1] \to \mathbb{R}^+, \quad \tilde{f}(x) = \begin{cases} x^{-a} & x \in \mathbb{Q}\\ 0 & \text{otherwise}. \end{cases}$$ differs from $f$ only on a null set, but is not defined at $x=0$. Is it still possible to make sense of the Lebesgue integral of $\tilde{f}$ over the closed interval $[0,1]$ ?