---
title: Limit superior and the root test
heading: The eventual largest value of a sequence, and the sharpest test for series
eyebrow: A14 · Lesson 8 · Limit superior and the root test
xp: 40
---

::: hook
Many sequences never settle down, yet still have a definite "eventual range": $(-1)^n\left(1 + \frac1n\right)$ swings forever between values near −1 and near 1. The **limit superior** and **limit inferior** capture those eventual bounds, and they exist for every bounded sequence, convergent or not. They make the root test exact, give the radius of a power series in all cases (the ratio test can fail), set the region of convergence of a z-transform, and define the spectral radius that decides whether a discrete-time system is stable.
:::

::: play
- The stems are the sequence $a_n = (-1)^n\left(1 + \frac cn\right)$. The upper curve is $\sup_{k\ge n}a_k$ and the lower one $\inf_{k\ge n}a_k$.
- As n grows, the tail sups decrease toward 1 and the tail infs increase toward −1: those limits are the limsup and liminf.
- The sequence itself never converges, since its limsup and liminf differ. Set c = 0 and the stems sit exactly on ±1.
:::

```sim plot
view: graph
x: n = 1..30
y: a = -3.2..3.2
slider: c = 0..2 step 0.1 = 1
plot: cos(pi*n)*(1 + c/n) | stems | label: aₙ
plot: 1 + c/(2*ceil(n/2)) | label: sup of the tail | color: ch2
plot: -1 - c/(2*floor(n/2) + 1) | label: inf of the tail | color: ch3
```

::: predict
## What are $\limsup$ and $\liminf$ of $a_n = \sin\frac{n\pi}{2}$?

- [ ] Both 0
- [x] 1 and −1
- [ ] 1 and 0
- [ ] They don't exist, because the sequence doesn't converge

::: reveal
1 and −1. The sequence runs 1, 0, −1, 0, 1, 0, −1, …, so every tail contains 1 and −1: each tail's sup is 1 and its inf is −1. Limsup and liminf always exist for bounded sequences; the sequence converges exactly when they're equal.
:::
:::

::: nameit
## Definitions

For a sequence $a_n$, the tail sups $s_n = \sup_{k\ge n}a_k$ decrease as n grows (each tail is inside the previous one), and the tail infs increase. Both converge, in the extended reals at least:

$$\limsup a_n = \lim_{n\to\infty}\sup_{k\ge n}a_k, \qquad \liminf a_n = \lim_{n\to\infty}\inf_{k\ge n}a_k.$$

Equivalently, the limsup is the largest limit of any subsequence. Always $\liminf \le \limsup$, with equality exactly when $a_n$ converges.

## The root test

Let $\rho = \limsup\lvert a_k\rvert^{1/k}$. If ρ < 1, $\sum a_k$ converges absolutely; if ρ > 1, it diverges. The root test decides whenever the ratio test does, and sometimes when it doesn't.

## Radius of convergence

For $\sum c_kx^k$, the radius is $R = \frac{1}{\limsup\lvert c_k\rvert^{1/k}}$ (the Cauchy–Hadamard formula), with no conditions on the coefficients. For a right-sided signal x[n], the z-transform converges for $\lvert z\rvert > \limsup\lvert x[n]\rvert^{1/n}$.

## Spectral radius

For a square matrix, $\lim\lVert A^k\rVert^{1/k}$ exists and equals the largest $\lvert\lambda\rvert$ (Gelfand's formula). A discrete-time system $x_{k+1} = Ax_k$ decays exactly when that spectral radius is below 1, even if $\lVert A^k\rVert$ grows for a while first.
:::

::: example
## Test $\sum a_k$ where $a_k = 2^{-k}$ for even k and $3^{-k}$ for odd k.

::: solution
1. **Ratios from even k.** From even k to k + 1 the ratio is
   $$\frac{(2/3)^k}{3} \to 0$$
2. **Ratios from odd k.** From odd k to k + 1 it's
   $$\frac{(3/2)^k}{2} \to \infty$$
3. **The ratio test fails.** The ratios have no limit, and their limsup is infinite.
4. **The root test works.** $\lvert a_k\rvert^{1/k}$ is ½ for even k and ⅓ for odd k, so
   $$\limsup\lvert a_k\rvert^{1/k} = \frac12 < 1$$
   and the series converges.
5. **The sum.** Summing from k = 0,
   $$\begin{aligned} \sum a_k &= \sum_{k\text{ even}}2^{-k} + \sum_{k\text{ odd}}3^{-k} \\ &= \frac43 + \frac38 \\ &= \frac{41}{24} \\ &= 1.708 \end{aligned}$$

**Answer:** the ratio test fails, but the root test gives a limsup of ½, so the series converges, to $\frac{41}{24} = 1.708$.
:::
:::

::: example
## What is the region of convergence of the z-transform of $x[n] = (0.5)^n + (-0.9)^n$, n ≥ 0?

::: solution
1. **Take the nth root.**
   $$\lvert x[n]\rvert^{1/n} = \lvert 0.5^n + (-0.9)^n\rvert^{1/n}$$
2. **Find the limsup.** For large n the second term dominates, so this tends to 0.9; the limsup is 0.9.
3. **Region of convergence.** So the transform converges for $\lvert z\rvert > 0.9$, outside the circle through its larger pole.
4. **The smaller pole.** The pole at 0.5 is hidden inside: the region of convergence of a right-sided signal is set by its slowest-decaying component.

**Answer:** the z-transform converges for $\lvert z\rvert > 0.9$.
:::
:::

::: example
## $A = \begin{pmatrix}0.5 & 10\\ 0 & 0.5\end{pmatrix}$ has spectral radius 0.5. How does $\lVert A^k\rVert^{1/k}$ approach it?

::: solution
1. **Powers of A.**
   $$A^k = \begin{pmatrix}0.5^k & 10k \cdot 0.5^{k-1}\\ 0 & 0.5^k\end{pmatrix}$$
2. **Their norm.** With the max-row-sum norm,
   $$\lVert A^k\rVert = 0.5^k + 20k \cdot 0.5^k$$
3. **Take the kth root.** $\lVert A^k\rVert^{1/k}$ is 0.850 at k = 10, 0.574 at k = 50 and 0.521 at k = 200.
4. **The limit.** The limit is 0.5, as Gelfand's formula says, but the approach is slow because of the factor 20k.
5. **Transient growth.** The system decays eventually, yet $\lVert A^k\rVert$ first jumps to about 10 at k = 1 and 2. That transient growth, typical of non-symmetric systems, can saturate a real amplifier before the decay sets in.

**Answer:** $\lVert A^k\rVert^{1/k}$ approaches 0.5 slowly (0.850 at k = 10, 0.574 at k = 50, 0.521 at k = 200), held back by the factor 20k.
:::
:::

::: check
kind: parts
given: a = 0 | 2; b = 1 | 3; c = 1 | 5

## $a_n = \given{a} + (-1)^n\given{b} + \frac{\given{c}}{n}$.

::: part
answer: a + b
tolerance: 0.5%

### What is $\limsup a_n$?

::: misses
- [a + b + c] The $\frac cn$ term dies out.
- [any] The even terms approach $a + b$.
:::
:::

::: part
answer: a - b
tolerance: 0.5%

### What is $\liminf a_n$?

::: misses
- [any] The odd terms approach $a - b$.
:::
:::
:::

::: check
given: c = 1 | 2; d = 3 | 5
answer: c/d
tolerance: 0.5%

## The root test on $\sum\left(\frac{\given{c}k}{\given{d}k + 1}\right)^k$: what is $\lim\lvert a_k\rvert^{1/k}$?

::: right
Right. $\frac{ck}{dk + 1} \to \frac cd < 1$, so the series converges.
:::

::: misses
- [any] $\lvert a_k\rvert^{1/k} = \frac{ck}{dk + 1}$.
:::
:::

::: check
given: a = 2 | 3; b = 4 | 5
answer: 1/b
tolerance: 0.5%

## A power series has $c_k = \given{a}^k$ for even k and $\given{b}^k$ for odd k. What is its radius of convergence?

::: right
Right. $\limsup\lvert c_k\rvert^{1/k} = b$, so R = 1/b.
:::

::: misses
- [1/a] The limsup takes the larger of the two rates.
- [any] Cauchy–Hadamard: $R = 1/\limsup\lvert c_k\rvert^{1/k}$.
:::
:::

::: check
given: a = 0.5 | 0.7; b = 0.8 | 0.95
answer: b
tolerance: 0.5%

## $x[n] = \given{a}^n + (-\given{b})^n$ for n ≥ 0. The z-transform converges for $\lvert z\rvert > r$. What is r?

::: right
Right. The slower-decaying term sets the limsup of $\lvert x[n]\rvert^{1/n}$.
:::

::: misses
- [a] The faster-decaying term is invisible in the limit.
- [any] $\limsup\lvert x[n]\rvert^{1/n}$.
:::
:::

::: check
given: k = 10 | 50 | 200
answer: (0.5^k + 20*k*0.5^k)^(1/k)
tolerance: 0.5%

## For $A = \begin{pmatrix}0.5 & 10\\ 0 & 0.5\end{pmatrix}$, $\lVert A^k\rVert_\infty = 0.5^k(1 + 20k)$. What is $\lVert A^k\rVert^{1/k}$ for k = {k}?

::: right
Right. It approaches the spectral radius 0.5 slowly, as $(1 + 20k)^{1/k} \to 1$.
:::

::: misses
- [0.5] That's the limit; at finite k the factor $(1 + 20k)^{1/k}$ is still above 1.
- [any] $0.5(1 + 20k)^{1/k}$.
:::
:::

::: check
kind: parts
given: p = 1..8 int

## $a_k = \frac{1}{k^{\given{p}}}$.

::: part
answer: 1
tolerance: 0.5%

### What is $\lim a_k^{1/k}$?

::: misses
- [0] $k^{-p/k} = e^{-p\ln k/k} \to 1$.
- [any] $\frac{p\ln k}{k} \to 0$.
:::
:::

::: part
answer: 1
tolerance: 0.5%

### What is $\lim\frac{a_{k+1}}{a_k}$?

::: misses
- [any] $\left(\frac{k}{k + 1}\right)^p \to 1$: both tests are inconclusive for p-series, though this one converges.
:::
:::
:::

::: check
kind: choice

## Which statement about a bounded real sequence is always true?

- [ ] Its limsup equals its supremum
- [x] It converges exactly when its limsup and liminf are equal
- [ ] Its limsup is a term of the sequence
- [ ] Its limsup is at least its liminf only if it converges

::: right
Right. Limsup and liminf always exist for bounded sequences, and squeezing them together is the same as converging.
:::

::: misses
- [1] The sup can come from early terms; the limsup only looks at tails. For $\frac1n$ the sup is 1 and the limsup 0.
- [3] For $\frac1n$ the limsup 0 is never attained.
- [4] $\liminf \le \limsup$ always holds.
:::
:::

::: check
kind: derivation
vars: c = 0.5..2, d = 2.5..5, k = 1..100

## The root test on $a_k = \left(\frac{ck}{dk + 1}\right)^k$.

::: step
answer: c*k/(d*k + 1)

### What is $a_k^{1/k}$?
:::

::: step
answer: c/d

### What is its limit as k grows?
:::

::: right
Right. Below 1 since c < d, so the series converges, and its terms shrink roughly like $(c/d)^k$.
:::
:::

::: check
kind: python

## For $A = \begin{pmatrix}0.5 & 10\\ 0 & 0.5\end{pmatrix}$, set `r` to $\lVert A^k\rVert_\infty^{1/k}$ for k = 10, 50, 200 (use `np.linalg.matrix_power` and `np.linalg.norm(..., np.inf)`), and `rho` to the spectral radius.

```python starter
import numpy as np

r = [1.0, 1.0, 1.0]
rho = 0.0
print(r, rho)
```

```python solution
import numpy as np

A = np.array([[0.5, 10.0], [0.0, 0.5]])
r = [np.linalg.norm(np.linalg.matrix_power(A, k), np.inf)**(1 / k) for k in (10, 50, 200)]
rho = max(abs(np.linalg.eigvals(A)))
print(r, rho)
```

```python tests
assert abs(r[0] - 0.849747) < 1e-5 and abs(r[2] - 0.521172) < 1e-5, f"Expect 0.8497 at k = 10 and 0.5212 at k = 200; got {r}."
assert abs(rho - 0.5) < 1e-12 and r[0] > r[1] > r[2] > rho, "The k-th roots should decrease toward the spectral radius 0.5."
```

::: right
Right. 0.850, 0.574, 0.521, closing slowly on 0.5, as Gelfand's formula promises.
:::
:::

::: explain
## Why is the root test at least as strong as the ratio test?

::: model
If the ratios $\left\lvert\frac{a_{k+1}}{a_k}\right\rvert$ eventually stay below some r < 1, then from that point on $\lvert a_k\rvert$ is at most a constant times $r^k$, so $\lvert a_k\rvert^{1/k}$ is at most $C^{1/k}r$, which tends to r. So whenever the ratio test proves convergence, the root test does too, with a limsup no larger. The reverse fails: ratios can jump wildly, as when even and odd terms decay at different rates, while the k-th roots still settle below 1. The root test looks at the overall exponential rate and ignores how the terms alternate on the way.
:::
:::

::: practice

::: check
given: a = 1 | -2; b = 2 | 0.5; c = 3 | 1
answer: a + b
tolerance: 0.5%

## limsup of $\given{a} + (-1)^n\given{b} + \frac{\given{c}}{n}$?

::: misses
- [any] $a + b$.
:::
:::

::: check
given: a = 1.5 | 2; b = 6 | 10
answer: 1/b
tolerance: 0.5%

## Radius with $c_k = \given{a}^k$ (even), $\given{b}^k$ (odd)?

::: misses
- [any] $1/b$.
:::
:::
:::
