How can I decide whether this function is integrable?

85 Views Asked by At

A function $f$ is defined on $[0,1]$ such that for every

  1. irrational number in $[0,1]$, $f(x)=1$ and
  2. rational number in $[0,1]$, $f(x) = \dfrac{a-2}{a}$, where $a$ is the smallest natural number for which $ax$ is an integer.

Does $\int_0^1 f(x)dx$ exist? If yes, what's the value?

I have a hunch that it is not integrable, but somehow unable to proceed.

1

There are 1 best solutions below

2
On

Consider $g(x) = 1-f(x)$, so it suffices to solve $$ \int_{[0,1]}f(x) dx = 1 - \int_{[0,1]} g(x) dx $$ where $g(x)$ is almost the Thomae's function as comments mentioned, and you can refer to here for a proof, you just need to modify a little.