Find a function defined on $[0,1]$, valued on an interval, but is discontinuous at each point.

That is, try to find a function $f: [0,1]\to \Bbb R$ such that $f([0,1])$ is an interval, but discontinuous at each point.

Here is my try. Let $\Bbb Q=\{r_1,r_2,\cdots\}$ with $r_1=0, r_2=1, \cdots$. Then define $f(x)=x$ for irrational $x$, $f(r_n)=r_{n+1}$, then $f([0,1])=(0,1]$, and is discontinuous at rational points, but how about irrational points?


Try $$ f(x) = \cases {x & if $x$ is rational\cr x + 1/2 & if $x < 1/2$ and $x$ is irrational\cr x - 1/2 & if $x > 1/2$ and $x$ is irrational}$$

  • $\begingroup$ What does $x>\frac12$ is irrational even mean?? $\endgroup$ Sep 20 '18 at 23:02
  • 1
    $\begingroup$ I mean $x > 1/2$ and $x$ is irrational. $\endgroup$ Sep 20 '18 at 23:03
  • $\begingroup$ lol ............ $\endgroup$ Sep 20 '18 at 23:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.