TITLE: What is limit superior and limit inferior?
QUESTION [44 upvotes]: I've looked at the Wikipedia article, but it seems like gibberish. The only thing I was able to pick out of it was the concept of infimum (greatest lower bound) and supremum (least upper bound), as I had learned them previously in an intro discrete math course.

The limit inferior of a sequence ($x_n$) is defined by
$\displaystyle\liminf_{n\to\infty}x_n := \lim_{n\to\infty}\Big(\inf_{m\geq n}x_m\Big)$
or
$\displaystyle\liminf_{n\to\infty}x_n := \sup_{n\geq 0}\,\inf_{m\geq n}x_m=\sup\{\,\inf\{\,x_m:m\geq n\,\}:n\geq 0\,\}.$
Similarly, the limit superior of ($x_n$) is defined by
$\displaystyle\limsup_{n\to\infty}x_n := \lim_{n\to\infty}\Big(\sup_{m\geq n}x_m\Big)$
or
$\displaystyle\limsup_{n\to\infty}x_n := \inf_{n\geq 0}\,\sup_{m\geq n}x_m=\inf\{\,\sup\{\,x_m:m\geq n\,\}:n\geq 0\,\}.$

Can anybody provide any examples of its use, and why it's used in that context?

REPLY [14 votes]: The most intuitive way I think is to try to understand what it is doing with a picture (credit Wikimedia Commons user Eigenjohnson):

We know the maximum or minimum of a sequence may not exist, but the supremum and infimum always exist (if the sequence is bounded; if not we can consider the supremum/infimum in the extended real line as $\pm \infty$). However the supremum/infimum describes an upper/lower bound over the whole sequence, and so does not give us information about the tail of the sequence, or how the sequence eventually behaves. In the picture the supremum over the whole sequence $(x_n)$ is about 1.75 for early values in the sequence, but this doesn't tell us about later terms ($x_n$ for large $n$), which seem to have a supremum at 1.0. 
$\liminf$ and $\limsup$ on the other hand tell us about the infimum and supremum as $n$ goes to infinity and we consider later and later $x_n$ terms. One definition (which I consider the most intuitive) is $$\limsup_{n \to \infty} x_n = \lim_{n \to \infty} \sup_{m \ge n} x_m$$
By the nature of this definition, we consider the supremum over the tail of the sequence of values $x_m$ or later, that is $(x_m)_{m \ge n}$, and by having the limit as $m \to \infty$ we consider later and later tails of the sequence. This captures the notion of best bounds of how the sequence eventually behaves for much later terms. Another nice thing about this definition is that $\limsup$ looks like $\lim$ of a $\sup$ and so we can remember what we're working with. 
Another definition is $$\limsup_{n \to \infty} x_n = \sup \mathscr L$$
where $\mathscr L$ is the set of limit points of the sequence, that is all $l \in \mathbb R$ such that there exists a subsequence $(x_{n_k})$ that converges to $l$. (See Pedro Tamaroff's answer for more formal definition and explanation). This definition also captures the notion of how the sequence eventually behaves by considering all limit points, which by their nature consider how $x_{n_k}$ terms behave as $n$ goes to infinity. The proof that these two definitions are equivalent (see Two definitions of $\limsup$, Proof of equivalence of two definitions $\limsup$ and $\liminf$) sheds light on what exactly the definitions are doing.
A third characterization (in Andreas Blass's answer) is useful for proofs and says the following: if $l = \limsup_{n \to \infty} x_n$, then for all $\epsilon > 0$

there exists $N \in \mathbb N$ such that for all $n \ge N$, $x_n \le l + \epsilon$, and
$x_n \ge l - \epsilon$ for infinitely many $n \in \mathbb N$.

This characterization can be proved from the second definition by using the definition of limit and supremum (to prove, assume the contrary for each part and derive a contradiction. The first part uses Bolzano-Weierstrass theorem to find a convergent subsequence). Working through this definition and proving its equivalent to the second definition (with limit points) gives insight on what $\limsup$ means and the explicit use of $\epsilon$ makes it handy for proofs where we want explicit bounds to work with.