7

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!

Jie Fan
  • 1,886
  • 4
    A potentially-more-interesting variant: are the functions equal a.e.? – R.. GitHub STOP HELPING ICE Dec 05 '17 at 04:59
  • @R. What does a.e. mean? – Eric Duminil Dec 05 '17 at 07:50
  • @R.. That would make a nice follow-up question. I think such functions will be equal in a cocountable set (and thus almost everywhere ("a.e.")), but I don't know if every cocountable set can be realized this way. – Joonas Ilmavirta Dec 05 '17 at 08:17
  • @R.. Wikipedia monotonic function says an increasing function defined on an interval is differentiable almost everywhere. In particular continuous almost everywhere. So for almost any $x$, both $f$ and $g$ are continuous in that $x$, and so it is clear that they agree there. So if we accept Wikipedia's statement, your answer is yes. – Jeppe Stig Nielsen Dec 05 '17 at 09:12
  • @JeppeStigNielsen. A monotonic real function has only countably many discontinuities. In order for $f(x)\ne g(x)$ it is necessary that at least one of $f,g $ is discontinuous at $x.$ – DanielWainfleet Dec 05 '17 at 11:47
  • 1
    @EricDuminil. ... "a.e". means "almost everwhere" which means "except on a set of Lebesgue-measure $0.$" See my previous comment: $f$ and $g$ agree except on a countable set, and countable sets are among the measure-$0$ sets. – DanielWainfleet Dec 05 '17 at 12:00
  • @JoonasIlmavirta. See my comment above directed to JeppeStigNielsen. – DanielWainfleet Dec 05 '17 at 12:08
  • They would be equal a.e. if they were continuous but there is a sudden fad to working with discontinuous functions and their alleged marvel structure no one can give support for. – gary Dec 05 '17 at 20:26
  • @gary They would be equal everywhere if they were continuous, but that is not a hypothesis. They are monotone by hypothesis, but as the accepted answer shows, that's not enough for equality everywhere. But it is enough for equality almost everywhere since monotonicity implies continuity almost everywhere (even stronger: continuity everywhere except on a countable set). –  Dec 06 '17 at 00:50
  • @Bungo: I am aware that monotone functions between the Reals are not just a.e. continuous but a.e. differentiable. A question I find interesting is whether they are necessarily differentiable at the same points. – gary Dec 06 '17 at 01:49
  • And moreover, the set of discontinuities is an $F_{\sigma}$ set. – gary Dec 06 '17 at 02:06

2 Answers2

17

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.

0

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