2
Suppose that $f:\mathbb{R}\rightarrow\mathbb{R}$ is continuous on $\mathbb{R}$ and that $f(r) = 0$ for every rational number $r$. Prove that $f(x) = 0$ $\forall$ $x \in \mathbb{R}$

Ok, here's what I've done:

Let $c \in \mathbb{Q}$.
Since, $f$ is continuous so $\forall \epsilon > 0$ $\exists \delta > 0$ such that $\forall x \in (c-\delta, c+\delta)$, we should have $|f(x)| < \epsilon$. Now, let $d \in (c-\delta, c+\delta) \cap \mathbb{R} \setminus \mathbb{Q}$, $|f(d)| < \epsilon$. Since $\epsilon$ is arbitrary, we have $f(d) =0$

Hence, $\forall c \in \mathbb{Q}$, $\exists \delta > 0$ such that $\forall$ $|x-c| < \delta$, $f(x) = 0$

From here, how do I deduce that $f(x) = 0$ $\forall x \in \mathbb{R}$?

(Just to mention : I can intuitively think that it should be true because like you can go on taking union of these neighbourhoods but I was unable to rigorously prove it)

kishlaya
  • 1,317
  • An elegant way to prove the claim would be using that the rational numbers are dense in $\mathbb R$ – Peter Nov 16 '16 at 14:15
  • Related (but this is far more general): https://math.stackexchange.com/questions/1084018/if-two-continuous-maps-into-a-hausdorff-space-agree-on-a-dense-subset-they-are – Watson Nov 16 '16 at 14:16
  • This is not quite good enough. You pick your $d$ after being given your $\epsilon$. That means that if you choose a smaller $\epsilon$, then your $\delta$ might be smaller, which means that we no longer have $d \in (c-\delta, c+\delta)$, so you can't say that $|f(d)| < \epsilon$ while $\epsilon$ gets smaller and smaller. It's easier to make this work if you let let $c$ be irrational and show that $f(c) < \epsilon$ by finding rational $d\in (c-\delta, c+\delta)$ – Arthur Nov 16 '16 at 14:16
  • @Peter Can you give me some hints on how to proceed with that idea? – kishlaya Nov 16 '16 at 14:21
  • @Watson I came across that but like I am a beginner with analysis, so I don't know much about Hausdorff space! I'll try to read about them next. Thanks! – kishlaya Nov 16 '16 at 14:25
  • @kishlaya Every irrational number $u$ is the limit of some sequence $(a_n)$ containing rational numbers. Since $f(x)=0$ holds for all rational numbers, the sequence $f(a_n)$ with rational $a_n$'s has only zeros. Hence, the limit is $0$. If $f$ is continous, we can conclude that $f(u)=0$, if $u$ is the limit of the sequence. – Peter Nov 16 '16 at 14:25
  • @Arthur Oh yes! I see. Thanks for pointing that out. – kishlaya Nov 16 '16 at 14:26
  • @Peter Oh wow! That was superb. Thanks. – kishlaya Nov 16 '16 at 14:27

4 Answers4

3

The step following "since $\epsilon$ is arbitrary..." is not quite right.

You have shown that if $d \in (c-\delta, c+\delta) \cap \mathbb{R} \setminus \mathbb{Q}$, then $|f(d)|< \epsilon$. You want to say that you could just make epsilon smaller and smaller; the problem with this is that $\delta$ depends on $\epsilon$. If you want $|f(d)|< \frac{\epsilon}{2}$, you might need to be in a smaller interval $(c-\eta, c+\eta)$ for some $\eta< \delta$. So you cannot conclude that $|f(d)|<\epsilon$ for all $\epsilon>0$, just for the epsilon you chose.

The slickest way to prove this is to use the fact that $f$ is continuous if and only if for every sequence $(x_n)$ such that $\lim_{n \to \infty}x_n \to x_0$, we have $\lim_{n \to \infty}f(x_n) \to f(x_0)$. If you let $x_0 \in \mathbb{R} \setminus \mathbb{Q}$, can you choose a sequence $(x_n)$ so that $\lim_{n \to \infty} f(x_n)=0$? (This works if $f(x_n)=0$ for all $n$...)

If you want to go the delta-epsilon route, then given $c \in \mathbb{R}\setminus \mathbb{Q}$, you know for all $\epsilon>0$ there exists $\delta>0$ such that for all $x \in (c-\delta,c+\delta)$, $|f(x)-f(c)|< \epsilon$. In particular, for each $\epsilon$ and corresponding $\delta$, there will be an $x \in (c-\delta,c+\delta) \cap \mathbb{Q}$. What can you conclude from that?

kccu
  • 20,808
  • 1
  • 22
  • 41
  • Yep! Got it. Just choose a sequence of rational numbers which converges to some irrational and that works.

    And using delta-epsilon route, we can choose $c \in \mathbb{R}\setminus\mathbb{Q}$ so that $\forall \epsilon > 0$ $\exists \delta > 0$ such that $\forall x \in (c-\delta, c+\delta)\cap\mathbb{Q}$ we have $|f(x) - f(c)| = |-f(c)| = |f(c)| < \epsilon$. SInce we can always find a rational in the interval $(c-\delta, c+\delta)$, so $f(c) = 0$. Am I right here?

    – kishlaya Nov 16 '16 at 16:00
  • Yep, you got it. – kccu Nov 16 '16 at 16:11
2

Only thing that remains to show is that $f(r)=0\forall r\in \Bbb Q^c$

Since $\Bbb Q$ is dense in $\Bbb R$ so given $r\in \Bbb Q^c;\exists r_n\in \Bbb Q$ such that $r_n\to r$

$f$ is continuous so $r_n\to r\implies f(r_n)\to f(r)\implies f(r)=0$

Learnmore
  • 31,062
2

Let $x\in\mathbb R$. By continuity, $f(x)=\lim_{y\to x}f(y)$. Since this limit exists, it is independent of the manner of approach $y\to x$; specifically, we may assume that $y\to x$ through rational values since $\mathbb Q$ is dense in $\mathbb R$. But then $f(x) = \lim_{y\to x} 0 = 0$.

MPW
  • 43,638
2

A slightly more topological approach:

Theorem: Let $(X, \tau_X)$, $(Y, \tau_Y)$ be two topological spaces. Suppose $Y$ is Hausdorff and that $D \subset X$ is a dense subset in $X$. Let $f,g: X \to Y$ be two continuous functions such that $f_{|D}=g_{|D}$. Then $f=g$ on $X$.

The theorem is proven in this question.

Now, $f_{|\mathbb Q}=0$ and $\mathbb Q$ is dense in $\mathbb R$, which is Hausdorff. By the previous theorem, $$f=0$$

Lonidard
  • 4,253