3

The question is: Prove that if $f:\mathbb{R}\to\mathbb{R}$ is continuous and $f(x) = 0$ whenever $x$ is rational, then $f(x) = 0$ for all $x\in\mathbb{R}$.

My proof:

Let $ x\in\mathbb{R} $. If $ x\in\mathbb{Q}$, then $ f(x)=0 $.

Otherwise $ x\in\mathbb{R\backslash Q} $. Then there exists a sequence of rational numbers $ (q_n)_{n\in\mathbb{N}}$ (for example $q_n= \frac{\lfloor{nx\rfloor}}{n} ,\forall n\in\mathbb{N}$) such that $q_n\to x$ as $n\to \infty$. By the properties of $f$, we have $f(q_n)=0$ for all $n\in\mathbb{N}$. So $f(q_n)\to 0$ as $n\to \infty$. Since $f$ is continuous, $q_n\to x$ implies that $f(q_n)\to f(x)=0$. So $f(x) = 0$ for all $x\in\mathbb{R}$.

Thank you for any help.

  • This is correct. – copper.hat May 11 '16 at 17:30
  • You don't really need the "if $x\in \Bbb Q$" special case as even then there is a sequence of rational numbers converging to $x$. – Arthur May 11 '16 at 17:30
  • Oh okay. Thank you so much. – Jammie Dodger May 11 '16 at 17:31
  • 2
    Re: Arthur's observation - while the observation is correct, I prefer the way you (Jammie) wrote it. It is just a little longer, but it makes it plainly obvious that you do, in fact, need some sort of "non-trivial" argument for irrationals, while for rational values of $x$ you don't. Well done! –  May 11 '16 at 17:34
  • As an aside, this proof can easily be extended to show that a continuous function is completely determined by its values on the rationals. – Andres Mejia May 11 '16 at 17:40
  • @AndresMejia Could you elaborate further on this? – Jammie Dodger May 11 '16 at 17:48
  • http://math.stackexchange.com/questions/379899/why-is-every-continuous-function-on-the-reals-determined-by-its-value-on-rationa – Andres Mejia May 11 '16 at 18:05

2 Answers2

2

Your proof is great (and correct, of course)! In fact, you went above and beyond the usual proof by providing an example sequence $q_n$.

Ben Grossmann
  • 234,171
  • 12
  • 184
  • 355
0

Your proof is correct and strictly determined and that's how it must be, also it's really good that you provided an example sequence (the $q_n$).

Rebellos
  • 21,666