# Discontinuity and limits of functions

1. Aug 24, 2011

### alexfloo

Is there a real-valued function which is discontinuous everywhere, but which has a limit at every point in it's domain?

My intuition is that this couldn't occur because, if the limit exists at some x, then it must become "increasingly continuous" in the vicinity of x (otherwise we could find sequences to that point with different limits under that function). Then, we could perhaps conclude that f must be continuous in some neighborhood of x. This is of course not a formal proof, though, and I haven't been able to formalize it, hence my curiosity.

2. Aug 24, 2011

### Citan Uzuki

Your intuition is mostly correct. Here's a proof -- suppose that f is a function that has limits at any point. Let $g(x) = |f(x) - \lim_{t \rightarrow x} f(t)|$. Then g(x) is a nonnegative function. For each a>0, define $S_a = \{ x : g(x) \geq a\}$. We wish to show that S_a must be a set of isolated points. Let $x \in S_a$ be arbitrary, and let $L = \lim_{t \rightarrow x} f(t)$. By definition there is some δ>0 such that $0<|x-t|<\delta \Rightarrow |f(t)-L|<a/2$. Let y be any point with 0 < |y-x| < δ. Clearly |f(y) - L| < a/2. But also note that for all t sufficiently close to y, we also have 0 < |t-x| < δ, so for all t sufficiently close to y we have |f(t) - L| < a/2 and taking limits as t→y we get $|\lim_{t \rightarrow y} f(t) - L| \leq a/2$. So then $g(y) = |f(y) - \lim_{t \rightarrow y} f(t)| \leq |f(y) - L| + |L - \lim_{t \rightarrow y} f(t)| < a/2 + a/2 = a$. Hence $y \not \in S_a$. Since this holds for any y in a deleted neighborhood of x, x is in an isolated point of S_a, and as x was arbitrary, S_a consists only of isolated points. In particular, S_a must be countable.

The rest of the proof is now easy -- the set of discontinuities of f is the set {x: g(x) ≠ 0}, which is in turn the union of S_(1/n) for n ranging over the natural numbers. In particular, it is a countable union of countable sets, and therefore is countable. So a function that has limits at every point can only have countably many discontinuities, and in particular cannot be discontinuous at every point. Q.E.D.

By the way, although the set of discontinuities must be countable, it need not itself consist only of isolated points. For instance, the http://en.wikipedia.org/wiki/Popcorn_function" [Broken] is discontinuous at the rationals, but has limit zero everywhere.

Last edited by a moderator: May 5, 2017