The non-decreasing functions $f,g: \mathbb{R}\rightarrow \mathbb{R}$ are such that $f(r)\leq g(r)$ for $\forall$ rational numbers $r$. Is it true that $f(x)\leq g(x)$ for $\forall$ real numbers $x$?
Pinko wrote:
The non-decreasing functions $f,g: \mathbb{R}\rightarrow \mathbb{R}$ are such that $f(r)\leq g(r)$ for $\forall$ rational numbers $r$. Is it true that $f(x)\leq g(x)$ for $\forall$ real numbers $x$?
No.
Choose as counter-example :
$f(x)=x\quad\forall x<\pi$
$f(\pi)=\pi+4$
$f(x)=x+5\quad\forall x>\pi$
$g(x)=x+1\quad\forall x<\pi$
$g(\pi)=\pi+3$
$g(x)=x+6\quad\forall x>\pi$
An even easier counterexample is $f(x) = 0$ for all $x<\sqrt{2}$, $f(x) = 1$ for all $x\geq \sqrt{2}$, with $g(x) = 0$ for all $x\leq \sqrt{2}$, $g(x) = 1$ for all $x>\sqrt{2}$. (The inequality $f(x) \leq g(x)$ is false only for $x=\sqrt{2}$).