8

Suppose that $f:\mathbb{R} \rightarrow \mathbb{R}$ is continuous on $\mathbb{R}$ and that $f(r)=0$ for all $r \in \mathbb{Q}$. Prove that $f(x)=0$ for all $x \in \mathbb{R}$.

My attempt: Define a sequence $(x_n)$ where $x_n \in \mathbb{Q}$ for all $n \in \mathbb{N}$ and assume that $(x_n) \rightarrow a \not\in \mathbb{Q}$. Since $f$ is continuous, we have $\lim_n{f(x_n)}=f(a)=0$. Since $a$ is arbitrary irrational number, we have $f(a)=0$ for all $a \not\in \mathbb{Q}$. Hence, we proved the statement.

Is my proof valid? or is there any flaw ?

Idonknow
  • 15,643
  • Looks good to me. – Alex Becker Mar 28 '13 at 15:27
  • The idea is fine, the writeup is clear. Minor point. You should have started with "Let $a$ be irrational. There is a sequence $(x_n)$ of rationals such that $\dots$." Whether the proof is acceptable depends on your course context. Has the fat that there is such a sequence been proved? Has the fact that if $f$ is continuous then $\lim f(x_n)=f(\lim x_n)$ been proved? – André Nicolas Mar 28 '13 at 15:36
  • @André Nicolas Are you serious? Does he needs to prove also that irrational numbers exist? Or that the axioms for the real numbers define reals uniquely up to an isomorphism? –  Mar 28 '13 at 15:59
  • @Thus: It's a reasonable point that a course-acceptable proof will only use results that are available to the students. – Cameron Buie Mar 28 '13 at 16:08
  • @Cameron Buie Isn`t it obvious that the original poster in the proof knows the results about which is Andre speaking if he uses them in his proof? –  Mar 28 '13 at 16:11
  • The OP does not need to prove irrationals exist: the result would be vacuously true if they didn't. (That was a joke.) But to be serious, in a first analysis course, one has to be careful to avoid taking for granted "facts" that were treated less formally in an earlier course. So what a good proof is depends very much on which results have already been rigorously established. – André Nicolas Mar 28 '13 at 16:12
  • @André Nicolas So what if you were an assistant on the college and were in a process of valuating my test. Suppose also that I am a first year student and that the exam was in the calculus of functions of real variable, and, while reading my test, you observe that I solved some integral correctly but not with methods of real analysis but with methods of complex analysis, which is on the third year but I somehow know about methods used therein. Now if you need to decide whether to give me minimal 0 points because I used methods not teached in the class or maximal 20 points, what would you do? –  Mar 28 '13 at 16:33
  • @Thus: I think there is not a close analogy, since the point of the usual "Rudin"-style course is systematic development. – André Nicolas Mar 28 '13 at 16:59
  • @André Nicolas Well, it is not about analogy, I just wanted to know what would you do in the situation I described above? If you do not want to answer it, it is okay also. –  Mar 28 '13 at 17:02
  • On the calculus question, I have not seen the details of the hypothetical answer. As a guess, a pretty high mark. But if the question asked for a proof that $\sum \frac{1}{n^2}\lt 2$, and the answer used the $\frac{\pi^2}{6}$ result, low mark. – André Nicolas Mar 28 '13 at 17:18
  • @Thus: It isn't obvious to me. In fact, if you read the OP's first comment under Dominic's answer, you'll find that the OP wasn't even sure that you can define such a sequence. It never hurts to make sure. – Cameron Buie Mar 28 '13 at 17:41
  • @Cameron Buie Good example of mathematical blasphemy. I thought that OP (OP, did you know this?) knows that every irrational number can be expressed as a number with non-terminating decimal part and from that it is obviously obvious that such a number can be seen as a sequence of fractions which have that irrational number as a limit. –  Mar 28 '13 at 17:49
  • non-terminating fractional part –  Mar 28 '13 at 18:01

3 Answers3

5

Maybe you should be more explicit why it works (mentioning that every irrational number is a limit of a sequence of rationals (taking decimal digits will be the canonical way)).

Every irrational has a unique decimal expansion (if we avoid recurring (?) 9). So when $x$ is irrational we know $$x=\sum_{k=-m}^\infty a_k 10^{-k}$$ with $a_k \in \{ 0,1,2,3,4,5,6,7,8,9\}$, and $m \in \mathbb{N}$ When we take the sequence $$b_n=\sum_{k=-m}^n a_k 10^{-k} $$ with the same $a_k$ as in $x$ we see that $b_n$ converges to $x$. But every $b_n$ is an rational.

Yeah it does work, but it would be even easier using intermediate value theorem, as between two irrational is always an rational and vice versa all values must be zero.

4

As long as you know that you can define such a sequence, then your argument is perfect.

Perhaps an easier way to go is to note that since $f$ is continuous, then the preimage of any closed set is closed. In particular, the preimage of $\{0\}$ is closed, and the only closed set of reals containing the rationals is the whole real line. Hence, $f\equiv 0$.

Cameron Buie
  • 102,994
3

Assume $f$ is not identically zero, so there must exist some irrational $s$ such that $f(s) \neq0$, By continuity there is some neighbourhood of $s$ where $f \neq0$, but since $\mathbb Q$ is dense in $\mathbb R$, this is not possible. And you have your result.