Function whose limit does not exist at all points There are functions which are discontinuous everywhere and there are functions which are not differentiable anywhere, but are there functions with domain $\mathbb{R}$ (or "most" of it) whose limit does not exist at every point? For example, $ f:\mathbb{R}\to\mathbb{N}, f(x) = $ {last digit of the decimal representation of $x$}. Is this even a valid function?
As suggested in the comments define $f:\mathbb{R}\rightarrow \mathbb{R}$ by $f(x)=0$ if $x$ is irrational and $f(x)=1$ if $x$ is rational. Let's prove it doesn't have a limit at any point. Let $y\in \mathbb{R}$, suppose $y$ is irrational and that there exists $L$ the limit of $f$ at $y$. Then given any $\epsilon&lt;1/2$, there is $\delta&gt;0$, such that $x\in (y-\delta, y+\delta)\setminus\{y\}$ implies $|f(x)-L|&lt;1/2$. Now, since there exists $x_0,x_1\in (y-\delta, y+\delta)\setminus\{y\}$ such that $x_0$ is rational and $x_1$ is irrational we get that $1=|1-0|=|f(x_0)-f(x_1)|\leq |f(x_0)-L|+|f(x_1)-L|&lt;1/2+1/2=1$, a contradiction. So the limit at any irrational $y$ does not exists. The same argument applies to any rational $y$, so the limit doesn't exists at every point.
Now f(x) is define f:R→R by f(x)=x if x is rational and f(x)=-x if x is irrational. How to prove it limt (x approach to a) f(x) doesn't exist at a belongs to R with a not equal to 0.

Here limit doesn't go to constant value. How to prove it by using above theory.