Let $f,g:\mathbb R\to \mathbb R$ be increasing and $f(r)=g(r)$ for every $r\in\mathbb Q$. Must we have $f(x)=g(x)$ for every $x\in\mathbb R$?
Thanks in advance!
Let $f,g:\mathbb R\to \mathbb R$ be increasing and $f(r)=g(r)$ for every $r\in\mathbb Q$. Must we have $f(x)=g(x)$ for every $x\in\mathbb R$?
Thanks in advance!
No. Take $$f(x)=x+\chi_{(\pi,+\infty)}(x)\,,\ \ \ g(x)=x+\chi_{[\pi,+\infty)}(x).$$ Here $\chi_A$ stands for the indicator function of the set $A$; i.e. $\chi_A$ is the function whose value at $x$ is $1$ if $x\in A$, and $0$ otherwise.
As the accepted answer shows, it's not necessarily true that the functions are equal everywhere. However, we can show that the set of points where they are not equal is countable. (This implies, and in fact is stronger than, the statement that $f$ and $g$ are equal almost everywhere.)
First, note that if $x \in \mathbb R$ and both $f$ and $g$ are continuous at $x$, then we can take any sequence $\{r_n\}$ of rationals converging to $x$, and we have $$\lim_{n \to \infty}f(r_n) = f\left(\lim_{n \to \infty}r_n\right) = f(x)$$ where the first equality holds because $r_n \to x$ and $f$ is continuous at $x$. Similarly, $$\lim_{n \to \infty}g(r_n) = g(x)$$ Since $f(r_n) = g(r_n)$ for every $n$, this means that $f(x) = g(x)$. So, the functions are equal at any point where they are both continuous.
Furthermore, we know that $f$ and $g$ are monotone functions. This means that each function must be continuous everywhere except possibly on a countable set. For a proof, see here, for example. Let $D_f$ and $D_g$ respectively denote the sets where $f$ and $g$ are discontinuous. These sets are countable. Note that $D_f \cup D_g$ is still countable (the union of two countable sets is countable), and $f$ and $g$ are both continuous (hence equal) everywhere in the complement of $D_f \cup D_g$.
a.e.
mean? – Eric Duminil Dec 05 '17 at 07:50