Critique My PROOF! : Proving a function is continuous at only one point. I'm working on some problems from my book. Could you guys critique my logic? Here is a particular one:
Let $h(x) = x$ for rational numbers x and $h(x) = 0$ for irrational numbers. Show the function $h$ is continuous at $x = 0$ and at no other point.
My attempt:
We know a function is continuous at a point $x_0$ if for all sequences $x_n$ that converge to $x_0$, we have $\lim_n f(x_n) = f(x_0)$.  I begin my proof by showing the function $h$ is not continuous at any point other than $0$. 


*

*Case I: x is a non-zero, rational number. 


We prove, by contradiction, that the function $h$ is not continuous at $x$ (when $x$ is rational and non-zero). By the definition of our function, $h(x)=0$. Assume $h(x)$ is continuous at $x$. Then any sequence $x_n$ coverging to $x$ should satisfy the condition $\lim h(x_n) = h(x)$. So let us define a sequence:
$b_n := x+\sqrt2/n$
If $b_n$ were rational then we could subtract the rational number $x$ from $b_n$ and still obtain a rational number. And, we should be able to multiply by the rational number $n$ and still obtain a rational number:
$n(b_n-x)=\sqrt2$ 
However, $\sqrt2$ is not a rational number, hence we have a contradiction implying $b_n$ was not a rational number, for any $n$, in the first place. Because we have proven $b_n$ is irrational, by the definition of the function $h$ know $\lim f(b_n)=0\not=x=\lim f(x)$ meaning $h$ is not continuous at any non-zero, rational $x$.
How is this proof looking so far?
 A: I don't think you need to have such a long justification for why $b_n$ are irrational. Since it's just a small part of the proof, it's OK to skip some of the details. Just saying "We define a sequence $b_n := x + \sqrt{2}/n$ of irrational numbers converging to $x$. We see that $h(b_n) = 0$ for all $n$, but $b_n$ goes to $x \neq 0$, so $h$ is not continuous at $x$." should be enough to satisfy most people that you've proven case I.
As for case II ($x$ is an irrational number), take a sequence of rational numbers. The most obvious one would be successive decimal approximations (if $x = \pi$, let $c_0 = 3, c_1 = 3.1, c_2 = 3.14$ and so on). I feel that the sequence is better to describe in words, but if you insist on a formula, it could be
$$
c_n := \frac{\left\lfloor10^nx\right\rfloor}{10^n}
$$
where $\lfloor x\rfloor$ is the floor function, which rounds down to the nearest integer.
I personally prefer using the $\epsilon$-$\delta$ definition of continuity for this problem, though, using the well-known property that in any non-empty, open interval there is at least one rational and one irrational number. Therefore, for $\epsilon = |x|/2$, for instance, there is no $\delta > 0$ such that (...), because the interval $(x - \delta, x + \delta)$ contains both rational and irrational numbers.
