TITLE: Need help unpacking definitions of $\limsup$, $\liminf$
QUESTION [5 upvotes]: I am reading a real analysis textbook, and need help clarifying/unpacking the definition of $\limsup$ and $\liminf$.

Given a sequence $\{a_n\}$ of real numbers,$$\limsup_{n \to \infty} a_n = \inf_n \sup_{m \ge n} a_m, \quad \liminf_{n \to \infty} a_n = \sup_n \inf_{m \ge n} a_m.$$
  We use analogous definitions when we take a limit along the real numbers. For example,$$\limsup_{y \to x} f(y) = \inf_{\delta > 0} \sup_{|y - x| < \delta} f(y).$$

Any help would be well-appreciated. Thanks!

REPLY [6 votes]: Perhaps an example would be illuminating?  Let's figure out $\limsup(a_n)$ for the following sequence:
$$a_n = \begin{cases} 1 + 1/n &\mbox{if } n \equiv 0 \\ 
-1 - 1/n& \mbox{if } n \equiv 1 \end{cases} \pmod{2}$$
For a given $n$, the quantity $\displaystyle \sup_{m \geq n}a_m$ is simply the largest term in the sequence after the first $n$ terms are thrown away.  For any $n$, it is easy to see in the sequence above that this value will be the first even-indexed term that was not thrown away.  As we let $n$ go to infinity, you can check that the even-indexed terms limit to $1$, or in other words $\displaystyle \sup_{m \geq n} a_m$ limits to $1$, or in other words $\limsup(a_n) = 1$.
Put another way, if $\limsup(a_n) = x$, this means that $x$ is the smallest number such that, for any given $\delta > 0$, only a finite number of terms in the sequence are larger than $x + \delta$.  
Likewise, $\liminf(a_n) = x$ means that $x$ is the largest number such that, for any given $\delta > 0$, only a finite number of terms in the sequence are smaller than $x - \delta$.  You can check that, in the example sequence above, $\liminf(a_n) = -1$.
Finally, notice that if $\lim(a_n)$ exists, then it will agree with $\liminf(a_n)$ and $\limsup(a_n)$.  

I don't know if this graphic will be helpful to you, but I have it in mind pretty much every time I think about these concepts (from Wikipedia):