1. ## rational continuity

Suppose that the function f : R → R is continuous and that f (x) = 0 if x is rational. Prove that f (x) = 0 for all x in R

Now, I know that if f is continuous at x =a and {xn} is a sequence that converges to a, then { f (xn)} converges to f (a). But where does the rational part of the question come into play?

2. Chuse a sequence of rational numbers which converges to a.

3. If you like you could prove the more general: let $f,g:X\to Y$ be continuous functions between topological spaces and suppose Y is Hausdorff. If f and g agree on a dense subset of X, they agree on all of X.

4. Suppose for some c that f(c) isn't equal to 0. We can assume, without loss of generality, that f(c) > 0. By continuity there is an open neighborhood about c such that f(x) > 0 for all x in that neighborhood. Now use the denseness of the rationals.

5. The below is more just a note of passing interest.

If you like you could prove the more general: let $f,g:X\to Y$ be continuous functions between topological spaces and suppose Y is Hausdorff. If f and g agree on a dense subset of X, they agree on all of X.
Yes! The above is totally correct that is because if we define $A(\varphi,\psi)=\left\{x:\varphi(x)=\psi(x)\right\ }$ and $\varphi\oplus\psi:X\to Y\times Y$ by $\varphi\oplus\psi:x\mapsto(\varphi(x),\psi(x))$ then the continuity of $\varphi,\psi$ easily implies the continuity of $\varphi\oplus\psi$. Thus, one notes that since $Y$ is Hausdorff that $\Delta\subseteq Y\times Y$ is closed and $A(\varphi,\psi)=\left(\varphi\oplus\psi\right)^{-1}(\Delta)$ and so $A(\varphi,\psi)$ is closed. So, if $D\subseteq \subseteq A(\varphi,\psi)\subseteq X$ is dense then $X=\overline{D}\subseteq\overline{A(\varphi,\psi)}= A(\varphi,\psi)$ and so $X=A(\varphi,\psi)$. But! By definition this means that $\varphi(x)=\psi(x),\text{ }\forall x\in X$ or that $\psi=\varphi$!

Maybe more intuitive is to notice that $\mathbb{R}$ is a topological group (with the usual addition and usual topology). And since given a topological group $G$ the map $\alpha:G\times G\to G$ given by $\alphag,h)\mapsto gh^{-1}" alt="\alphag,h)\mapsto gh^{-1}" /> is continuous. Thus, one notes that $\varphi\oplus\psi:G\to G\times G$ is continuous and thus so is $\alpha\circ(\varphi\oplus\psi):G\to G$ with $g\mapsto \varphi(g)(\psi(g))^{-1}$. So, noticing that $A(\varphi,\psi)=\left\{g\in G:\varphi(g)=\psi(g)\right\}=\left\{g\in G:\varphi(g)(\psi(g))^{-1}=e\right\}$ $=\left(\alpha(\varphi\oplus\psi)\right)^{-1}(\{e\})$ and thus the above claim is true if $\{e\}$ is closed in $G$. And since $\{0\}$ is closed in $\mathbb{R}$ the conclusion follows!

(notice that the above paragraph is a farce since $\{e_G\}\text{ is closed }\implies G\text{ is }T_1\implies G\text{ is }T_2$)

6. No need for a cannon when a flyswatter works.
Theorem: If a continuous function $f$ is either positive or negative at $x=a$ then $f(x)$ has the same sign on some open interval $(a-\delta,a+\delta).$
So if $f(b)\not= 0$ then $f(b)$ is either positive or negative .
But in any interval about $b$ there is a rational number.

7. but then there must be f(x)=0 b/c rationals are everywhere dense. So, f(x)=0 at least once

8. Originally Posted by Drexel28
Yes! The above is totally correct that is because if we define $A(\varphi,\psi)=\left\{x:\varphi(x)=\psi(x)\right\ }$ and $\varphi\oplus\psi:X\to Y\times Y$ by $\varphi\oplus\psi:x\mapsto(\varphi(x),\psi(x))$ then the continuity of $\varphi,\psi$ easily implies the continuity of $\varphi\oplus\psi$. Thus, one notes that since $Y$ is Hausdorff that $\Delta\subseteq Y\times Y$ is closed and $A(\varphi,\psi)=\left(\varphi\oplus\psi\right)^{-1}(\Delta)$ and so $A(\varphi,\psi)$ is closed. So, if $D\subseteq \subseteq A(\varphi,\psi)\subseteq X$ is dense then $X=\overline{D}\subseteq\overline{A(\varphi,\psi)}= A(\varphi,\psi)$ and so $X=A(\varphi,\psi)$. But! By definition this means that $\varphi(x)=\psi(x),\text{ }\forall x\in X$ or that $\psi=\varphi$!

Maybe more intuitive is to notice that $\mathbb{R}$ is a topological group (with the usual addition and usual topology). And since given a topological group $G$ the map $\alpha:G\times G\to G$ given by $\alphag,h)\mapsto gh^{-1}" alt="\alphag,h)\mapsto gh^{-1}" /> is continuous. Thus, one notes that $\varphi\oplus\psi:G\to G\times G$ is continuous and thus so is $\alpha\circ(\varphi\oplus\psi):G\to G$ with $g\mapsto \varphi(g)(\psi(g))^{-1}$. So, noticing that $A(\varphi,\psi)=\left\{g\in G:\varphi(g)=\psi(g)\right\}=\left\{g\in G:\varphi(g)(\psi(g))^{-1}=e\right\}$ $=\left(\alpha(\varphi\oplus\psi)\right)^{-1}(\{e\})$ and thus the above claim is true if $\{e\}$ is closed in $G$. And since $\{0\}$ is closed in $\mathbb{R}$ the conclusion follows!

(notice that the above paragraph is a farce since $\{e_G\}\text{ is closed }\implies G\text{ is }T_1\implies G\text{ is }T_2$)

This is a fascinating proof. Its so algebraic :] I'm not sure I understand it all! I had thought of this low-tech one: suppose D is dense in X and there is a point a at which f and g differ. Use the Hausdorff property to pick disjoint open sets U and V containing f(a) and g(a) respectively. Then $f^{-1}(U)\cap g^{-1}(V)$ is open in X so it meets D, at d say, and f(d)=g(d). But then f(d) is in both U and V, a contradiction.

Here is something I have wondered before but been unable to prove: can we relax the condition that Y is T2? Are there distinct functions agreeing on a dense set that take values in a (say) T1 space? Do you know?

Let $X$ be $\mathbb{N}$ with the cofinite topology and define $\varphi,\psi:X\to X$ by $\varphi(x)=\begin{cases} x & \mbox{if}\quad x\ne 0 \\ 1 & \mbox{if}\quad x=0\end{cases}$. Then, if $O\subseteq X$ is open and thus infinite then $\varphi^{-1}(O)$ is infinite and thus open. Similarly, define $\psi(x)$ to be the identity map. Then, they agree on $\mathbb{N}-\{0\}$ which is dense since given any point $x\in X$ and any neighborhood of $x$ that neighborhood must infinitely many points and thus a point different from both $x$ and $\{0\}$.