# Prove that for any $c \neq 0$ $\lim_{x \rightarrow c}{h(x)}$ does not exist and that $\lim_{x \rightarrow 0}{h(x)}$ does exist.

Define a function $h(x)=x$, if $x \in \mathbb{Q}$ and $h(x)=0$, if $x \notin \mathbb{Q}$. Prove that for any $c \neq 0$ $\lim_{x \rightarrow c}{h(x)}$ does not exist and that $\lim_{x \rightarrow 0}{h(x)}$ does exist. Conclude that $h$ is continuous only at $0$. Can anyone guide me? I want to use sequential criterion to prove this but I don't know how to formulate two sequences.

Hint: take one sequence that contains only rationals and another one that contains only irrationals (both tending to $c\ne 0$).

For the case of $c=0$, you can use e.g. that $h$ is continuous at $0$ iff for all sequences $a_n\to 0$ one has $h(a_n)\to 0$. By the def. of $h$, we have $|h(x)|\le |x|$ which is enough to prove this.

• strange, same idea at same time :) – user63181 Mar 19 '13 at 10:37
• For the same exercise, I would say it's not that strange.. :) – Berci Mar 19 '13 at 15:23
• you're right, but the really strange thing is that you do not have at least +1 :) – user63181 Mar 19 '13 at 15:28

Hint: If $c\not=0$ then take a sequence of rationals $(x_n)$ convergent to $c$ and another sequence of irrationals $(y_n)$ convergent also to $c$. What you find?

At $0$, use the fact $|h(x)|\leq |x|$.

• so when $c=0$ , the limit approaches $0$? – Idonknow Mar 19 '13 at 11:12
• @Idonknow Yes, if $x\to 0$ then by the given inequality, $|h(x)|\to 0$ that's means the limit is $0$. – user63181 Mar 19 '13 at 11:16

Hint: Assume that $h$ is continuous at $c\neq 0$ and use this fat that $\mathbb Q$ and $\mathbb Q^c$ are dense sets in $\mathbb R$.

• Hope you're sound asleep in a deep and wonderful slumber! +1 – Namaste Mar 20 '13 at 0:12