0

a) Give an example of a continuous, non-constant function $f$ such that for each $x$, $f(x)$ is a rational number, or prove that no such example exists.

b) Give an example of a continuous, non-constant function $f$ such that for each $x$, $f(x)$ is an irrational number, or prove that no such example exists.

i am no cite for this one problem. please help thanks a lot

  • 1
    Cheeky answer: Define $f : (-\infty,0)\cup (0,\infty)\to\Bbb R$ by $f(x) = -2$ if $x < 0$ and $f(x) = 2$ if $x > 0$. For the second question, replace $2$ by $\pi$. – Stahl Oct 27 '14 at 02:47

1 Answers1

5

HINT: Intermediate Value Theorem.

Brian M. Scott
  • 631,399
  • http://math.stackexchange.com/questions/982063/having-difficulties-showing-the-triangle-inequality-of-metric-in-the-plane Can you help me with this question? I will award you the 350 bounty. I trust you. thanks. – ILoveMath Oct 27 '14 at 02:54
  • @FromCuba: I’m sorry: I only just noticed this. (Somehow I missed the notification.) I’ve just added an answer; let me know if it’s sufficient. – Brian M. Scott Oct 28 '14 at 23:38