For continuous $h:\mathbb{R\longrightarrow R}$, prove $h(x)=0$ for x in $\mathbb{Q}$ implies $h(x)=0$ for x in $\mathbb{R}$

53 Views Asked by At

The problem statement is as follows: For continuous $h:\mathbb{R\longrightarrow R}$, prove $h(x)=0$ for $x$ in $\mathbb{Q}$ implies $h(x)=0$ for $x$ in $\mathbb{R}$.

My attempt feels a bit awkward and I was hoping to find a more proper proof, in the likely event that mine is flawed:

Assume, for the sake of contradiction, that $\exists a \in \mathbb{R}$ such that $h(a)=b \neq 0$. Since $h$ is continuous, it is continuous at $a$. Applying the definition of continuity, For all $\epsilon >0, \exists \delta$ such that $|x-a|<\delta \Rightarrow |h(x)-h(a)|<\epsilon \Rightarrow |0-b|<\epsilon$ (we can assume $h(x)$ is $0$ because if not, the proof is concluded) $\Rightarrow -\epsilon<b<\epsilon$. Since $b$ is fixed but $\epsilon$ can always be closer to $0$, we can choose $\epsilon$ such that $-\epsilon<b<\epsilon$ is false. Therefore, such $a$ does not exist. $\square$

I especially dislike how hand-wavy the end of the proof is; there must be a better way. How can this be improved? Is it even valid?

1

There are 1 best solutions below

0
On

$h(x)$ is continuous on $\mathbb{R}$ implies that $\forall x_n \to x$, $\lim_{n \to \infty}h(x_n) = h(x)$. On the other hand, $\forall x \in \mathbb{R}$, $\exists \{x_n\} \subset \mathbb{Q}$ such that $x_n \to x$.