Find all points where $f(x)$ is continuous Let $f:\mathbb{R} \rightarrow \mathbb{R}$ a function. If $x$ is irrational $f(x)=0$, otherwise if $x=\frac{p}{q}$ ($p$,$q$ are integers, $q>0$ and $\gcd(p,q)=1$) then $f(x)=\frac{1}{q}$. Find all points where $f(x)$ is continuous.
 A: If $x\in\mathbb Q$, then $f(x)>0$. But any interval $(x-\varepsilon,x+\varepsilon)$ contains irrational points and at those points the value of $f$ is $0$. Therefore, $f$ is not continuous at $x$.
On the other hand, is $x\in\mathbb{R}\setminus\mathbb{Q}$, then $f(x)=0$. Take $\varepsilon>0$. The open interval of length $1$ centered at $x$ contains only finitely many numbers $y$ such that $f(y)\geqslant\varepsilon$. Pick $\delta>0$ such that $(x-\delta,x+\delta)$ contains no such point. Then$$|y-x|<\delta\Longrightarrow\bigl|f(y)-f(x)\bigr|<\varepsilon.$$
A: Let $\theta \in \mathbb{R} \setminus \mathbb{Q} $. Given $\epsilon > 0
$  choose $ \frac{1}{N_{\epsilon}} < \epsilon$
Note that $ {N_{\epsilon}}$ is being a finite number, the number of rationals of the form $\frac{1}{q} > \frac{1}{{N_{\epsilon}}} $is finite.
Congest  interval $(\theta−1,\theta+1)$ down to $ (\theta−q,\theta+q)$ such that all these $1/q$ are tossed out, leaving only rationals $\frac{1}{q} < \frac{1}{{N_{\epsilon}}} < \epsilon$.
It follows that if $|x -b| < \delta$ then $ |f(x) - f(b) | = |f(x)| \leq \frac{1}{{N_{\epsilon}}} < \epsilon$.
