Here is the proof as it is given in the book:
My questions are:
1- Why the author assumed that $a \in (0,1),$ what about the case of $a=0$?
2- Why if $f(x) < \epsilon$ then $|f(x)| < \epsilon$ in our case here?
Could anyone help me in answering those questions please?


The autor says that he is only considering the cases where $a$ is an irrational number, this is why he's pick $a \in (0,1)$.
Well, since $f(x) \geq 0$ for any $x$, $f(x) < \varepsilon$ if and only if $-\varepsilon < f(x) < \varepsilon$, that is, $f(x) < \varepsilon$ if and only if $|f(x)| < \varepsilon$.