# Thread: continuous functions

1. ## continuous functions

If f: [0,1] is continuous and has only rational [respectively, irrational] values, must f be constant? Prove your answer.

2. does anyone have any idea how to do this??

3. Originally Posted by rmpatel5
If f: [0,1] is continuous and has only rational [respectively, irrational] values, must f be constant? Prove your answer.
Let’s assume $\left( {\forall x \in \left[ {0,1} \right]} \right)\left[ {f(x) \in \mathbb{Q}} \right]$ and suppose that $\left( {\exists \left\{ {a,b} \right\} \subseteq \left[ {0,1} \right]} \right)\left[ {f(a) \ne f(b)} \right]$.
Because the irrationals are dense there is an irrational number $\gamma$ between $f(a)\;\&\; f(b)$ but by the intermediate value theorem we know that ${\exists c}$ between $a\;\&\; b$ such that $f(c)=\gamma$.
Do you see a contradiction?
How does that imply the $f$ is constant?

4. Originally Posted by Plato
Let’s assume $\left( {\forall x \in \left[ {0,1} \right]} \right)\left[ {f(x) \in \mathbb{Q}} \right]$ and suppose that $\left( {\exists \left\{ {a,b} \right\} \subseteq \left[ {0,1} \right]} \right)\left[ {f(a) \ne f(b)} \right]$.
Because the irrationals are dense there is an irrational number $\gamma$ between $f(a)\;\&\; f(b)$ but by the intermediate value theorem we know that ${\exists c}$ between $a\;\&\; b$ such that $f(c)=\gamma$.
Do you see a contradiction?
How does that imply the $f$ is constant?
I really dont see it. I have been trying to do this for the past couple hours i just dont understand this material. I hate real analysis

5. Originally Posted by rmpatel5
I really dont see it. I have been trying to do this for the past couple hours i just dont understand this material. I hate real analysis
Have you considered dropping the course and changing you major?
That is the advice I have give many, many a student in my years as a department chairperson.
To you own self be true. If this basic material is a real problem for you, I can tell you it only gets worst.
Don’t make the mistake of waiting too late to change course.