limit of indicator function, if exists Given the function below:
$f:\mathbb{R} \rightarrow \mathbb{R}$ defined as $f(x) = \begin{cases} 1, x = 1, \hfill \frac{1}2,\frac{1}3,\frac{1}4,...\\  0,\hfill otherwise\end{cases}$
I want to find for which values of $x$ the function $f$ has a limit, and to find its value. I supose there are points where the limit does not exist, for those points, what is the formal proof i should deduce? $f$ is not continuous on zero.
 A: Answer

*

*Limit $\lim_{x\to 0}f(x)$ doesn't exist.

*If $x_0\neq 0$ then $\lim_{x\to x_0}f(x)=0$.

Solution

*

*Let $x_n=\frac 1n$, $y_n=\frac{\sqrt 2}n$. Then $x_n,y_n\to 0$, $f(x_n)=1\to 1$, $f(y_n)=0\to 0$. Therefore from Heine defnition of limits, there aren't any limit in $0$.

*If $x_0\neq 0$ then there exists $\delta>0$ such that $f(x)=0$ for all $x\in (x_0-\delta,x_0+\delta)\setminus\{x_0\}$. Therefore  $\lim_{x\to x_0}f(x)=0$.

How to deal with the case $x=0$ without sequences: for any $\delta>0$ in the set $(-\delta,\delta)\setminus\{0\}$ there are points with value $0$ and value $1$. The function doesn't satisfy the Cauchy condition: $$\lim_{x\to x_0}f(x)\text{ exists }\iff\\\forall (\varepsilon>0)\,\exists(\delta>0)\forall(x_1,x_2\in D_f): 0<|x_1-x_0|,|x_2-x_0|<\delta\implies |f(x_1)-f(x_2)|<\varepsilon.$$
How to find the proper $\delta$:

*

*If $x_0<0$ then $\delta:=|x_0|$

*If $x_0>0$ and $x_0=1/k$ for some $k\in\Bbb N$ then $\delta:=\min(\frac 1k-\frac 1{k+1},\frac 1{k-1}-\frac 1k)=\frac 1k-\frac 1{k+1}$.

*If $0<x_0\leq 1$ and $x_0\notin\{1,1/2,1/3,\ldots\}$ then $\frac 1{k+1}<x_0<\frac 1k$. Then $\delta:=\min(\frac 1k-x_0,x_0-\frac 1{k+1})$.

*If $x_0>1$ then $\delta:=x_0-1$.

