$f : [0, 1] → \mathbb{R}$
$f(x) := \inf\{|nx − 1| : n ∈ \mathbb{N}\}$
I found that $f(x)$ is continuous on $\big(\dfrac{1}{m+1}, \dfrac1m\big]$ and that $\displaystyle \lim_{x\to 0}f(x)=0$
How can I say if $f(x)$ is continuous at $0$ with these facts?
$\lim_{x\to0} f(x) \neq0$ since $\forall\epsilon>0$, by the Archimedian property, we can find $m\in\mathbb N$ such that $\frac2m<\epsilon$. But, we know that $\frac3{2m}<\frac2m$, and that $\inf|n\cdot\frac3{2m}-1|=\frac12$. In fact, this limit does not exist, since $\forall n\in\mathbb N$, $f(\frac1n)=0$.
This proves that the function is not continuous at $0$.