Q:

Confused about the limit of functions

Let $f(x)=0$ for $x\in\mathbb{Z}$ and $1$ otherwise. Why $\forall x\in\mathbb{Z},\lim_{t\to x^{+}}f(t)=\lim_{t\to x^{-}}f(t)=1 $. Can it be explained by using the definition of limit? Would the result the same if $\mathbb{Z}$ is changed to $\mathbb{Q}$ ???

A:

$\lim\limits_{t\to {x_{0}}}{f(t)}=A$ means that
$$(\forall \varepsilon>0 )\;\;(\exists \delta>0): \;\; \forall t\in B'_\delta(x_{0})=(x_0-\delta;\,x_0+\delta)\setminus\{x_0\} \\
|f(t)-A|<\varepsilon.$$
If $\mathbb{Z}$ is changed to $\mathbb{Q},$ i.e. $x \in \mathbb{Q}$ limit does not exist. To prove this, consider two cases:

Let $\{t_n\} \subset \mathbb{Q}$ be an arbitrary sequence of rationals converging to $x:\;\; t_n \underset{n \to{\infty}}{\to} x.$ Then $\lim\limits_{t=t_n\to {x_{0}}}{f(t)}=\lim\limits_{n\to {\infty}}{f(t_n)}=1.$
For arbitrary sequence of irrational numbers $\{t_{n}^{*}\}\subset \mathbb{R}\setminus \mathbb{Q},\;\; t_{n}^{*} \underset{n \to{\infty}}{\to} x$ we have $\lim\limits_{t=t_{n}^{*}\to {x_{0}}}{f(t)}=\lim\limits_{n\to {\infty}}{f(t_{n}^{*})}=0.$

