If $f(x)$ is continuous over [0,1] and $f$ only takes rational values, if $f( {1 \over 2})={1\over2}$, how do I prove $f(x)={1\over2}$ everywhere on [0,1]?
2026-04-01 14:22:00.1775053320
Values of a function with a rational domain continuous over an interval
42 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
1
You know that $[0,1]$ is connected, $f$ is continuous and so $f([0,1])$ is connected. But the connected sets of $\mathbb{Q}$ being the singletons, you know that $f$ is constant. As $f(\frac{1}{2})=\frac{1}{2},$ then $f\equiv \frac{1}{2}$ on $[0,1].$
Edit without topological tools :
Suppose that $f$ is no-constant, i.e. that exists $x_0\neq\frac{1}{2}$ in $[0,1]$ such as $f(x_0)\neq\frac{1}{2}$ (we can suppose $\frac{1}{2}<f(x_0)$). As $f$ is continous, the mean value theorem implies that $[\frac{1}{2},f(x_0)]\subset f([0,1]).$ But every non-empty interval $I\subset\mathbb{R}$ contains an irrational number, then exists $x\in[\frac{1}{2},f(x_0)]$ such that $x\in\mathbb{R-Q}.$ But then $x\in f([0,1])$ so $x\in\mathbb{Q},$ which is a contradiction.