2
$\begingroup$

Possible Duplicate:
Can there be two distinct, continuous functions that are equal at all rationals?

Let $f, g:\Bbb{R}\to\Bbb{R}$ to be continuous functions such that $f(x)=g(x)\text{ for all rational numbers}\,x\in\Bbb{Q}$. Does it follow that $f(x)=g(x)$ for all real numbers $x$?

Here is what I think: f continuous when $\lim\limits_{x\to x_0}f(x)=f(x_0)$ and $\lim\limits_{x\to x_0}g(x)=g(x_0)$

So it does not neccesarily mean that $f(x)=g(x)$ when x is irrational. So I can pick a function f so that

$f(x) = \begin{cases} g(x) & \text{if $x\in\Bbb{Q}$} \\ x & \text{if $x\in\Bbb{R}\setminus \Bbb{Q}$} \\ \end{cases} $

  • 1
    What you're doing is constructing a function on $\mathbb{R}$ that is continuous at every rational point. why must it be continuous?2012-11-08
  • 0
    because it was given that f, g is continuous? I'm sorry, not quite sure what your question is there2012-11-08
  • 0
    @user45593 Continuity can also be thought of as sequentially continuity. It is easier using sequential continuity to see that $f=g$ for all $x$.2012-11-08
  • 0
    At the end of your question, you're picking an $f$, right? I wanted to say that this choice would not be continuous on $\mathbb{R}$.2012-11-08
  • 0
    what i was trying to say is I don't think that it follows by $f$ and $g$ will equal to each other on all reals2012-11-08
  • 0
    Every continuous function is sequentially continuous, right? So I can pick an N>0 that will make it work?2012-11-08
  • 1
    @user45593 Yes. Since every continuous function is sequentially continuous, pick a sequence of rationals $\{x_n \}_{n=1}^{\infty}$ converging to an irrational $x$. Then what can you say about $f(x)$ and $g(x)$?2012-11-08
  • 1
    More generally: [Continuous functions between metric spaces are equal if they are equal on a dense subset](http://math.stackexchange.com/questions/202325/)2012-11-08

3 Answers 3

2

Let $h = f-g : \mathbb R \to \mathbb R$. Since $f$ and $g$ are continuous, so is $h$. Now $h^{-1}(0)$ must be closed and $\mathbb Q \subset h^{-1}(0)$.

1

HINT: Assume $f(x_0)\ne g(x_0)$ for some $x_0\in\mathbb R$. Then there is a $\delta>0$ such that $f(x)\ne g(x)$ for all $x\in(x_0-\delta,x_0+\delta)$.

0

Hint: prove that if $\,h\,$ is a real continuous function s.t. $\,h(q)=0\,\,,\,\,\forall\,q\in\Bbb Q\,$ , then $\,h(x)=0\,\,,\,\,\forall\,x\in\Bbb R\,$

Further hint: For any $\,x\in\Bbb R\,$ , let $\,\{q_n\}\subset\Bbb Q\,$ be s.t. $\,q_n\xrightarrow [n\to\infty]{} x\,$ . What happens with

$$\lim_{n\to\infty}f(q_n)\,\,\,?$$