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.