---
title: Taylor and Laurent series
heading: Power series, and what decides where they converge
eyebrow: A12 · Lesson 15 · Taylor and Laurent series
xp: 40
---

::: hook
Every analytic function can be written as a power series around any point where it's analytic, and the series converges in the largest disk that avoids the function's singularities. That explains a puzzle from real calculus: the Taylor series of $1/(1 + x^2)$ at 0 diverges for $\lvert x\rvert > 1$, although the function is perfectly smooth on the whole real line. The reason is off the real line: singularities at $\pm j$, a distance 1 from the origin. Near a singularity, a **Laurent series** with negative powers takes over, and its coefficient of $1/(z - a)$ is the key to evaluating integrals (next lesson). The regions of convergence of C9's z-transforms are these same annuli.
:::

::: play
- The solid curve is $1/(1 + x^2)$ on the real line; the dashed curve is its Taylor series at 0, $1 - x^2 + x^4 - \cdots$, cut off after N + 1 terms.
- Raise N: inside $\lvert x\rvert < 1$ the partial sums close in on the function. Outside, they swing wildly, worse with every term.
- Nothing happens on the real line at $x = \pm1$. The series stops converging there because the circle of radius 1 around the origin passes through the singularities at $\pm j$.
:::
:::

```sim plot
view: graph
x: x = -1.6..1.6
y: y = -1.5..2.5
slider: N = 0..30 step 1 = 6
plot: 1/(1 + x^2) | label: 1/(1 + x²)
plot: (1 - (-x^2)^(N + 1))/(1 + x^2) | dashed | samples: 800 | label: N + 1 terms
marker: x = 1 | label: radius of convergence
marker: x = -1
readout: radius of convergence = 1
```

::: predict
## Around $z = 2$, how far does the Taylor series of $1/(1 + z^2)$ converge?

- [ ] 1
- [ ] 2
- [x] $\sqrt5$
- [ ] Everywhere

::: reveal
$\sqrt5 \approx 2.24$: the distance from 2 to the nearest singularity, $\pm j$, is $\lvert 2 - j\rvert = \sqrt5$. The radius of convergence is always the distance to the nearest singularity, whether or not it's visible on the real line.
:::
:::

::: nameit
## Taylor series

If f is analytic in a disk $\lvert z - a\rvert < R$, then there

$$f(z) = \sum_{n=0}^{\infty} c_n (z - a)^n, \qquad c_n = \frac{f^{(n)}(a)}{n!} = \frac{1}{2\pi j}\oint\frac{f(z)}{(z - a)^{n+1}}dz$$

The **radius of convergence** is the distance from a to the nearest singularity. Standard series: $\frac{1}{1 - z} = \sum z^n$ for $\lvert z\rvert < 1$; $e^z = \sum z^n/n!$ everywhere.

## Laurent series

In an annulus $r < \lvert z - a\rvert < R$ where f is analytic, it has a series in positive and negative powers:

$$f(z) = \sum_{n=-\infty}^{\infty} c_n (z - a)^n$$

with the same coefficient formula. The negative powers are the **principal part**. A function can have different Laurent series in different annuli around the same point, one for each ring between singularities.

## The coefficient that matters

Integrating a Laurent series term by term around a circle in the annulus kills every term except $n = -1$ (lesson 11):

$$\oint f\,dz = 2\pi j\,c_{-1}$$

$c_{-1}$ is the **residue** (lesson 16).

## z-transforms

A z-transform $X(z) = \sum x[n]z^{-n}$ is a Laurent series in z. Its region of convergence is an annulus: for a right-sided signal $a^n u[n]$, $X = 1/(1 - az^{-1})$ for $\lvert z\rvert > \lvert a\rvert$, outside the pole.
:::

::: example
## Find the Laurent series of $\frac{1}{z(1 - z)}$ for $0 < \lvert z\rvert < 1$ and for $\lvert z\rvert > 1$.

::: solution
1. **Partial fractions.**
   $$\frac{1}{z(1 - z)} = \frac1z + \frac{1}{1 - z}$$
2. **Inside the unit circle.** For $0 < \lvert z\rvert < 1$ the geometric series gives
   $$\frac1z + 1 + z + z^2 + \cdots$$
   so $c_{-1} = 1$.
3. **Outside the unit circle.** For $\lvert z\rvert > 1$, expand in $1/z$:
   $$\begin{aligned} \frac{1}{1 - z} &= -\frac1z\cdot\frac{1}{1 - 1/z} \\ &= -\frac1z - \frac1{z^2} - \cdots \end{aligned}$$
   so the series is $-\frac{1}{z^2} - \frac{1}{z^3} - \cdots$ and $c_{-1} = 0$.
4. **Check.** That's consistent with $\oint = 2\pi j(1 - 1) = 0$ around both poles.

**Answer:** for $0 < \lvert z\rvert < 1$ the series is $\frac1z + 1 + z + z^2 + \cdots$ (with $c_{-1} = 1$), and for $\lvert z\rvert > 1$ it is $-\frac{1}{z^2} - \frac{1}{z^3} - \cdots$ (with $c_{-1} = 0$).
:::
:::

::: example
## The partial sum of $1 - x^2 + x^4 - \cdots$ through $(-1)^Nx^{2N}$ equals $\frac{1 - (-x^2)^{N+1}}{1 + x^2}$. How far off is it at x = 0.5 with N = 4?

::: solution
1. **Error at x = 0.5.** The error is
   $$\begin{aligned} \frac{(x^2)^{N+1}}{1 + x^2} &= \frac{0.25^5}{1.25} \\ &= 7.8 \times 10^{-4} \end{aligned}$$
2. **At x = 1.2.** The same expression is
   $$\frac{1.44^5}{2.44} = 2.5$$
   and growing: no convergence.

**Answer:** at x = 0.5 the partial sum is off by $7.8 \times 10^{-4}$.
:::
:::

::: example
## Expand $f(z) = \frac{1}{(z - 1)(z - 3)}$ in the annulus $1 < \lvert z\rvert < 3$, and read off $\oint f\,dz$ around $\lvert z\rvert = 2$.

::: solution
1. **Partial fractions.**
   $$f = \frac12\left(\frac{1}{z - 3} - \frac{1}{z - 1}\right)$$
2. **Pick the small ratios.** In the annulus, $\lvert z/3\rvert < 1$ and $\lvert 1/z\rvert < 1$, so expand each piece in the ratio that is small.
3. **Expand the first piece.**
   $$\begin{aligned} \frac{1}{z - 3} &= -\frac13\cdot\frac{1}{1 - z/3} \\ &= -\sum_{n\ge0}\frac{z^n}{3^{n+1}} \end{aligned}$$
4. **Expand the second piece.**
   $$\begin{aligned} \frac{1}{z - 1} &= \frac1z\cdot\frac{1}{1 - 1/z} \\ &= \sum_{n\ge1}z^{-n} \end{aligned}$$
5. **Combine.**
   $$\begin{aligned} f &= -\frac12\sum_{n\ge0}\frac{z^n}{3^{n+1}} \\ &\quad - \frac12\sum_{n\ge1}z^{-n} \end{aligned}$$
6. **Read off the integral.** The coefficient of $z^{-1}$ is $-\frac12$, so around $\lvert z\rvert = 2$
   $$\begin{aligned} \oint f\,dz &= 2\pi j\left(-\frac12\right) \\ &= -\pi j \end{aligned}$$

**Answer:** $f = -\frac12\sum_{n\ge0}\frac{z^n}{3^{n+1}} - \frac12\sum_{n\ge1}z^{-n}$ in the annulus, and $\oint f\,dz = -\pi j$ around $\lvert z\rvert = 2$.
:::
:::

::: check
given: a = 0 | 1 | 2 | 3
answer: sqrt(a^2 + 1)
tolerance: 0.5%

## What's the radius of convergence of the Taylor series of $1/(1 + z^2)$ around $z = \given{a}$?

::: right
Right. The distance to $\pm j$: $\sqrt{a^2 + 1}$ = {answer}.
:::

::: misses
- [a] The singularities are at $\pm j$, not at 0.
- [any] Not yet. The distance from {a} to the nearest singularity.
:::
:::

::: check
given: p = 2 | 3 | -4; a = 0 | 1
answer: abs(p - a)
tolerance: 0.5%

## A function's only singularity is at $z = \given{p}$. How far does its Taylor series around $z = \given{a}$ converge?

::: right
Right. {answer}.
:::

::: misses
- [any] Not yet. The distance from the center to the singularity.
:::
:::

::: check
given: x = 0.3 | 0.5 | 0.8; N = 2 | 5
answer: (x^2)^(N + 1)/(1 + x^2)
tolerance: 1%

## How large is the error of the Taylor series of $1/(1 + x^2)$ at x = {x}, cut off after the $x^{2N}$ term with N = {N}?

::: right
Right. $\frac{(x^2)^{N+1}}{1 + x^2}$ = {answer}.
:::

::: misses
- [any] Not yet. The partial sum is $\frac{1 - (-x^2)^{N+1}}{1 + x^2}$.
:::
:::

::: check
given: n = 3 | 4 | 5
answer: 1/n!
tolerance: 0.5%

## What's the coefficient of $z^{\given{n}}$ in the Taylor series of $e^z$ at 0?

::: right
Right. $1/n!$ = {answer}.
:::

::: misses
- [1/n] It's $1/n!$, from $f^{(n)}(0)/n!$.
- [any] Not yet. $c_n = f^{(n)}(0)/n!$.
:::
:::

::: check
given: a = 0.5 | 0.9 | 2
answer: abs(a)
tolerance: 0.5%

## A right-sided signal $x[n] = (\given{a})^n u[n]$ has $X(z) = 1/(1 - az^{-1})$. The region of convergence is $\lvert z\rvert >$ what?

::: right
Right. $\lvert a\rvert$ = {answer}: outside the pole.
:::

::: misses
- [1/a] The pole is at z = a.
- [any] Not yet. Where is the pole?
:::
:::

::: check
given: c = 1 | 2 | 5
answer: 2*pi*c
tolerance: 0.5%

## A function's Laurent series around 0 is $\frac{\given{c}}{z} + 3 + 4z + \cdots$ in $0 < \lvert z\rvert < 2$. What's Im $\oint f\,dz$ around $\lvert z\rvert = 1$?

::: right
Right. $2\pi j c_{-1}$: imaginary part {answer}.
:::

::: misses
- [any] Not yet. Only the $1/z$ term survives integration.
:::
:::

::: check
kind: choice

## $1/(z(z - 2))$ has two Laurent series around 0. In which region does the one with infinitely many negative powers converge?

- [ ] $\lvert z\rvert < 2$
- [ ] $0 < \lvert z\rvert < 2$
- [x] $\lvert z\rvert > 2$
- [ ] Everywhere

::: misses
- [1] That excludes 0, where there's a pole anyway, and near 0 only one negative power is needed.
- [2] There the series has just $1/z$ as its negative part.
- [4] No series converges through the pole at 2.
:::
:::

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

## $f = \frac{1}{(z - \given{a})(z - \given{b})}$ in the annulus $\given{a} < \lvert z\rvert < \given{b}$.

::: part
answer: 1/(a - b)
tolerance: 0.5%

### What is the coefficient of $z^{-1}$?

::: misses
- [1/(b - a)] Only the pole at a is inside the annulus's inner circle, and its residue is $\frac{1}{a - b}$.
- [any] Split into partial fractions.
:::
:::

::: part
answer: 1/((a - b)*b)
tolerance: 0.5%

### What is the coefficient of $z^0$?

::: misses
- [any] Only $-\frac{1}{a - b}\cdot\frac{1}{z - b} = \frac{1}{(a - b)b}\cdot\frac{1}{1 - z/b}$ has a constant term.
:::
:::
:::

::: check
kind: derivation
vars: a = 0.1..0.9

## The geometric series $\sum_{n\ge0}a^n$ with $\lvert a\rvert < 1$.

::: step
answer: 1/(1 - a)

### What is its sum?
:::

::: step
answer: a^5/(1 - a)

### What error remains after the first five terms?
:::

::: right
Right. The tail $a^5 + a^6 + \cdots$ is $a^5$ times the whole sum, so it shrinks fastest when a is far inside the circle of convergence.
:::
:::

::: explain
## Why does the Taylor series of $1/(1 + x^2)$ at 0 diverge for $\lvert x\rvert > 1$, when the function is smooth on the whole real line?

::: model
A power series converges inside a disk, the same distance in every direction of the complex plane, and that disk can't contain a singularity. Viewed as a function of a complex variable, $1/(1 + z^2)$ blows up at $z = \pm j$, at distance 1 from the origin. So the series around 0 can converge only for $\lvert z\rvert < 1$, and on the real axis that means $\lvert x\rvert < 1$. The obstruction is invisible on the real line but completely decides the series' behavior there, a strong argument for thinking of real functions as complex ones.
:::
:::

::: practice

::: check
given: a = -4 | -2 | -1 | 1 | 2 | 3 | 4
answer: sqrt(a^2 + 1)
tolerance: 0.5%

## Radius of convergence of $1/(1 + z^2)$ around {a}?

::: misses
- [any] Distance to $\pm j$.
:::
:::

::: check
given: n = 2..9 int
answer: 1/n!
tolerance: 0.5%

## Coefficient of $z^{\given{n}}$ in $e^z$?

::: misses
- [any] $1/n!$.
:::
:::

::: check
given: c = 1..12 int
answer: 2*pi*c
tolerance: 0.5%

## Im $\oint$ with $c_{-1} = \given{c}$?

::: misses
- [any] $2\pi c_{-1}$.
:::
:::
:::
