# Math Help - Continuity Question

1. ## Continuity Question

Let f, g be continuous from $\mathbb{R}$ to $\mathbb{R}$ and suppose that f(r)=g(r) for all rational numbers r. Is it true that f(x)=g(x) for all $x \in \mathbb{R}$.

I think yes, but am having trouble formulating a proof. Here is what I have so far.
Assume for contradiction that it is not true. Then $\exists m \in \mathbb{R}/ \mathbb{Q} s.t. f(m) \neq g(m)$, but from here I can't see where to get the contradiction. Any help?

2. ## Re: Continuity Question

Apply the definition of continuity with $\varepsilon =\frac{|f(m)-g(m)|}2$, and use the fact that there is a rational number in each open non empty interval.

3. ## Re: Continuity Question

Originally Posted by worc3247
Let f, g be continuous from $\mathbb{R}$ to $\mathbb{R}$ and suppose that f(r)=g(r) for all rational numbers r. Is it true that f(x)=g(x) for all $x \in \mathbb{R}$.
Here is a second way.
Every real number is the limit of a sequence of rational numbers.
The functions $f~\&~g$ agree on such a sequence.
From continuity what can you conclude?