I have Thomae's Function defined as follows:
$f(x): [0,1] \to \mathbb R$
$f(x) = q$ if $x$ is rational and $x = p/q$, $0$ otherwise (please note that this is the usual definition of Thomae's function, just with the difference in $q$ and $1/q$
I need to show that $f$ is Lebesgue integrable and compute its integral. I know its value is $0$, however I'm unsure how to start. I think this definition of Thomaes's Function is confusing me, as we are dealing with $q$ and not $1/q$. I found this to be helpful: Integral of Thomae's function, however it involves Thomaes's Function with $f$ taking on the value $1/q$.
Any assistance would be appreciated.
EDIT: I believe this boils down to showing that the function is zero a.e. (and thus the integral is zero), but again, I'm unsure how to begin.