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!

  • 4
    $\begingroup$ A potentially-more-interesting variant: are the functions equal a.e.? $\endgroup$ – R.. Dec 5 '17 at 4:59
  • $\begingroup$ @R. What does a.e. mean? $\endgroup$ – Eric Duminil Dec 5 '17 at 7:50
  • $\begingroup$ @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. $\endgroup$ – Joonas Ilmavirta Dec 5 '17 at 8:17
  • $\begingroup$ @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. $\endgroup$ – Jeppe Stig Nielsen Dec 5 '17 at 9:12
  • 1
    $\begingroup$ @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. $\endgroup$ – DanielWainfleet Dec 5 '17 at 12:00

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.

  • $\begingroup$ I don't immediately see how these functions are increasing - perhaps you could explain? $\endgroup$ – user3490 Dec 5 '17 at 8:50
  • 1
    $\begingroup$ Well x and chi are monotonously increasing, so their sum is too. $\endgroup$ – EluciusFTW Dec 5 '17 at 9:00
  • 2
    $\begingroup$ @user3490 Maybe it is easier to define $f$ as $f(x)=x$ for $x\le\pi$ and $f(x)=x+1$ for $x>\pi$. And define $g$ by $g(x)=x$ for $x<\pi$ and $g(x)=x+1$ for $x\ge\pi$. Can you imagine their graphs? $\endgroup$ – Jeppe Stig Nielsen Dec 5 '17 at 9:17
  • $\begingroup$ @JeppeStigNielsen. I was going to say that. $\endgroup$ – DanielWainfleet Dec 5 '17 at 11:49

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


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.