I know there were many questions here on this topic, but I didn't find an answer that cleared things up to me. The thing is, I have the following definition of limit superior and I didn't see it used very often:
A number $L\in\Bbb R$ is the limit superior of a sequence $(a_n)_n$ if and only if:
$1.$ $\forall \varepsilon>0, \ a_n<L+\varepsilon$ for almost all terms of the sequence
$2.$ $\forall \varepsilon>0, \ L-\varepsilon<a_n$ for infinitely many terms of the sequence
I can see this is very similar to the definition of supremum that I have:
If $S$ is a non-empty bounded set $S \subseteq \Bbb R$ then $L=\sup S$ if and only if:
$1. \forall x\in S, x\leq L$
$2. \forall \varepsilon>0, \exists x\in S, \ L-\varepsilon<x$
In the defintion of limit superior I don't understand why $a_n<L+\varepsilon$ and what does it mean for "almost all terms of sequence"? Couldn't we put $a_n<L, \ \forall n\in\Bbb N$ for the first condition, and for the second condition: $\exists n\in\Bbb N$ such that $L-\varepsilon<a_n$? Why does that have to be true for "infinitely many terms of sequence"? Can someone explain this definition using an example? Thank you!
The difference is the following:
The supremum is the least upper bound of the set.
The limit superior is the limit of the supremums of the set.
Here's an example to illustrate the difference: Consider the sequence $a_n=\frac{1}{n}$ for $n\geq 1$.
The supremum of the set is $1$ because that's the largest value that $a_n$ attains and all other values are less than $1$. We can check this using the definition because for all $n\geq 1$, $\frac{1}{n}\leq 1$ and for all $\varepsilon>0$, there is an $a_n$, namely $a_1=1$ so that $1>1-\varepsilon$.
On the other hand, the limit superior is $0$. If you look at the sequence $\{a_n\}_{n\geq k}$, the supremum of this sequence is $\frac{1}{k}$. Taking the limit as $k$ approaches $\infty$ gives that the limit superior is $0$. We can check this using the definition, because for all $\varepsilon$, we can choose $k$ sufficiently large so that $\frac{1}{k}<\varepsilon$. Then by dropping the first $k$ elements of the sequence (almost all means all but finitely many), we get that the remaining $a_n$'s satisfy $a_n<0+\varepsilon$. On the other hand, since all $a_n$'s are greater than zero, $a_n>0-\varepsilon$.
On the other hand, the sequence $b_n=1-\frac{1}{n}$ for $n\geq 1$ has the same supremum and limit superior, namely $1$.
To summarize:
A supremum is the smallest possible upper bound for a set - an upper bound has all elements below it ($x\leq L$), and if you were to replace the upper bound with anything smaller ($L-\varepsilon$), that smaller value would not be an upper bound.
A limit superior is the limit of the supremums when you chop off finitely many initial terms (chopping off finitely many initial terms is the same as almost all). When chopping off initial terms, the supremum is a decreasing sequence. $L$ is the limit superior if your sequence of supremums decreases to $L$. The first condition with $L+\varepsilon$ describes this condition. The second condition with $L-\varepsilon$ describes the fact that you couldn't replace $L$ with something smaller.