0

Show that the function $f:[0,1] \to [0,1]$ defined by $$f(x)=\begin{cases}x & \text{if } x \in \mathbb{Q} \\ 1-x & \text{if } x \in \mathbb{Q}^c \end{cases}$$ has the intermediate value property.

Attempt: We want to show that for every $\mu$ between $f(a)$ and $f(b)$, there is some $c \in (a,b)$ such that $f(c) = \mu$. To show this, there will be three cases: first case will be $a,b \in \mathbb{Q}$, second is $a,b \in \mathbb{Q}^c$, and third $a \in \mathbb{Q}$ and $b \in \mathbb{Q}^c$. For the first case and second case, I can use the fact that $x$ and $1-x$ are continuous on $[0,1]$, and thus the IVT applies. However, for the third case, I am not sure.

J. Seg
  • 61
  • What happens if $a,b\in\mathbb{Q}$ with $a,b>1/2$ but $\mu\in\mathbb{Q}^c$? – dim-ask Oct 16 '17 at 10:22
  • See this earlier question: https://math.stackexchange.com/questions/7172/injective-functions-with-intermediate-value-property-are-continuous-better-proo – badjohn Oct 16 '17 at 10:28

1 Answers1

2

That function has not the IV property.

Let $a=0$ and $b=1/2$. Let $\mu=\sqrt2/4\in(f(a),f(b))$.

Then the only value for $c$ such that $f(c)=\mu$ is $1-(\sqrt2/4)>1-(1/2)=1/2=b$.

ajotatxe
  • 65,084