Functions and continuity: constant functions

49 Views Asked by At

Suppose that $g$ is a continuous function and that $g(x)=0$ $\forall x \in \mathbb{Q} $. Prove that $g(x)=0$ $\forall$ $x$ in $\mathbb{R} $. So, assume that g is not equal to 0 for some a* in $\mathbb{R}$ \ $\mathbb{Q} $. We know that $g$ is continuous. So, assume that c $\in$ $ \mathbb{Q} $. Set $ \epsilon $ = $ \lvert f(a^*) \rvert - \frac12 $. Hence, if $ \lvert a^*-c \rvert \lt \delta$, then $ \lvert f(a^*)-f(c) \rvert \lt \epsilon $. However, $ \lvert f(a^*)-f(c) \rvert \lt \epsilon $ = $ \lvert f(a^*) \rvert \lt \epsilon $, since $f(c)=0$, as c $\in$ $ \mathbb{Q} $ . But this is a contradiction as $ \lvert f(a^*) \rvert \lt \epsilon = \lvert f(a^*) \rvert - \frac12 . $ So, $ \lvert f(a^*) \rvert \lt \lvert f(a^*) \rvert - \frac12 $, which is a contradiction which arose by assuming g is not equal to 0 for some a* $\mathbb{R}$ \ $\mathbb{Q} $. Hence, $g(x)=0 \forall x \in \mathbb{R} $.

Any mistakes, pointers or improvements for this proof?