# Thread: Continuous Functions, Rational number/ Irrational number.

1. ## Continuous Functions, Rational number/ Irrational number.

Let $f:[a,b] -> R$ be continuous on $[a,b]$ and suppose that $f(x) = 0$ for each rational number x in $[a,b]$.Prove that $f(x)=0$ $\forall x \in [a,b]$

Ok, Do I need to do a proof by contradiction to prove that $f(x)=0$ $\forall x \in [a,b]$. What it comes down to is proving that $f(x) = 0$ for each irrational number $x \in [a,b]$, right???
Otherwise I don't really see how to do it, I mean even if I do by contradiction the way I thought about doing it was maybe say something like Assume that $f(x) \neq 0$ $\forall x \in [a,b]$
I am not sure... any suggestion?

2. Originally Posted by ynn6871
Let $f:[a,b] -> R$ be continuous on $[a,b]$ and suppose that $f(x) = 0$ for each rational number x in $[a,b]$.Prove that $f(x)=0$ $\forall x \in [a,b]$

Ok, Do I need to do a proof by contradiction to prove that $f(x)=0$ $\forall x \in [a,b]$. What it comes down to is proving that $f(x) = 0$ for each irrational number $x \in [a,b]$, right???
Otherwise I don't really see how to do it, I mean even if I do by contradiction the way I thought about doing it was maybe say something like Assume that $f(x) \neq 0$ $\forall x \in [a,b]$
I am not sure... any suggestion?
If $x$ is an irrational number then there is a sequence $\{ x_n\}$ of rational numbers so that $x_n \to x$. Then by continuity $f(\lim x_n) = \lim f(x_n) \implies f(x) = 0$.

3. So from the problem we know the behavior of the function when x is rational so that is why we just have to look at the function when x is irrational, correct?

If is an irrational number then there is a sequence of rational numbers so that
I don't understand that part, how come you if you have x as an irrational number you have to have a sequence of rational numbers so that ??? Can you explain a little?

Then by continuity .
I think I get the second part better but lel me check if I understand it well, so since we know that the sequence converges to $x$ then the $\lim x_n = x$ and $\lim f(x_n) = f(\lim x_n)= f(x) = 0$ is that correct??

4. Originally Posted by ynn6871
So from the problem we know the behavior of the function when x is rational so that is why we just have to look at the function when x is irrational, correct?
I don't understand that part, how come you if you have x as an irrational number you have to have a sequence of rational numbers so that ??? Can you explain a little?
Do you understand the theorem Between any two real numbers the is a rational number?
No matter how one approaches this problem, that theorem is used.
If z is irrational, then $\left( {\forall n \in \mathbb{Z}^ + } \right)\left( {\exists r_n \in \mathbb{Q}} \right)\left[ {z < r_n < z + \frac{1}{n}} \right]$.
It should be clear to you that $\left( {r_n } \right) \to z$ which means $f\left( {r_n } \right) \to f(z) = 0$

5. Ok, I understand what you mean. I think I am starting to understand better but I am still a little confused about one little part of your explanation (sorry for asking so many question).

So you said
If z is irrational, then .
That part I follow and understand it no problem now.

The only thing that I am not sure I understand is
It should be clear to you that which means
because the problem states that for each rational number x in , however in your thing you said that $f(z) = 0$ $z$ being an irrational number which is the opposity of what is stated in the problem isn't it??? Or am I missing something? Or is it because since $r_n$ is rational then $f(r_n)=0$
according to the problem?? So since , then $f(r_n)=f(z) = 0$ more or less???

I am sorry to ask that many question, I am juste tying to be sure I understand it well and that I don't get this answer for the wrong reason.
6. Look at the given: $\left( {\forall x \in \mathbb{Q}} \right)\left[ {f(x) = 0} \right]$.
Thus we need to show $\left( {\forall x \in \mathbb{R}\backslash \mathbb{Q}} \right)\left[ {f(x) = 0} \right]$. That is, if z is not rational $f(z)=0$.
Now of any w, by the given $f(w)=0$ if w is rational and is w is irrational we have proved that $f(w)=0$.
So $f$ is zero for all numbers.