The question is as follows
a.) Let $f(x)$ be continuous function on an interval [a,b] and suppose that $f(x)=0$ for each rational value $x$ in [a,b]. Prove that $f(x) = 0$ for all $x \in [a,b]$.
b.) Let $f(x)$ and $g(x)$ be continuous functions such that $f(x)=g(x)$ for each rational value of $x \in [a,b]$. Prove that $f(x)=g(x)$ for any $x \in [a,b].$
To prove the first part I thought that since we know $f(x)$ to be continuous, by the definition of continuity we can show $|f(x)-f(a)|< \epsilon$ when $|x-a|< \delta$. Then I was going to show that there is a irrational within each epsilon of a rational. It this the right thought process?
I also thought it might be possible to use the limit definition of continuity along with the fact that each rational is the limit of a set of irrationals to show $f(x)=0$ for all $x \in [a,b]$.
Anyways help would be greatly appreciated.
Let $l$ be any point of the domain. Then for any sequence $x_{n}$ in $[a,b]$ such that $x_{n}\rightarrow l$ we have by definition of continuity $f(x_{n})\rightarrow f(l).$ Now let $x_{n}$ be any sequence of rationals in $[a,b]$ which converges to $l$ then $f(x_{n})=0$ which gives $f(l)=0.$i.e. $f(x)=0$ for all $x\in [a,b].$ To prove second part use the same concept on the continuous function $f-g.$