Unboundedness, dense sets, and limits of $\pm \infty$ I  had a problem come up the other day where I wanted to know what I could conclude if I was given the assumption that a real-valued function $f$ is unbounded on an interval $[a,b]$. Originally, I thought that this meant there must exist an $x \in [a,b]: \displaystyle \lim_{y\to x}f(y)=\pm\infty$. However, I constructed a counter example, wherein I generated an unbounded function that does not have a limit of $\pm \infty$:

For example:  the function $f(x)=\begin{cases}\left|\frac{1}{x-1}\right|\quad &\text{if $x \in \mathbb R \setminus \mathbb Q$} \\0 \quad &\text{if $x \in \mathbb Q$}\end{cases}\quad$ is unbounded on $[0,2]$ but no $x \in [0,2]$ satisfies the definition of approaching a limit of $\pm \infty$.

This led me to consider the following:
Suppose $f$ is unbounded on $[a,b]$. Conjunct this assumption with one of the following two cases (each case is the negation of the other):

*

*there is a dense set $S$ in $[a,b]$ where there exists an $M \in \mathbb R$ such that for any $s \in S: |f(s)| \leq M$. (With my aforementioned counter example, $S$ is the set $[0,2]\cap \mathbb Q$ and $M=0$)

OR


*for any dense set $S$ in $[a,b]$, for any $M \in \mathbb R$, there is an $s \in S: |f(s)|\gt M$.

For the first case, I already have a counter example that shows "$f$ is unbounded $+$ Case 1" does not imply there is a point $x \in [a,b]$ where the limit is $\pm \infty$.
For the second case, I was trying to determine whether or not this implied the existence of an $x \in [a,b]: \displaystyle \lim_{y \to x}f(y)=\pm \infty$, but I am not having any success. Moreover, I cannot think of a function that would satisfy the second case without resorting to having an $x \in [a,b]$ whose limit is $\pm \infty$.
My question is:

Does the second case imply the existence of a point in $[a,b]$ whose limit is $\pm \infty$? If yes, what does the proof look like? If no, could you please provide me with an example of a function that satisfies the second case without having any point with a limit of $\pm \infty$?

 A: No, being unbounded doesn't imply there exists an unbounded limit point, only that
$$\sup_{x \in \text{Dom($f$)}} |f(x)| = \infty$$
For your example function, we can get arbitrarily close to $1$ and so can find a value in the domain of $f$ such that $|f|$ exceeds any finite positive value.

Edit: OP requested example of a function that satisfies the following axiom $(*)$ but does NOT have a limit point at $\pm\infty$ or a proof that there must be such a limit point
$$\textit{For any dense set $S$ in $[a,b]$, for any $M \in \mathbb R,\exists s \in S: |f(s)|\gt M$} \tag{$*$}$$
I will demonstrate the existence of a function on $[a,b]$ that satisfies $(*)$ but where $f(x)$ doesn't have a limit for any $x \in [a,b]$.
Pick an $x \in [a,b]$. Let $S_i$ be a decreasing sequence of dense subsets of $[a,b]$ such that $\lim_{n\to \infty} S_i = \{x\}$. Let $(c_i)_{i=1}^{\infty}$ be non-negative, increasing with $c_i \to \infty$.
Since each $S_i$ is a dense subset of $[0,1]$, we know from $(*)$ that for any $M \in \mathbb R$ we can always pick a point $x_i$ in $S_i$ so that $|f(x_i)|>M$. Specifically,
$$(*) \implies \forall i\quad \exists x_i \in S_i: |f(x_i)| > c_i \tag{1}$$
As a corollary,
$$\lim_{i \to \infty} x_i = x \tag{2}$$
Proof of $(3)$: By the definition of $S_i$, if $x_i=x\;\forall i$ then trivially $x_i \to x$. If $x_i \neq x\;\forall i$ then $\exists N_i: x_i \notin S_j\;\forall j>N_i$. Since $S_{i+1} \subset S_i$ we have $k_i(x) := \sup_{a \in S_i} |a -x|$ forming a decreasing sequence $0\leq k_{i+1}\leq k_i$. Since the $k_i$ are also bounded from below the sequence $k_i$ converges to some number $m\geq 0$. Since the limit of $S_i$ is $\{x\}$, $k_i(x) \to 0 \implies m=0 \implies x_i \to x. \;\;\square$
Lets define a function $g:(-1)^ig(x_i) > c_i$, then $\lim_{n\to \infty}g(x_i) = \lim_{x_i \to x}g(x_i)$ does not exist.
Proof:
$$\lim_{x_i \to x} \inf g(x_i) < \lim_{i \to \infty} (-1)^{2i+1}c_{2i+1}=\lim_{i \to \infty}-c_{2i+1}= -\infty \text{ and }$$
$$\lim_{x_i \to x} \sup g(x_i) > \lim_{i \to \infty} (-1)^{2i}c_{2i}=\lim_{i \to \infty}c_{2i}= \infty \;\square$$
Note that there was nothing special about our choice of $x$ nor the unbounded sequence $c_i$. In fact, each sequence $c_i$ along with the choice of $x\in[a,b]$ indexes a (possibly non-unique) family of sequences $x_{i=1}^{\infty}\left(x,(c_i)_{i=1}^{\infty}\right)$ that converge to $x$.
We can perform a similar procedure for any $x \in  [a,b]$ and for any choice of non-negative, unbounded monotonic increasing sequence $c_i$. Therefore, for every $x\in[a,b]$ there is a an uncountably infinite number of sequences $x_i \to x$ such that $\lim_{x_i \to x} g(x_i)$ doesn't exist.
So $g$ as defined above is a counterexample to your conjecture, since every point $x\in[a,b]$ is a limit point of at least one sequence $x_i$ whose values $g(x_i)$ have no limit.
We can make stronger statement actually
$$(*) \implies f(x) \in \{-\infty,\infty\}\;\;\forall x\in [a,b]\setminus Q \tag{3}$$
Where $Q$ is a rare subset of $[a, b]$
Basically — $f(x)$ is infinite at almost every $x$ - up to some non-dense set.
Proof
Define a sequence of partitions $P_i$ of $[a,b]$ such that $|P_i| \to 0$. Each segment $p_{ij}$ of partition $P_i$ is a dense set.
By $(*)$ for every $M\in \mathbb R$ each $p_{ij}$ has at least one point $s_{ij}(M): |f(s_{ij}(M))|>M$. This implies $\sup_{x\in p_{ij}} |f(x)|=\infty\;\forall i,j$
Therefore,
$$|P_i|\to 0 \implies \forall j\; \lim_{i\to\infty} \sup_{x \in p_{ij}} |f(x)|=\infty$$
Let $j_i(x):=j:x\in p_{ij}$ then
$$|P_i|\to 0 \implies \forall x\in [a,b]: x=\lim_{i\to \infty} p_{i,j_i(x)}$$
So each $x$ is the limit point of some decreasing sequence of sets.
Therefore,
$$\lim_{c \to x} |f(c)|=\infty\;\;\forall c \in [a,b]$$
Since each $x\in[a,b]$ has points arbitrarily close to it,
$$|f(x)|=\infty\;\;\forall x \in [a,b] \setminus Q$$
Where $Q$ is a nowhere dense subset of $[a,b]$ - we need this because it’s possible that $|f(x)|$ is finite on a nowhere dense subset of $[a, b]$.
Therefore, the only functions that satisfy $(*)$ are ones where $|f(x)|=\infty\;\forall x \in [a,b] \setminus Q\;\;\square$.
As shown earlier, $(*)$ does not guarantee an infinite limit exists, but it does guarantee that $f(x)$ is almost completely unbounded — which is a much stronger statement than simply being unbounded.
A: This is not a definition of unboundedness. Bounded means that there exists
an $M>0$ such that $|f(x)|\leq\,M$ for all $x$ in $[a,b]$. Therefore unbounded means
that for each $n \in \mathbb{N}$ there is a $x_{n}$ in $[a,b]$ such that
$|f(x_{n}|>n$. That is there must be a sequence $y_{n}$ such that
$f(y_{n})\to + or -\infty$. Which of course since $[a,b]$ is
compact has a subsequence $y_{n_{k}}\to c$ in $[a,b]$.
But we don't need to have $\displaystyle \lim_{y \to c}f(y)=+/-\infty$
