Let $f:\mathbb{R}\rightarrow \mathbb{R}$ be a function. Prove that the set $E=\{x\in \mathbb{R}|\lim_{y\rightarrow x}f(y)=+\infty\} $ is countable. This is a problem from a real analysis book. The book gives a hint: Consider $g(x)=\arctan f(x)$. However, I don't think it makes any difference. I try to find an injection form $E$ into a countable set. But I've got completely no idea, and wondered if the statement was wrong. 
 A: Hint: Assume that $E = \{x : \lim_{y\to x} f(y) = \infty\}$ is uncountable. For $n\in \mathbb N,$ let $E_n = \{x\in E: f(x) < n\}.$ Show that some $E_{n}$ is uncountable, hence some point of this $E_{n}$ is a limit point of $E_n.$
A: Here is some further commentary:


*

*Does the hint help at all? (After all, the elegant  and brief answer by  @zhw did not need it.) Sometimes hints can seem rather oblique.  In this case
the hint evidently intends the student to reduce the problem to one that is already solved.  The composition $ g(x)=\arctan  f(x)$ converts the unbounded situation to a bounded one so that the limit is finite at each point of the set $E$.


So in fact all one needs to realize is that for every $x\in E$ the limit $\lim_{y\to x} g(x)$
exists and is different from $g(x)$.  That means that the set $E$ contains only removable discontinuities  of the function 
$g$ and consequently, by a theorem (evidently already proved in the source textbook), is countable.


*Is this problem interesting?  By  that I mean does it really reveal anything about the structure of real functions in general, or is it just some textbook problem that pushes the student to apply some theorem or technique.


If we view it from a more general point of view we can learn quite a bit more about real functions and limits.
If 
$f:\mathbb R\to\mathbb R$ is an
 arbitrary function one defines a number $$r\in \overline{\mathbb R}=\mathbb R \cup \{\infty\}  \cup \{-\infty\}$$
to be a right cluster value of $f$ at $x$ if there is at least
one sequence $x_n\searrow x$ for which $f(x_n)\to r$.  The set of all right cluster values at $x$ is denoted $\Lambda_f^+(x)$.  It is a nonempty closed set (i.e., closed in $\overline{\mathbb R}$.)
The left cluster set at $x$ is similarly defined and notated as
 $\Lambda_f{}^-(x)$.

Theorem (W. H. Young 1908)   If $f:\mathbb R\to\mathbb R$ is an arbitrary function then the sets  $$E^+= \left\{x\in \mathbb R:
  f(x)\not\in \Lambda_f^+(x)\right\} \ \ and \ \ E^-= \left\{x\in
  \mathbb R: f(x)\not\in \Lambda_f{}^{-}(x)\right\} $$ are countable.

The problem posed here is a very special case of this in which
$\Lambda_f^+(x)=\Lambda_f{}^-(x)=\{\infty\}$ at each point of the given set $E$.
The proof is not hard, using ordinary and familiar techniques at this level.  For each point $x\in E^+$ there are integers $m$ and $n$ so that whenever $x<z<x+\frac1n$ one has $$|f(z)-f(x)|>\frac1m.$$ Let $E_{mn}$ be the set of all points $x\in E^+$ that have this property for $m$ and $n$.  Evidently
the union of the family of sets $\{E_{mn}\}$ is all of $E^+$.
Now just observe that if $u$, $v\in E_{mn}$ with $0<v-u<\frac1n$ then $|f(v)-f(u)|>\frac1m$.  Conclude that $E_{mn}$ must be countable and so also must be $E^+$.
This analysis using cluster values shows that questions of this type are not really about limits themselves.  Young didn't use this language and, in fact, his theorem was overlooked for some time and rediscovered later when cluster sets were introduced in this and other settings. 
