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.


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$.


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.