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

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

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

Ok, Do I need to do a proof by contradiction to prove that $\displaystyle f(x)=0$ $\displaystyle \forall x \in [a,b]$. What it comes down to is proving that $\displaystyle f(x) = 0$ for each irrational number $\displaystyle 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 $\displaystyle f(x) \neq 0$ $\displaystyle \forall x \in [a,b]$
I am not sure... any suggestion?

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

Ok, Do I need to do a proof by contradiction to prove that $\displaystyle f(x)=0$ $\displaystyle \forall x \in [a,b]$. What it comes down to is proving that $\displaystyle f(x) = 0$ for each irrational number $\displaystyle 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 $\displaystyle f(x) \neq 0$ $\displaystyle \forall x \in [a,b]$
I am not sure... any suggestion?
If $\displaystyle x$ is an irrational number then there is a sequence $\displaystyle \{ x_n\}$ of rational numbers so that $\displaystyle x_n \to x$. Then by continuity $\displaystyle 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 $\displaystyle x$ then the $\displaystyle \lim x_n = x$ and $\displaystyle \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 $\displaystyle \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 $\displaystyle \left( {r_n } \right) \to z$ which means $\displaystyle 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 $\displaystyle f(z) = 0$ $\displaystyle 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 $\displaystyle r_n$ is rational then $\displaystyle f(r_n)=0$
according to the problem?? So since , then $\displaystyle 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: $\displaystyle \left( {\forall x \in \mathbb{Q}} \right)\left[ {f(x) = 0} \right]$.
Thus we need to show $\displaystyle \left( {\forall x \in \mathbb{R}\backslash \mathbb{Q}} \right)\left[ {f(x) = 0} \right]$. That is, if z is not rational $\displaystyle f(z)=0$.
Now of any w, by the given $\displaystyle f(w)=0$ if w is rational and is w is irrational we have proved that $\displaystyle f(w)=0$.
So $\displaystyle f$ is zero for all numbers.