Define the following function $f : \mathbb{R} \to \mathbb{R}$ as follows:
$f(x) = 0$ if $x$ is irrational
$f(x) = 1/n$ if $x$ is rational and $x = \frac{m}{n}$ in lowest terms.
Some googling comes up that this is known as "Thomae's function." I need to prove the integrability of this function AND find its integral over $[0,1]$.
The integrability is shown by proving that the function is continuous at irrationals and discontinuous at rationals and then using the Lebesgue criterion for integrability. However, I'm having trouble finding the value of the integral.
I'm not sure if it is zero or not, which is making it hard for me to come up with a proof method. While the similarly defined Dirichlet function has a integral of 1, the reason I suspect this function might be zero is that the value of many points are, in this case, negligible due to large denominators.