# Real Analysis/Sequences

| ←Section 1 Exercises | Real Analysis Sequences | Constructing the real numbers→ |

## Definition

Sequences occur frequently in analysis, and they appear in many contexts. While we are all familiar with sequences, it is useful to have a formal definition.
    Definition A sequence of real numbers is any function a : N→R.
Often sequences such as these are called real sequences, sequences of real numbers or sequences in R to make it clear that the elements of the sequence are real numbers. Analogous definitions can be given for sequences of natural numbers, integers, etc.
Given a sequence (x$_n$), a subsequence, notated as $(x_{n_{j}})_{j=1}^{\infty }$, is a sequence where (n$_j$) is strictly increasing sequence of natural numbers.
For example, taking n$_j$=2j would the subsequence consisting of every other element of the original sequence, that is (x$_2$, x$_4$, x$_6$, …).

### Sequence Notation

However, we usually write a$_n$ for the image of n under a, rather than a(n). The values a$_n$ are often called the elements of the sequence. To make a distinction between a sequence and one of its values it is often useful to denote the entire sequence by $(a_{n})_{n=1}^{\infty }$, or just (a$_n$). Some employ set notation and denote it as {a$_n$} When specifying a particular sequence, it may be written in the form (a$_1$, a$_2$, a$_3$, …), when the sequence is infinite, or (a$_1$, a$_2$, …, a$_n$) when the sequence is finite. We tend only to discretely write down enough elements is so that the pattern is clear, which is typically 3 times.

### Examples of Sequences

(1, 2, 3, 4, …), (1, -2, 3, -4, …), and (1, π, π$^2$, π$^3$, π$^4$, …) are all examples of sequences. Note, however, that there need not be any particular pattern to the elements of the sequence. For example, we may specify a$_n$ to be the n-th digit of π. Often sequences are defined recursively. That is, to specify some initial values of the sequence, and then to specify how to get the next element of the sequence from the previous elements. For example, consider the sequence x$_1$=1, x$_2$=1, and x$_n$ = x$_{n−1}$ + x$_{n−2}$ for n ≥ 3. This sequences is known as the Fibonacci sequence, and its first few terms are given by (1, 1, 2, 3, 5, 8, 13, …). Another familiar example of a recursive sequence is Newton's method. With an initial guess x$_0$ for the zero of a function, Newton's method tells you how to construct the next guess. In this way you generate a sequence which (hopefully) converges to the zero of the function.

### Operations on Sequences

We can also perform algebraic operations on sequences. In other words, we can add, subtract, multiply, divide sequences.
These operations are simply performed element by element, for completeness we give the definitions.
    Definition Given two sequences (x$_n$) and (y$_n$) and a real number c, we define the following operations:
Sequence operators :
| Operator | Definition | Property |
| Addition | (x$_n$) + (y$_n$) | (x$_n$ + y$_n$) |
| Subtraction | (x$_n$) − (y$_n$) | (x$_n$ − y$_n$) |
| Multiplication | (x$_n$) ⋅ (y$_n$) | (x$_n$ ⋅ y$_n$) |
| Division | (x$_n$) ⁄ (y$_n$) | (x$_n$/y$_n$), if y$_n$ ≠ 0 for all n in N |
| Scalar | c ⋅ (x$_n$) | (c ⋅ x$_n$) |

### Classification of Sequences

Some properties of sequence are so important that they are given special names.
Different types of monotone sequences :
| Definition | Property |
| strictly increasing | if a$_n$ < a$_{n+1}$ for all n in N |
| non-decreasing | if a$_n$ ≤ a$_{n+1}$ for all n in N |
| strictly decreasing | if a$_n$ > a$_{n+1}$ for all n in N |
| non-increasing | if a$_n$ ≥ a$_{n+1}$ for all n in N |
| Definition | Property |
| monotone | if it satisfies any above definition for all n in N |
| strictly monotone | if it is either strictly increasing or strictly decreasing; |
    Visual examples of monotonicity
* An example of a monotonic non-decreasing function
* An example of a monotonic non-increasing function
* An example of a non-monotonic function
Some of these terms are prefixed with strictly because the term increasing is used in some contexts with meaning either that of strictly increasing or of non-decreasing, and similarly decreasing can mean the same as either strictly decreasing, or non-increasing. As a result, these ambiguous terms are usually prefixed with and strictly. We will try adhere to using this unambiguous term.
From here, we will also describe properties of sequences based on boundedness, a word which we will define for sequences below.
Different types of boundedness :
| Definition | Property |
| bounded above | if there exists M in R such that a$_n$<M for all n in N |
| bounded below | if there exists M in R such that a$_n$>M for all n in N |
| bounded | if the sequence is both bounded above and bounded below |
| Cauchy | if for all ε>0 there exists a natural number N so that, for all n, m > N, |a$_m$-a$_n$| < ε |

## Convergence and Limits

A further important property of sequences (arguably the most important property from the perspective of analysis) is the property of convergence. This property can be easily described by extending the epsilon-delta definition. However, because sequences are relative to counting numbers, there exists an additional way to imagine convergence. Both methods are described below.
    Definition Let (x$_n$) be a sequence of real numbers. The sequence (x$_n$) is said to converge to a real number a.
    if for all ε>0, there exists N in N such that |x$_n$-a|<ε for all n≥N.
If (x$_n$) converges to a then we say a is the limit of (x$_n$) and write
    $\lim _{n\to \infty }x_{n}=a$
or
    $x_{n}\to a$ as $n\to \infty$.
This is read x$_n$ approaches a as n approaches ∞. If it is clear which variable is playing the role of n then this may be abbreviated to simply x$_n$→a or lim x$_n$=a.
If a sequence converges, then it is called convergent.
It is also useful to extend this concept and allow sequences whose limits are either ∞ or −∞
    Definition We say x$_n$→∞ as n→∞ if for every M in R there is a natural number N so that x$_n$≥ M for all n≥N. We say x$_n$→−∞ as n→∞ if for every M in R there is a natural number N so that x$_n$≤ M for all n≥N.
Despite this, we do not refer to sequences such as these as convergent. They are instead called divergent.
Although convergence can be proven using the epsilon-delta definition as proof, another method to prove convergences of sequences is through mathematical induction, since sequences are referenced using counting numbers. Through this method, some theorems are easier to prove. However, proof using mathematical induction cannot generalize to real numbers like a proof using epsilon-delta can.
The following theorems will prove that variations of a convergent sequence, expressed either through inductive notation, limit notation, or Cauchy notation, converges to exactly one number. This may seem intuitively clear, but remember that intuition often fails us when it comes to limits. It is also in proper mathematical style to rigorously prove every mathematical notion presented to us.

### Theorem (Uniqueness of limits)

A sequence can have at most one limit. In other words: if x$_n$ → a and x$_n$ → b then a = b.

##### Proof

Suppose the sequence has two distinct limits, so a≠b. Let ε=|a−b|/3.
Certainly ε>0, using the definition of convergence twice we can find natural numbers N$_a$ and N$_b$ so that
    $|x_{n}-a|\leq \epsilon$ for all n > N$_a$.
and
    $|x_{n}-b|\leq \epsilon$ for all n > N$_b$.
Taking k=max(N$_a$,N$_b$) then both of these conditions hold for x$_k$. Hence we deduce that |x$_k$−a|≤ε and |x$_k$−b|≤ε. Applying the triangle inequality, we see
    $|a-b|=|(x_{k}-b)-(x_{k}-a)|\leq 2\epsilon =(2/3)|a-b|,$
which is a contradiction. Thus, any sequence has at most one limit. $\Box$

### Theorem (Convergent Sequences Bounded)

If the subsequence $(x_{n})_{n=1}^{\infty }$ is a convergent sequence, then it is bounded.

##### Proof

Let $a=\lim _{n\to \infty }x_{n}$, and let ε = 1.
From the definition of convergence there exists a natural number N such that
    $|x_{n}-a|\leq 1$ for all n ≥ N.
The sequence $(x_{n})_{n=N+1}^{\infty }$ is bounded above by a+1 and below by a−1. Let M = max(|x$_1$|,|x$_2$|,|x$_3$|,…,|x$_N$|, |a|+1). It follows that −M ≤ x$_n$ ≤ M for all n in N. Hence the sequence is bounded. $\Box$

### Theorem (Boundedness of Cauchy Sequences)

If $(x_{n})_{n=1}^{\infty }$ is a Cauchy sequence, then it is bounded.

#### Proof

Let (x$_n$) be a Cauchy sequence. By the definition of a Cauchy sequence, there is a natural number N such that |x$_n$−x$_m$|<1 for all n,m > N. In particular, |x$_{N+1}$−x$_m$|<1 for all m > N. It follows by the reverse triangle inequality that |x$_m$| < |x$_{N+1}$| + 1. If we take M=max(|x$_1$|, |x$_2$|, …, |x$_N$|, |x$_{N+1}$| + 1), then |x$_n$| ≤ M for all n in N. $\Box$
The following theorem tells us that algebraic operations on sequences commute with the taking limits. This simple theorem is a useful tool in computing limits.

## Properties of Sequences

Given our new definition of convergence, it should be essential that we can use the values we get from them algebraically and whether or not we can apply algebraic intuition in regards to converging sequences as well.

### Algebraic Operations

If (x$_n$) and (y$_n$) are convergent sequences and a ∈ R, the following properties hold:
* $\lim _{n\to \infty }(x_{n}+y_{n})=\lim _{n\to \infty }(x_{n})+\lim _{n\to \infty }(y_{n})$.
* $\lim _{n\to \infty }(x_{n}y_{n})=\left(\lim _{n\to \infty }x_{n}\right)\left(\lim _{n\to \infty }y_{n}\right)$.
* $\lim _{n\to \infty }(ax_{n})=a\lim _{n\to \infty }(x_{n})$.
* $\lim _{n\to \infty }\left({\frac {x_{n}}{y_{n}}}\right)={\frac {\displaystyle \lim _{n\to \infty }x_{n}}{\displaystyle \lim _{n\to \infty }y_{n}}}$ (assuming y$_n$ ≠ 0 for all n in N and lim y_n ≠ 0).
* If x$_n$ ≤ y$_n$ for every n in N, then $\lim _{n\to \infty }x_{n}\leq \lim _{n\to \infty }y_{n}$.

#### Proof

1. Let x=lim x$_n$ and y=lim y$_n$. We need to show that for any ε>0 there is natural number N so that if n≥ N, then |(x$_n$ + y$_n$) − (x + y)|≤ε. Given any ε>0 we have ε/3>0 so from the definition of convergence there is a natural number N$_x$ so that |x$_n$−x|≤ε/3 for all n>N$_x$, similarly we can choose N$_y$ |y$_n$−y|≤ε/3 for all n>N$_y$.
Let N=max(N$_x$ ,N$_y$). If n>N, then by the triangle inequality we have
    $|(x_{n}+y_{n})-(x+y)|=|(x_{n}-x)+(y_{n}-y)|\leq \epsilon /3+\epsilon /3<\epsilon ,$
which is what we needed to show. $\Box$
2. Let x=lim x$_n$ and y=lim y$_n$. Since these sequences are convergent they are bounded. Let M$_x$ be a bound for (x$_n$) and let M$_y$ be a bound for (y$_n$). By increasing these quantities of necessary we may also assume M$_x$ > x and M$_y$ > y. Given ε>0, there exists some N$_x$ and N$_y$ such that
    $|x_{n}-x|<{\epsilon \over 2M_{y}}$ for n > N$_x$ and
    $|y_{n}-y|<{\epsilon \over 2M_{x}}$ for n > N$_y$.
Then for every n > max(N$_x$, N$_y$),
    $|x_{n}y_{n}-xy|\,$ $=|(x_{n}-x)y_{n}+x(y_{n}-y)|\,$ $\leq |x_{n}-x|M_{y}+M_{x}|y_{n}-y|$ $\leq {\frac {\epsilon }{2}}+{\frac {\epsilon }{2}}\leq \epsilon .$
$\Box$
3. Let y$_n$ = a for all n in N. The statement now follows from 2. $\Box$
4. We can reduce this to showing that lim (1/y$_n$) exists and equals 1/(lim y$_n$). Then it follows by 2 that we have:
    $\lim _{n\to \infty }\left({\frac {x_{n}}{y_{n}}}\right)=\left(\lim _{n\to \infty }{1 \over y_{n}}\right)\left(\lim _{n\to \infty }{x_{n}}\right)={\frac {\displaystyle \lim _{n\to \infty }x_{n}}{\displaystyle \lim _{n\to \infty }y_{n}}}.$
Let y=lim y$_n$. By the exercises, since y and y$_n$ are not 0, we can find δ > 0 so that |y_n| > δ and |y| > δ. It follows that 1/|y$_n$y|<1/δ$^2$. Given ε > 0 choose n in N so that |y$_n$ − y| < δ$^2$ε. We have
    $\left|{1 \over y_{n}}-{1 \over y}\right|=|y-y_{n}|{1 \over |y_{n}y|}\leq {\frac {|y-y_{n}|}{\delta ^{2}}}<\epsilon$.
Hence, $\lim _{n\to \infty }{1 \over y_{n}}={1 \over y}.$ $\Box$
5. We first can reduce to the case when one sequence is identically 0. To see this let z$_n$ = x$_n$ − y$_n$. Then z$_n$ < 0 for all n in N. Let z = lim z$_n$. Suppose that z > 0 then we can then find a natural number N so that
    $|z-z_{N}|<z\,$.
Since z$_N$ ≤ 0 < z, the absolute value equals z − z$_N$. Subtracting z we find that −z$_N$ < 0. Hence z$_N$ is positive. Contradiction. Therefore we must have that z ≤ 0. Which means that by 1 we get:
    $\lim _{n\to \infty }x_{n}-\lim _{n\to \infty }y_{n}=\lim _{n\to \infty }z_{n}=z\leq 0.$
Therefore lim x$_n$ ≤ lim y$_n$ $\square$

### Theorem (Squeeze/Sandwich Limit Theorem)

This is the important squeeze theorem that is a cornerstone of limits. Since converging sequences can also be thought of through limit notions and notations, it should also be wise if this important theorem applies to converging sequences as well.
Given sequences (x$_n$), (y$_n$), and (w$_n$), if (x$_n$) and (y$_n$) converge to a and x$_n$ ≤ w$_n$ ≤ y$_n$, then w$_n$ converges to a.

#### Proof

Fix ε > 0. We need to find an N such that |w$_n$ − a| < ε if n > N. Since (x$_n$) → a and (y$_n$) → a the definition of convergence ensures that there exists integers N$_x$ and N$_y$ so that |x$_n$ − a| < ε for n > N$_x$ and |y$_n$ − a| < ε for n > N$_y$.
Let N=max(N$_x$, N$_y$). Then, for all n > N we have −ε < x$_n$ − a and y$_n$ − a < ε. Since x$_n$ < w$_n$ < y$_n$, it follows that x$_n$ − a < w$_n$ − a < y$_n$ − a.
Thus if n ≥ N, then −ε < x$_n$ − a < w$_n$ − a < y$_n$ − a < ε. In other words, |w$_n$ − a| < ε.$\Box$

## Completeness

The following results are closely related to the completeness of the real numbers.

### Theorem (Convergence of Monotone sequences)

Any monotone, bounded sequence converges. If the sequence is non-decreasing, then the sequence converges to the least upper bound of the elements of the sequence. If the sequence is non-increasing, then the sequence converges to the greatest lower bound of the elements of the sequence

#### Proof

Let (x$_n$) be any monotone sequence that is bounded by a real number M. Without loss of generality, assume (x$_n$) is non-decreasing. Since (x$_n$) is bounded above, it has a least upper bound by the least upper bound axiom. Let x = sup {x$_n$ | n ∈ N}. We will now show that (x$_n$) → x.
Fix ε > 0. As was shown in the exercises, if s = sup(A), then for any ε > 0 there is an element a in A so that s − ε < a < s.
Hence, it follows that there exists an N in N so that x − ε < x$_N$ < x.
For any n > N, since x$_n$ is non-decreasing, we have that
    $x-\epsilon <x_{N}\leq x_{n}<x$.
Thus |x − x$_n$| < ε and by the definition of convergence, (x$_n$) converges to x. $\Box$

### Theorem (Nested intervals property)

If there exists a sequence of closed intervals I$_n$ = [a$_n$, b$_n$] = {x | a$_n$ ≤ x ≤ b$_n$} such that I$_{n+1}$ ⊆ I$_n$ for all n, then ∩I$_n$ is nonempty.

#### Proof

Since I$_{n+1}$ ⊆ I$_n$ it follows that a$_n$ ≤ a$_{n+1}$ and b$_{n+1}$ ≤ b$_n$.
Since (a$_n$) and (b$_n$) are monotonic sequences they converge by the previous theorem.
Furthermore, since a$_n$ < b$_n$ for all n, it follows that lim a$_n$ ≤ lim b$_n$.
By the monotonicity of (a$_n$) and (b$_n$) we have for every n
    $a_{n}\leq \lim _{n\to \infty }a_{n}\leq \lim _{n\to \infty }b_{n}\leq b_{n}.$
Therefore lim a$_n$ ∈ [a$_n$, b$_n$] for every n, which implies that
    $\lim _{n\to \infty }a_{n}\in \bigcap _{n=1}^{\infty }I_{n}.$
Thus the intersection is nonempty. $\Box$

### Theorem (Bolzano—Weierstrass)

Every bounded sequence of real numbers contains a convergent subsequence.

#### Proof

Let (x$_n$) be a sequence of real numbers bounded by a real number M, that is |x$_n$| < M for all n. We define the set A by A = {r | |r| ≤ M and r < x$_n$ for infinitely many n}. We note that A is non-empty since it contains −M and A is bounded above by M. Let x = sup A.
We claim that, for any ε > 0, there must be infinitely many points of x$_n$ in the interval (x − ε, x + ε). Suppose not and fix an ε > 0 so that there are only finitely many values of x$_n$ in the interval (x − ε, x + ε). Either x ≤ x$_n$ for infinitely many n or x ≤ x$_n$ for at most only finitely many n (possibly no n at all). Suppose x< x$_n$ for infinitely many n. Clearly in this case x ≠ M. If necessary restrict ε so that x + ε ≤ M. Set r = x + ε/2 we have that r < x$_n$ for infinitely many n because there are only finitely many x$_n$ in the set [x,r] and x must be less than infinitely many x$_n$, furthermore |r| < M. Thus r is in A, which contradicts that x is an upper bound for A. Now suppose x< x$_n$ for at most finitely many n. Set y = x − ε/2. Then there are at most only finitely man n so that x$_n$ ≥ y. Thus, if r < x$_n$ for infinitely many n, we have that r ≤ y. This means that y is an upper bound for A that is less than x, contradicting that x wast the least upper bound of A. In either case we arrive at a contradiction, thus we must have that for any ε > 0, there must be infinitely many points of x$_n$ in the interval (x − ε, x + ε).
Now we show there is a subsequence that converges to x. We define the subsequence inductively, choose any x$_{n1}$ from the interval (x − 1, x + 1). Assuming we have chosen x$_{n1}$, …, x$_{nk−1}$, choose x$_{nk}$ to be an element in the interval (x − 1/k, x + 1/k) so that n$_k$∉{n$_1$, …, n$_{k−1}$}, this is possible as there are infinitely many elements of (x$_n$) in the interval. Notice that for this choice of x$_{nk}$ we have that |x − x$_{nk}$|<1/k. Hence for any ε>0, if we take any k > 1/ε, then |x$_{nk}$-x| < ε. That is the subsequence (x$_{nk}$) → x. $\Box$

### Theorem (Cauchy criterion)

A sequence converges if and only if it is Cauchy. Although this seems like a weaker property than convergence, it is actually equivalent, as the following theorem shows:

#### Proof

First we show that if (x$_n$) → x then x$_N$ is Cauchy. Now suppose that for a given ε > 0 we wish to find an N so that |x$_n$ − x$_m$| < ε for all n, m > N. We will choose N so that for all n ≥ N we have that |x$_n$ − x| < ε/2. By the triangle inequality, for any n, m > N we have:
    $|x_{n}-x_{m}|\leq |x_{n}-x|+|x_{m}-x|<{\frac {\epsilon }{2}}+{\frac {\epsilon }{2}}=\epsilon$.
Thus (x$_n$) is a Cauchy sequence.
Now we show that if (x$_n$) is a Cauchy sequence, then it converges to some x. Let (x$_n$) be a Cauchy sequence, and let ε > 0. By the definition of a Cauchy Sequence, there exits a natural number L so that |x$_n$ − x$_m$| < ε/2 whenever n, m > L. Since (x$_n$) is a Cauchy sequence it is bounded. By the Bolzano—Weierstrass theorem, it has a convergent subsequence (x$_{nk}$) that converges to some point x. Now we will show that the whole sequence converges to x
Because (x$_{nk}$) converges, we can choose a natural number M so that if n$_k$ > M, then |x$_{nk}$ − x| < ε/2. Let N = max(L, M), and fix any n$_k$ > N. For n > N we have that
    $|x_{n}-x|\leq |x_{n}-x_{n_{k}}|+|x_{n_{k}}-x|<{\frac {\epsilon }{2}}+{\frac {\epsilon }{2}}=\epsilon$.
Thus by definition of convergence (x$_n$) → x. $\Box$
These theorems all describe different aspects of the completeness of the real numbers. The reader will notice that the least upper bound property was used heavily in this section, and it is the axiom that separates the real numbers from the rational numbers. While these theorems would be false for the rational numbers, not all of them can substitute for the least upper bound property. The Cauchy criterion and the nested intervals property are not strong enough to imply the least upper bound property without additional assumptions, while the Convergence of Monotone sequences theorem and the Bolzano—Weierstrass property do imply the least upper bound property.

## Limit superior and limit inferior

Limits turn out to be a very useful tool in analysis, their primary draw back is that they may not always exist. Occasionally it is useful to have some notion of limit that makes sense for any sequence. To this end we introduce the limit superior (often just called the "lim sup") and the limit inferor (often called the "lim inf").
Definition For a sequence (x$_n$) we define the limit superior, denoted lim sup by:
    $\limsup _{n\to \infty }x_{n}=\inf _{k}\sup _{n\geq k}x_{n}.$
Similarly we define the limit inferior, denoted by lim inf by:
    $\liminf _{n\to \infty }x_{n}=\sup _{k}\inf _{n\geq k}x_{n}.$
If (x$_n$) is not bounded above, we say that lim sup x$_n$ = ∞. If (x$_n$) is not bounded we say that lim inf x$_n$ = −∞.
Notice that for bounded sequences the lim sup and the lim inf always exist. As we know general bounded sequence the limit doesn't always exist. But in the case when the lim sup and lim inf are equal, life is nicer as the next theorem shows.

### Theorem (Limit Superior and Inferior)

Let (x$_n$) be a bounded sequence. Then (x$_n$) → x if and only if lim sup x$_n$ = x = lim inf x$_n$.

#### Proof

First suppose (x$_n$) → x. Fix an ε > 0 choose a natural number N so that x − ε < x$_n$ < x + ε for any n > N. Hence for any k > N we have that
    $x-\epsilon \leq \sup _{n>k}x_{n}\leq x+\epsilon$
and hence x − ε < lim sup x$_n$ < x + ε. Since ε was arbitrary, this can only happen if lim sup x$_n$ = x. A similar argument shows that lim inf x$_n$ = x.
Now suppose lim inf x$_n$ = x = lim sup x$_n$, and we wish to show that lim x$_n$ = x.
First recall that the x=lim sup x$_n$ is defined as:
    $x=\inf _{k}\sup _{n>k}x_{n}$
Given an ε > 0, since we can get arbitrarily close to the infimum, we can choose we will choose N$_{ls}$ so that
    $\sup _{n>N_{ls}}x_{n}-x<\epsilon$
Similarly recall that the x=lim inf x$_n$ is defined as:
    $x=\sup _{k}\inf _{n>k}x_{n}$
Since we can get arbitrarily close to the supremum, we can choose we will choose N$_{li}$ so that
    $x-\sup _{n>N_{li}}x_{n}<\epsilon$
Let N = max(N$_{ls}$, N$_{li}$). Now if n > N, then
    $\inf _{n>N_{li}}\leq \inf _{n\geq N}\leq x\leq \sup _{n\geq N}\leq \sup _{n>N_{ls}}$
Hence for any n > N
    $x-\sup _{n>N_{ls}}x_{n}\leq x-x_{n}\leq x-\inf _{n>N_{li}}x_{n}.$
By our choice of N$_{ls}$ and N$_{li}$ this implies for any n > N
    $-\epsilon \leq x-x_{n}\leq \epsilon .\quad \Box$