Let $f\colon\mathbb{R}\to\mathbb{R}$ be continuous. If $f(r)=0$ for $r\in\mathbb{Q}$. Show that $f=0$.

54 Views Asked by At

Here's my proof for it:

It has been given that $f(r)=0$ for $r\in\mathbb{Q}$, so it remains to shows that $f(z)=0$ for $z\in \mathbb{R}\setminus\mathbb{Q}$. So, let $z\in \mathbb{R}\setminus\mathbb{Q}$. Let $(x_n)$ be a sequence of rationals such that $\lim x_n = z$. Since $f$ is continuous, we have $\lim f(x_n) = 0 = f(z)$. Since, $z$ was arbitrary, it is true for all irrationals.

Is this proof okay? It feels a little strange to me since I've cherry picked a sequence which forces $f(z)=0$.

1

There are 1 best solutions below

3
On BEST ANSWER

Yes, your proof seems fine.

You might want to state that you have used density of rational number explicitly.