0

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.

Arctic Char
  • 16,972

1 Answers1

0

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.

macton
  • 679