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 $\displaystyle x\in \mathbb{R}$ then there is a sequence $\displaystyle \{ r_n \}$ with $\displaystyle r_n \in \mathbb{Q}$ such that $\displaystyle \lim r_n = x$. Then by continuity $\displaystyle f(x) = f(\lim r_n) = \lim f(r_n)$ and $\displaystyle g(x) = g(\lim r_n) = \lim g(r_n)$. But $\displaystyle f(r_n) = g(r_n)$. Thus, $\displaystyle \lim f(r_n) = \lim g(r_n)\implies f(x) = g(x)$.