1

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.

L.A.
  • 335
  • If $x_0$ is irrational and $\epsilon>0$ then there are only finitely many $q$ such that $1/q>\epsilon$. Therefore in a small neighborhood around $x_0$ we have $0\leq f(x)<\epsilon$. So, it is continuous at irrationals $x_0$. If $x_0$ is rational then $f(x_0)=1/q>0$ for some $q$. If $\epsilon = 1/(2q)$ then there are irrationals $x$ arbitrarily close to $x_0$ and we would have $|f(x_0)-f(x)|=1/q>1/(2q)$. Therefore it is discontinuous at $x_0$ rational. – Peyton Aug 04 '17 at 13:47
  • It is the very standard result. It is continuous on every irrational points. Proof is found in elementary real analysis books. –  Aug 04 '17 at 14:09
  • 1
  • See also: https://math.stackexchange.com/questions/2128197/prob-18-chap-4-in-baby-rudin-fx-0-for-x-irrational-and-fx-1-n-for –  Aug 04 '17 at 14:43

2 Answers2

1

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.$$

  • why does the first statement prove that f(x) is discontinuous at x? – Joseph Dec 02 '17 at 16:14
  • @Hugh If $f$ was continuous at $x$, then, since $f(x)\neq0$, there would be a $\varepsilon>0$ such that $|y-x|<\varepsilon\implies\bigl|f(y)-f(x)\bigr|<\bigl|f(x)\bigr|\implies f(y)\neq0$. – José Carlos Santos Dec 02 '17 at 16:18
  • I am not good at these topics but I found them interesting. So I guess what you stated above is the definition of what a continuous function is? – Joseph Dec 02 '17 at 16:20
  • @Hugh Almost. A function $f$ is continuous at $a$ if, for every $\varepsilon>0$, there is a $\delta>0$ such that $|x-a|<\delta\implies\bigl|f(x)-f(a)\bigr|<\varepsilon$. – José Carlos Santos Dec 02 '17 at 16:26
  • I understand that. But above when you say f(y) is not equal to zero implying that the function is not continuous. Why is that? Thank you! – Joseph Dec 02 '17 at 16:27
  • @Hugh That's what my answer to your first comment was about. – José Carlos Santos Dec 02 '17 at 16:28
1

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$.