1

Let $f$ and $g$ be functions, and suppose $f$ and $g$ are continuous (in particular, this means $D(f)=\mathbb{R}\; D(g)=\mathbb {R}$). Suppose that for every rational number $x\in\mathbb{Q}$, we have $f(x)=g(x).$ Prove that $f(x)=g(x)$ for ${every}$ number $x\in\mathbb{R}$.

Any suggestions on how I am supposed to even begin to approach this problem would help.

  • https://math.stackexchange.com/questions/505/can-there-be-two-distinct-continuous-functions-that-are-equal-at-all-rationals provides the answer. This is a duplicate. – Rob Arthan Oct 13 '17 at 00:38

2 Answers2

1

For any $x$, let $q_n$ be a sequence of rationals approaching $x$. $$ f(x) = \lim_{n\to\infty} f(q_n) = \lim_{n\to\infty} g(q_n) = g(x) $$ First and third equalities are true since $f,g$ are continuous.

Mike Earnest
  • 75,930
1

A good start, since we are trying to prove $f(x) = g(x)$ for all $x \in \mathbb{R}$, is to define $h(x) = f(x) - g(x)$. Now we just have to prove that $h(x) = 0$ for all $x \in \mathbb{R}$. And we know that $h$ is continuous (why?) and $h(x) = 0$ for all $x \in \mathbb{Q}$.

Now let $a$ be irrational. We want to show $h(a) = 0$. We know that we should use the fact that $h$ is continuous at $a$, i.e. that $h$ is $0$ for all the nearby rational numbers. So fix $\epsilon > 0$. There is a $\delta > 0$, such that......