2

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

Akaichan
  • 3,424
  • 4
  • 34
  • 60

3 Answers3

2

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

nonpop
  • 2,008
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)$.

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)\,\,\,?$$

DonAntonio
  • 211,718
  • 17
  • 136
  • 287