# Iterated limit

In multivariable calculus, an iterated limit is a limit of a sequence or a limit of a function in the form
    $\lim _{m\to \infty }\lim _{n\to \infty }a_{n,m}=\lim _{m\to \infty }\left(\lim _{n\to \infty }a_{n,m}\right)$,
    $\lim _{y\to b}\lim _{x\to a}f(x,y)=\lim _{y\to b}\left(\lim _{x\to a}f(x,y)\right)$,
or other similar forms.
An iterated limit is only defined for an expression whose value depends on at least two variables. To evaluate such a limit, one takes the limiting process as one of the two variables approaches some number, getting an expression whose value depends only on the other variable, and then one takes the limit as the other variable approaches some number.

## Types of iterated limits

This section introduces definitions of iterated limits in two variables. These may generalize easily to multiple variables.

### Iterated limit of sequence

For each $n,m\in \mathbf {N}$, let $a_{n,m}\in \mathbf {R}$ be a real double sequence. Then there are two forms of iterated limits, namely
    $\lim _{m\to \infty }\lim _{n\to \infty }a_{n,m}\qquad {\text{and}}\qquad \lim _{n\to \infty }\lim _{m\to \infty }a_{n,m}$.
For example, let
    $a_{n,m}={\frac {n}{n+m}}$.
Then
    $\lim _{m\to \infty }\lim _{n\to \infty }a_{n,m}=\lim _{m\to \infty }1=1$, and
    $\lim _{n\to \infty }\lim _{m\to \infty }a_{n,m}=\lim _{n\to \infty }0=0$.

### Iterated limit of function

Let $f:X\times Y\to \mathbf {R}$. Then there are also two forms of iterated limits, namely
    $\lim _{y\to b}\lim _{x\to a}f(x,y)\qquad {\text{and}}\qquad \lim _{x\to a}\lim _{y\to b}f(x,y)$.
For example, let $f:\mathbf {R} ^{2}\setminus \{(0,0)\}\to \mathbf {R}$ such that
    $f(x,y)={\frac {x^{2}}{x^{2}+y^{2}}}$.
Then
    $\lim _{y\to 0}\lim _{x\to 0}{\frac {x^{2}}{x^{2}+y^{2}}}=\lim _{y\to 0}0=0$, and
    $\lim _{x\to 0}\lim _{y\to 0}{\frac {x^{2}}{x^{2}+y^{2}}}=\lim _{x\to 0}1=1$.
The limit(s) for x and/or y can also be taken at infinity, i.e.,
    $\lim _{y\to \infty }\lim _{x\to \infty }f(x,y)\qquad {\text{and}}\qquad \lim _{x\to \infty }\lim _{y\to \infty }f(x,y)$.

### Iterated limit of sequence of functions

For each $n\in \mathbf {N}$, let $f_{n}:X\to \mathbf {R}$ be a sequence of functions. Then there are two forms of iterated limits, namely
    $\lim _{n\to \infty }\lim _{x\to a}f_{n}(x)\qquad {\text{and}}\qquad \lim _{x\to a}\lim _{n\to \infty }f_{n}(x)$.
For example, let $f_{n}:[0,1]\to \mathbf {R}$ such that
    $f_{n}(x)=x^{n}$.
Then
    $\lim _{n\to \infty }\lim _{x\to 1}f_{n}(x)=\lim _{n\to \infty }1=1$, and
    $\lim _{x\to 1}\lim _{n\to \infty }f_{n}(x)=\lim _{x\to 1}0=0$.
The limit in x can also be taken at infinity, i.e.,
    $\lim _{n\to \infty }\lim _{x\to \infty }f_{n}(x)\qquad {\text{and}}\qquad \lim _{x\to \infty }\lim _{n\to \infty }f_{n}(x)$.
For example, let $f_{n}:(0,\infty )\to \mathbf {R}$ such that
    $f_{n}(x)={\frac {1}{x^{n}}}$.
Then
    $\lim _{n\to \infty }\lim _{x\to \infty }f_{n}(x)=\lim _{n\to \infty }0=0$, and
    $\lim _{x\to \infty }\lim _{n\to \infty }f_{n}(x)=\lim _{x\to \infty }0=0$.
Note that the limit in n is taken discretely, while the limit in x is taken continuously.

## Comparison with other limits in multiple variables

This section introduces various definitions of limits in two variables. These may generalize easily to multiple variables.

### Limit of sequence

For a double sequence $a_{n,m}\in \mathbf {R}$, there is another definition of limit, which is commonly referred to as double limit, denote by
    $L=\lim _{\begin{smallmatrix}n\to \infty \\m\to \infty \end{smallmatrix}}a_{n,m}$,
which means that for all $\epsilon >0$, there exist $N=N(\epsilon )\in \mathbf {N}$ such that $n,m>N$ implies $\left|a_{n,m}-L\right|<\epsilon$.
The following theorem states the relationship between double limit and iterated limits.
    Theorem 1. If $\lim _{\begin{smallmatrix}n\to \infty \\m\to \infty \end{smallmatrix}}a_{n,m}$ exists and equals L, $\lim _{n\to \infty }a_{n,m}$ exists for each large m, and $\lim _{m\to \infty }a_{n,m}$ exists for each large n, then $\lim _{m\to \infty }\lim _{n\to \infty }a_{n,m}$ and $\lim _{n\to \infty }\lim _{m\to \infty }a_{n,m}$ also exist, and they equal L, i.e.,
       $\lim _{m\to \infty }\lim _{n\to \infty }a_{n,m}=\lim _{n\to \infty }\lim _{m\to \infty }a_{n,m}=\lim _{\begin{smallmatrix}n\to \infty \\m\to \infty \end{smallmatrix}}a_{n,m}$.
Proof. By existence of $\lim _{\begin{smallmatrix}n\to \infty \\m\to \infty \end{smallmatrix}}a_{n,m}$ for any $\epsilon >0$, there exists $N_{1}=N_{1}(\epsilon )\in \mathbf {N}$ such that $n,m>N_{1}$ implies $\left|a_{n,m}-L\right|<{\frac {\epsilon }{2}}$.
Let each $n>N_{0}$ such that $\lim _{n\to \infty }a_{n,m}=A_{n}$ exists, there exists $N_{2}=N_{2}(\epsilon )\in \mathbf {N}$ such that $m>N_{2}$ implies $\left|a_{n,m}-A_{n}\right|<{\frac {\epsilon }{2}}$.
Both the above statements are true for $n>\max(N_{0},N_{1})$ and $m>\max(N_{1},N_{2})$. Combining equations from the above two, for any $\epsilon >0$ there exists $N=N(\epsilon )\in \mathbf {N}$ for all $n>N$,
$\left|A_{n}-L\right|<\epsilon$,
which proves that $\lim _{n\to \infty }\lim _{m\to \infty }a_{n,m}=\lim _{\begin{smallmatrix}n\to \infty \\m\to \infty \end{smallmatrix}}a_{n,m}\displaystyle$. Similarly for $\lim _{m\to \infty }a_{n,m}$, we prove: $\lim _{m\to \infty }\lim _{n\to \infty }a_{n,m}=\lim _{n\to \infty }\lim _{m\to \infty }a_{n,m}=\lim _{\begin{smallmatrix}n\to \infty \\m\to \infty \end{smallmatrix}}a_{n,m}$.
For example, let
    $a_{n,m}={\frac {1}{n}}+{\frac {1}{m}}$.
Since $\lim _{\begin{smallmatrix}n\to \infty \\m\to \infty \end{smallmatrix}}a_{n,m}=0$, $\lim _{n\to \infty }a_{n,m}={\frac {1}{m}}$, and $\lim _{m\to \infty }a_{n,m}={\frac {1}{n}}$, we have
    $\lim _{m\to \infty }\lim _{n\to \infty }a_{n,m}=\lim _{n\to \infty }\lim _{m\to \infty }a_{n,m}=0$.
This theorem requires the single limits $\lim _{n\to \infty }a_{n,m}$ and $\lim _{m\to \infty }a_{n,m}$ to converge. This condition cannot be dropped. For example, consider
    $a_{n,m}=(-1)^{m}\left({\frac {1}{n}}+{\frac {1}{m}}\right)$.
Then we may see that
    $\lim _{\begin{smallmatrix}n\to \infty \\m\to \infty \end{smallmatrix}}a_{n,m}=\lim _{m\to \infty }\lim _{n\to \infty }a_{n,m}=0$,
    but $\lim _{n\to \infty }\lim _{m\to \infty }a_{n,m}$ does not exist.
This is because $\lim _{m\to \infty }a_{n,m}$ does not exist in the first place.

### Limit of function

For a two-variable function $f:X\times Y\to \mathbf {R}$, there are two other types of limits. One is the ordinary limit, denoted by
    $L=\lim _{(x,y)\to (a,b)}f(x,y)$,
which means that for all $\epsilon >0$, there exist $\delta =\delta (\epsilon )>0$ such that $0<{\sqrt {(x-a)^{2}+(y-b)^{2}}}<\delta$ implies $\left|f(x,y)-L\right|<\epsilon$.
For this limit to exist, f(x, y) can be made as close to L as desired along every possible path approaching the point (a, b). In this definition, the point (a, b) is excluded from the paths. Therefore, the value of f at the point (a, b), even if it is defined, does not affect the limit.
The other type is the double limit, denoted by
    $L=\lim _{\begin{smallmatrix}x\to a\\y\to b\end{smallmatrix}}f(x,y)$,
which means that for all $\epsilon >0$, there exist $\delta =\delta (\epsilon )>0$ such that $0<\left|x-a\right|<\delta$ and $0<\left|y-b\right|<\delta$ implies $\left|f(x,y)-L\right|<\epsilon$.
For this limit to exist, f(x, y) can be made as close to L as desired along every possible path approaching the point (a, b), except the lines x=a and y=b. In other words, the value of f along the lines x=a and y=b does not affect the limit. This is different from the ordinary limit where only the point (a, b) is excluded. In this sense, ordinary limit is a stronger notion than double limit:
    Theorem 2. If $\lim _{(x,y)\to (a,b)}f(x,y)$ exists and equals L, then$\lim _{\begin{smallmatrix}x\to a\\y\to b\end{smallmatrix}}f(x,y)$ exists and equals L, i.e.,
       $\lim _{\begin{smallmatrix}x\to a\\y\to b\end{smallmatrix}}f(x,y)=\lim _{(x,y)\to (a,b)}f(x,y)$.
Both of these limits do not involve first taking one limit and then another. This contrasts with iterated limits where the limiting process is taken in x-direction first, and then in y-direction (or in reversed order).
The following theorem states the relationship between double limit and iterated limits:
    Theorem 3. If $\lim _{\begin{smallmatrix}x\to a\\y\to b\end{smallmatrix}}f(x,y)$ exists and equals L, $\lim _{x\to a}f(x,y)$ exists for each y near b, and $\lim _{y\to b}f(x,y)$ exists for each x near a, then $\lim _{x\to a}\lim _{y\to b}f(x,y)$ and $\lim _{y\to b}\lim _{x\to a}f(x,y)$ also exist, and they equal L, i.e.,
       $\lim _{x\to a}\lim _{y\to b}f(x,y)=\lim _{y\to b}\lim _{x\to a}f(x,y)=\lim _{\begin{smallmatrix}x\to a\\y\to b\end{smallmatrix}}f(x,y)$.
For example, let
    $f(x,y)={\begin{cases}1\quad {\text{for}}\quad xy\neq 0\\0\quad {\text{for}}\quad xy=0\end{cases}}$.
Since $\lim _{\begin{smallmatrix}x\to 0\\y\to 0\end{smallmatrix}}f(x,y)=1$, $\lim _{x\to 0}f(x,y)={\begin{cases}1\quad {\text{for}}\quad y\neq 0\\0\quad {\text{for}}\quad y=0\end{cases}}$ and $\lim _{y\to 0}f(x,y)={\begin{cases}1\quad {\text{for}}\quad x\neq 0\\0\quad {\text{for}}\quad x=0\end{cases}}$, we have
    $\lim _{x\to 0}\lim _{y\to 0}f(x,y)=\lim _{y\to 0}\lim _{x\to 0}f(x,y)=1$.
(Note that in this example, $\lim _{(x,y)\to (0,0)}f(x,y)$ does not exist.)
This theorem requires the single limits $\lim _{x\to a}f(x,y)$ and $\lim _{y\to b}f(x,y)$ to exist. This condition cannot be dropped. For example, consider
    $f(x,y)=x\sin \left({\frac {1}{y}}\right)$.
Then we may see that
    $\lim _{\begin{smallmatrix}x\to 0\\y\to 0\end{smallmatrix}}f(x,y)=\lim _{y\to 0}\lim _{x\to 0}f(x,y)=0$,
    but $\lim _{x\to 0}\lim _{y\to 0}f(x,y)$ does not exist.
This is because $\lim _{y\to 0}f(x,y)$ does not exist for x near 0 in the first place.
Combining Theorem 2 and 3, we have the following corollary:
    Corollary 3.1. If $\lim _{(x,y)\to (a,b)}f(x,y)$ exists and equals L, $\lim _{x\to a}f(x,y)$ exists for each y near b, and $\lim _{y\to b}f(x,y)$ exists for each x near a, then $\lim _{x\to a}\lim _{y\to b}f(x,y)$ and $\lim _{y\to b}\lim _{x\to a}f(x,y)$ also exist, and they equal L, i.e.,
       $\lim _{x\to a}\lim _{y\to b}f(x,y)=\lim _{y\to b}\lim _{x\to a}f(x,y)=\lim _{(x,y)\to (a,b)}f(x,y)$.

### Limit at infinity of function

For a two-variable function $f:X\times Y\to \mathbf {R}$, we may also define the double limit at infinity
    $L=\lim _{\begin{smallmatrix}x\to \infty \\y\to \infty \end{smallmatrix}}f(x,y)$,
which means that for all $\epsilon >0$, there exist $M=M(\epsilon )>0$ such that $x>M$ and $y>M$ implies $\left|f(x,y)-L\right|<\epsilon$.
Similar definitions may be given for limits at negative infinity.
The following theorem states the relationship between double limit at infinity and iterated limits at infinity:
    Theorem 4. If $\lim _{\begin{smallmatrix}x\to \infty \\y\to \infty \end{smallmatrix}}f(x,y)$ exists and equals L, $\lim _{x\to \infty }f(x,y)$ exists for each large y, and $\lim _{y\to \infty }f(x,y)$ exists for each large x, then $\lim _{x\to \infty }\lim _{y\to \infty }f(x,y)$ and $\lim _{y\to \infty }\lim _{x\to \infty }f(x,y)$ also exist, and they equal L, i.e.,
       $\lim _{x\to \infty }\lim _{y\to \infty }f(x,y)=\lim _{y\to \infty }\lim _{x\to \infty }f(x,y)=\lim _{\begin{smallmatrix}x\to \infty \\y\to \infty \end{smallmatrix}}f(x,y)$.
For example, let
    $f(x,y)={\frac {x\sin y}{xy+y}}$.
Since $\lim _{\begin{smallmatrix}x\to \infty \\y\to \infty \end{smallmatrix}}f(x,y)=0$, $\lim _{x\to \infty }f(x,y)={\frac {\sin y}{y}}$ and $\lim _{y\to \infty }f(x,y)=0$, we have
    $\lim _{y\to \infty }\lim _{x\to \infty }f(x,y)=\lim _{x\to \infty }\lim _{y\to \infty }f(x,y)=0$.
Again, this theorem requires the single limits $\lim _{x\to \infty }f(x,y)$ and $\lim _{y\to \infty }f(x,y)$ to exist. This condition cannot be dropped. For example, consider
    $f(x,y)={\frac {\cos x}{y}}$.
Then we may see that
    $\lim _{\begin{smallmatrix}x\to \infty \\y\to \infty \end{smallmatrix}}f(x,y)=\lim _{x\to \infty }\lim _{y\to \infty }f(x,y)=0$,
    but $\lim _{y\to \infty }\lim _{x\to \infty }f(x,y)$ does not exist.
This is because $\lim _{x\to \infty }f(x,y)$ does not exist for fixed y in the first place.

### Invalid converses of the theorems

The converses of Theorems 1, 3 and 4 do not hold, i.e., the existence of iterated limits, even if they are equal, does not imply the existence of the double limit. A counter-example is
    $f(x,y)={\frac {xy}{x^{2}+y^{2}}}$
near the point (0, 0). On one hand,
    $\lim _{x\to 0}\lim _{y\to 0}f(x,y)=\lim _{y\to 0}\lim _{x\to 0}f(x,y)=0$.
On the other hand, the double limit $\lim _{\begin{smallmatrix}x\to a\\y\to b\end{smallmatrix}}f(x,y)$ does not exist. This can be seen by taking the limit along the path (x, y) = (t, t) → (0,0), which gives
    $\lim _{\begin{smallmatrix}t\to 0\\t\to 0\end{smallmatrix}}f(t,t)=\lim _{t\to 0}{\frac {t^{2}}{t^{2}+t^{2}}}={\frac {1}{2}}$,
and along the path (x, y) = (t, t$^2$) → (0,0), which gives
    $\lim _{\begin{smallmatrix}t\to 0\\t^{2}\to 0\end{smallmatrix}}f(t,t^{2})=\lim _{t\to 0}{\frac {t^{3}}{t^{2}+t^{4}}}=0$.

## Moore-Osgood theorem for interchanging limits

In the examples above, we may see that interchanging limits may or may not give the same result. A sufficient condition for interchanging limits is given by the Moore-Osgood theorem. The essence of the interchangeability depends on uniform convergence.

### Interchanging limits of sequences

The following theorem allows us to interchange two limits of sequences.
    Theorem 5. If $\lim _{n\to \infty }a_{n,m}=b_{m}$ uniformly (in m), and $\lim _{m\to \infty }a_{n,m}=c_{n}$ for each large n, then both $\lim _{m\to \infty }b_{m}$ and $\lim _{n\to \infty }c_{n}$ exists and are equal to the double limit, i.e.,
       $\lim _{m\to \infty }\lim _{n\to \infty }a_{n,m}=\lim _{n\to \infty }\lim _{m\to \infty }a_{n,m}=\lim _{\begin{smallmatrix}n\to \infty \\m\to \infty \end{smallmatrix}}a_{n,m}$.
    Proof. By the uniform convergence, for any $\epsilon >0$ there exist $N_{1}(\epsilon )\in \mathbf {N}$ such that for all $m\in \mathbf {N}$, $n,k>N_{1}$ implies $\left|a_{n,m}-a_{k,m}\right|<{\frac {\epsilon }{3}}$.
    As $m\to \infty$, we have $\left|c_{n}-c_{k}\right|<{\frac {\epsilon }{3}}$, which means that $c_{n}$ is a Cauchy sequence which converges to a limit $L$. In addition, as $k\to \infty$, we have $\left|c_{n}-L\right|<{\frac {\epsilon }{3}}$.
    On the other hand, if we take $k\to \infty$ first, we have $\left|a_{n,m}-b_{m}\right|<{\frac {\epsilon }{3}}$.
    By the pointwise convergence, for any $\epsilon >0$ and $n>N_{1}$, there exist $N_{2}(\epsilon ,n)\in \mathbf {N}$ such that $m>N_{2}$ implies $\left|a_{n,m}-c_{n}\right|<{\frac {\epsilon }{3}}$.
    Then for that fixed $n$, $m>N_{2}$ implies $\left|b_{m}-L\right|\leq \left|b_{m}-a_{n,m}\right|+\left|a_{n,m}-c_{n}\right|+\left|c_{n}-L\right|\leq \epsilon$.
    This proves that $\lim _{m\to \infty }b_{m}=L=\lim _{n\to \infty }c_{n}$.
    Also, by taking $N=\max\{N_{1},N_{2}\}$, we see that this limit also equals $\lim _{\begin{smallmatrix}n\to \infty \\m\to \infty \end{smallmatrix}}a_{n,m}$.
A corollary is about the interchangeability of infinite sum.
    Corollary 5.1. If $\sum _{n=1}^{\infty }a_{n,m}$ converges uniformly (in m), and $\sum _{m=1}^{\infty }a_{n,m}$ converges for each large n, then $\sum _{m=1}^{\infty }\sum _{n=1}^{\infty }a_{n,m}=\sum _{n=1}^{\infty }\sum _{m=1}^{\infty }a_{n,m}$.
    Proof. Direct application of Theorem 5 on $S_{k,\ell }=\sum _{m=1}^{k}\sum _{n=1}^{\ell }a_{n,m}$.

### Interchanging limits of functions

Similar results hold for multivariable functions.
    Theorem 6. If $\lim _{x\to a}f(x,y)=g(y)$ uniformly (in y) on $Y\setminus \{b\}$, and $\lim _{y\to b}f(x,y)=h(x)$ for each x near a, then both $\lim _{y\to b}g(y)$ and $\lim _{x\to a}h(x)$ exists and are equal to the double limit, i.e.,
       $\lim _{y\to b}\lim _{x\to a}f(x,y)=\lim _{x\to a}\lim _{y\to b}f(x,y)=\lim _{\begin{smallmatrix}x\to a\\y\to b\end{smallmatrix}}f(x,y)$.
    The a and b here can possibly be infinity.
    Proof. By the existence uniform limit, for any $\epsilon >0$ there exist $\delta _{1}(\epsilon )>0$ such that for all $y\in Y\setminus \{b\}$, $0<\left|x-a\right|<\delta _{1}$ and $0<\left|w-a\right|<\delta _{1}$ implies $\left|f(x,y)-f(w,y)\right|<{\frac {\epsilon }{3}}$.
    As $y\to b$, we have $\left|h(x)-h(w)\right|<{\frac {\epsilon }{3}}$. By Cauchy criterion, $\lim _{x\to a}h(x)$ exists and equals a number $L$. In addition, as $w\to a$, we have $\left|h(x)-L\right|<{\frac {\epsilon }{3}}$.
    On the other hand, if we take $w\to a$ first, we have $\left|f(x,y)-g(y)\right|<{\frac {\epsilon }{3}}$.
    By the existence of pointwise limit, for any $\epsilon >0$ and $x$ near $a$, there exist $\delta _{2}(\epsilon ,x)>0$ such that $0<\left|y-b\right|<\delta _{2}$ implies $\left|f(x,y)-h(x)\right|<{\frac {\epsilon }{3}}$.
    Then for that fixed $x$, $0<\left|y-b\right|<\delta _{2}$ implies $\left|g(y)-L\right|\leq \left|g(y)-f(x,y)\right|+\left|f(x,y)-h(x)\right|+\left|h(x)-L\right|\leq \epsilon$.
    This proves that $\lim _{y\to b}g(y)=L=\lim _{x\to a}h(x)$.
    Also, by taking $\delta =\min\{\delta _{1},\delta _{2}\}$, we see that this limit also equals $\lim _{\begin{smallmatrix}x\to a\\y\to b\end{smallmatrix}}f(x,y)$.
Note that this theorem does not imply the existence of $\lim _{(x,y)\to (a,b)}f(x,y)$. A counter-example is $f(x,y)={\begin{cases}1\quad {\text{for}}\quad xy\neq 0\\0\quad {\text{for}}\quad xy=0\end{cases}}$ near (0,0).

### Interchanging limits of sequences of functions

An important variation of Moore-Osgood theorem is specifically for sequences of functions.
    Theorem 7. If $\lim _{n\to \infty }f_{n}(x)=f(x)$ uniformly (in x) on $X\setminus \{a\}$, and $\lim _{x\to a}f_{n}(x)=L_{n}$ for each large n, then both $\lim _{x\to a}f(x)$ and $\lim _{n\to \infty }L_{n}$ exists and are equal, i.e.,
       $\lim _{n\to \infty }\lim _{x\to a}f_{n}(x)=\lim _{x\to a}\lim _{n\to \infty }f_{n}(x)$.
    The a here can possibly be infinity.
    Proof. By the uniform convergence, for any $\epsilon >0$ there exist $N(\epsilon )\in \mathbf {N}$ such that for all $x\in D\setminus \{a\}$, $n,m>N$ implies $\left|f_{n}(x)-f_{m}(x)\right|<{\frac {\epsilon }{3}}$.
    As $x\to a$, we have $\left|L_{n}-L_{m}\right|<{\frac {\epsilon }{3}}$, which means that $L_{n}$ is a Cauchy sequence which converges to a limit $L$. In addition, as $m\to \infty$, we have $\left|L_{n}-L\right|<{\frac {\epsilon }{3}}$.
    On the other hand, if we take $m\to \infty$ first, we have $\left|f_{n}(x)-f(x)\right|<{\frac {\epsilon }{3}}$.
    By the existence of pointwise limit, for any $\epsilon >0$ and $n>N$, there exist $\delta (\epsilon ,n)>0$ such that $0<\left|x-a\right|<\delta$ implies $\left|f_{n}(x)-L_{n}\right|<{\frac {\epsilon }{3}}$.
    Then for that fixed $n$, $0<\left|x-a\right|<\delta$ implies $\left|f(x)-L\right|\leq \left|f(x)-f_{n}(x)\right|+\left|f_{n}(x)-L_{n}\right|+\left|L_{n}-L\right|\leq \epsilon$.
    This proves that $\lim _{x\to a}f(x)=L=\lim _{n\to \infty }L_{n}$.
A corollary is the continuity theorem for uniform convergence as follows:
    Corollary 7.1. If $\lim _{n\to \infty }f_{n}(x)=f(x)$ uniformly (in x) on $X$, and $f_{n}(x)$ are continuous at $x=a\in X$, then $f(x)$ is also continuous at $x=a$.
    In other words, the uniform limit of continuous functions is continuous.
    Proof. By Theorem 7, $\lim _{x\to a}f(x)=\lim _{x\to a}\lim _{n\to \infty }f_{n}(x)=\lim _{n\to \infty }\lim _{x\to a}f_{n}(x)=\lim _{n\to \infty }f_{n}(a)=f(a)$.
Another corollary is about the interchangeability of limit and infinite sum.
    Corollary 7.2. If $\sum _{n=0}^{\infty }f_{n}(x)$ converges uniformly (in x) on $X\setminus \{a\}$, and $\lim _{x\to a}f_{n}(x)$ exists for each large n, then $\lim _{x\to a}\sum _{n=0}^{\infty }f_{n}(x)=\sum _{n=0}^{\infty }\lim _{x\to a}f_{n}(x)$.
    Proof. Direct application of Theorem 7 on $S_{k}(x)=\sum _{n=0}^{k}f_{n}(x)$ near $x=a$.

## Applications
### Sum of infinite entries in a matrix

Consider a matrix of infinite entries
    ${\begin{bmatrix}1&-1&0&0&\cdots \\0&1&-1&0&\cdots \\0&0&1&-1&\cdots \\\vdots &\vdots &\vdots &\vdots &\ddots \end{bmatrix}}$.
Suppose we would like to find the sum of all entries. If we sum it column by column first, we will find that the first column gives 1, while all others give 0. Hence the sum of all columns is 1. However, if we sum it row by row first, it will find that all rows give 0. Hence the sum of all rows is 0.
The explanation for this paradox is that the vertical sum to infinity and horizontal sum to infinity are two limiting processes that cannot be interchanged. Let $S_{n,m}$ be the sum of entries up to entries (n, m). Then we have $\lim _{m\to \infty }\lim _{n\to \infty }S_{n,m}=1$, but $\lim _{n\to \infty }\lim _{m\to \infty }S_{n,m}=0$. In this case, the double limit $\lim _{\begin{smallmatrix}n\to \infty \\m\to \infty \end{smallmatrix}}S_{n,m}$ does not exist, and thus this problem is not well-defined.

### Integration over unbounded interval

By the integration theorem for uniform convergence, once we have $\lim _{n\to \infty }f_{n}(x)$ converges uniformly on $X$, the limit in n and an integration over a bounded interval $[a,b]\subseteq X$ can be interchanged:
    $\lim _{n\to \infty }\int _{a}^{b}f_{n}(x)\mathrm {d} x=\int _{a}^{b}\lim _{n\to \infty }f_{n}(x)\mathrm {d} x$.
However, such a property may fail for an improper integral over an unbounded interval $[a,\infty )\subseteq X$. In this case, one may rely on the Moore-Osgood theorem.
Consider $L=\int _{0}^{\infty }{\frac {x^{2}}{e^{x}-1}}\mathrm {d} x=\lim _{b\to \infty }\int _{0}^{b}{\frac {x^{2}}{e^{x}-1}}\mathrm {d} x$ as an example.
We first expand the integrand as ${\frac {x^{2}}{e^{x}-1}}={\frac {x^{2}e^{-x}}{1-e^{-x}}}=\sum _{k=0}^{\infty }x^{2}e^{-kx}$ for $x\in [0,\infty )$. (Here x=0 is a limiting case.)
One can prove by calculus that for $x\in [0,\infty )$ and $k\geq 1$, we have $x^{2}e^{-kx}\leq {\frac {4}{e^{2}k^{2}}}$. By Weierstrass M-test, $\sum _{k=0}^{\infty }x^{2}e^{-kx}$ converges uniformly on $[0,\infty )$.
Then by the integration theorem for uniform convergence, $L=\lim _{b\to \infty }\int _{0}^{b}\sum _{k=0}^{\infty }x^{2}e^{-kx}\mathrm {d} x=\lim _{b\to \infty }\sum _{k=0}^{\infty }\int _{0}^{b}x^{2}e^{-kx}\mathrm {d} x$.
To further interchange the limit $\lim _{b\to \infty }$ with the infinite summation $\sum _{k=0}^{\infty }$, the Moore-Osgood theorem requires the infinite series to be uniformly convergent.
Note that $\int _{0}^{b}x^{2}e^{-kx}\mathrm {d} x\leq \int _{0}^{\infty }x^{2}e^{-kx}\mathrm {d} x={\frac {2}{k^{3}}}$. Again, by Weierstrass M-test, $\sum _{k=0}^{\infty }\int _{0}^{b}x^{2}e^{-kx}$ converges uniformly on $[0,\infty )$.
Then by the Moore-Osgood theorem, $L=\lim _{b\to \infty }\sum _{k=0}^{\infty }\int _{0}^{b}x^{2}e^{-kx}=\sum _{k=0}^{\infty }\lim _{b\to \infty }\int _{0}^{b}x^{2}e^{-kx}=\sum _{k=0}^{\infty }{\frac {2}{k^{3}}}=2\zeta (3)$. (Here is the Riemann zeta function.)