# Math Help - Continuity

1. ## Continuity

Let f, g be continous from R to R and suppose f(r)=g(r) for all rational numbers r. Is it true that f(x) = g(x) for all x in R.

R - real numbers

I need a proof of why this is true or if false a counterexample with proof.

2. Originally Posted by hayter221
Let f, g be continous from R to R and suppose f(r)=g(r) for all rational numbers r. Is it true that f(x) = g(x) for all x in R.

R - real numbers

I need a proof of why this is true or if false a counterexample with proof.
If $x\in \mathbb{R}$ then there is a sequence $\{ r_n \}$ with $r_n \in \mathbb{Q}$ such that $\lim r_n = x$. Then by continuity $f(x) = f(\lim r_n) = \lim f(r_n)$ and $g(x) = g(\lim r_n) = \lim g(r_n)$. But $f(r_n) = g(r_n)$. Thus, $\lim f(r_n) = \lim g(r_n)\implies f(x) = g(x)$.