Author Archives: lee

Applications of Residues: Evaluation of Improper Integrals 2

In this lecture, we study improper integrals of the form $\int_{-\infty}^\infty f(x)\sin axdx$ or $\int_{-\infty}^\infty f(x)\cos axdx$, where $a$ denotes a positive constant. These integrals appear in Fourier analysis. Assume that $f(x)=\frac{p(x)}{q(x)}$, where $p(x)$ and $q(x)$ are polynomials with real coefficients and no factors in common. Also, $q(z)$ has no real zeros. We discuss how to evaluate improper integrals of the above type through the following example.

Example. Evaluate $\int_{-\infty}^\infty\frac{\cos 3x}{(x^2+1)^2}dx$.

Solution. Let $f(z)=\frac{1}{(z^2+1)^2}$. Then $f(z)e^{3iz}$ is analytic everywhere on and above the real axis except at $z=i$. Let $C_R$ be the upper semi-circle centered at the origin with radius $R>1$. Then by Cauchy’s Residue Theorem,
$$\int_{-R}^R\frac{e^{i3x}}{(x^2+1)^2}dx=2\pi i B_1-\int_{C_R}f(z)e^{i3z}dz,$$
where $B_1=\mathrm{Res}_{z=i}[f(z)e^{i3z}]$. $f(z)e^{i3z}$ can be written as
$$f(z)e^{i3z}=\frac{\phi(z)}{(z-i)^2},$$
where $\phi(z)=\frac{e^{i3z}}{(z+i)^2}$. Since $z=i$ is a pole of order $2$ of $f(z)$,
$$B_1=\phi’(i)=\frac{1}{ie^3}.$$
On $C_R$, $|z|=R$ and so by triangle inequality we obtain
$$|(z+i)^2|\geq (R^2-1)^2$$
and thereby
$$|f(z)|\leq\frac{1}{(R^2-1)^2}.$$
$|e^{i3z}|=e^{-3y}\leq 1$ for all $y\geq 0$. Hence, we find that
$$\left|\mathrm{Re}\int_{C_R}f(z)e^{i3z}dz\right|\leq\left|\int_{C_R}f(z)e^{i3z}dz\right|\leq\frac{\pi R}{(R^2-1)^2}\to 0$$
as $R\to\infty$. Therefore,
$$\int_{-\infty}^\infty\frac{e^{i3x}}{(x^2+1)^2}dx=\frac{2\pi}{e^3}.$$

Applications of Residues: Evaluation of Improper Integrals

Recall the definition of improper integrals in calculus:
\begin{align*}
\int_0^\infty f(x)dx&=\lim_{R\to\infty}\int_0^R f(x)dx,\\
\int_{-\infty}^\infty f(x)dx&=\lim_{R_1\to\infty}\int_{-R_1}^0 f(x)dx+\lim_{R_2\to\infty}\int_0^{R_2}f(x)dx.
\end{align*}
The Cauchy Principal Value (P.V.) is given by
$$\mathrm{P.V.}\int_{-\infty}^\infty f(x)dx=\lim_{R\to\infty}\int_{-R}^R f(x)dx.$$
The Cauchy principal value of an improper integral is not necessarily the same as the improper integral. For example,
$$\mathrm{P.V}\int_{-\infty}^\infty xdx=\lim_{R\to\infty}\int_{-R}^R xdx=0,$$
while
$$\int_{-\infty}^\infty xdx=\lim_{R_1\to\infty}\int_{-R_1}^0xdx+\lim_{R_2\to\infty}\int_0^{R_2}xdx=-\infty+\infty$$
is undefined. In general, if $\int_{-\infty}^\infty f(x)dx<\infty$ then $\mathrm{R.V.}\int_{-\infty}^\infty f(x)dx<0$, but the converse need not be true. Suppose that $f(x)$ is an even function. Then
\begin{align*}
\int_0^R f(x)dx&=\frac{1}{2}\int_{-R}^R f(x)dx,\\
\int_{-R_1}^0 f(x)dx&=\int_0^{R_1}f(x) dx.
\end{align*}
So,
$$\mathrm{P.V.}\int_{-\infty}^\infty f(x)dx=\int_{-\infty}^\infty f(x)dx=2\int_0^\infty f(x)dx.$$

Let us consider an even function $f(x)$ of the form $f(x)=\frac{p(x)}{q(x)}$, where $p(x)$, $q(x)$ are polynomials with real coefficients no factors in common. Furthermore, we assume that $q(z)$ has no real zeros but has at least one zero above the real axis. Let us consider a positively oriented upper semicircle $C_R$ whose radius $R$ is large enough to contain all the zeros above the real axis as shown in the figure below.

$C_R$ together with the interval $[-R,R]$ form a positively oriented simple closed contour. Then by Cauchy’s Residue Theorem we have
$$\int_{-R}^R f(x)dx+\int_{C_R} f(z)dz=2\pi i\sum_{k=1}^n\mathrm{Res}_{z=z_k}f(z),$$
i.e.
$$\int_{-R}^R f(x)dx=2\pi i\sum_{k=1}^n\mathrm{Res}_{z=z_k}f(z)-\int_{C_R} f(z)dz.$$
If $\lim_{R\to\infty}\int_{C_R} f(z)dz=0$ then
$$\mathrm{P.V.}\int_{-\infty}^\infty f(x)dx=2\pi i\sum_{k=1}^n\mathrm{Res}_{z=z_k}f(z).$$
If in addition $f(x)$ is even,
$$\int_{-\infty}^\infty f(x)dx=2\pi i\sum_{k=1}^n\mathrm{Res}_{z=z_k}f(z)$$
or
$$\int_0^\infty f(x)dx=\pi i\sum_{k=1}^n\mathrm{Res}_{z=z_k}f(z).$$

Example. Let us consider the improper integral
$$\int_0^\infty\frac{x^2}{x^6+1}dx.$$
Let $f(z)=\frac{z^2}{z^6+1}$ has isolated singularities at the zeros of $z^6+1$, and is analytic everywhere else. $z^6=-1$ has solutions (the sixth roots of $-1$)
$$c_k=\exp\left[i\left(\frac{\pi}{6}+\frac{2k\pi}{6}\right)\right],\ k=0,1,\cdots,5.$$
The first three roots
$$c_0=e^{i\frac{\pi}{6}},\ c_1=i,\ c_2=e^{i\frac{5\pi}{6}}$$
lie in the upper half plane. Let us consider a positively oriented upper semicircle $C_R$ whose radius $R$ is greater than $1$.

Then
$$\int_{-R}^Rf(x)dx=2\pi(B_0+B_1+B_2)-\int_{C_R}f(z)dz,$$
where $B_k$ is the residue of $f(z)$ at $c_k$, $k=0,1,2$. $B_k$ can be found as we studied here
$$B_k=\mathrm{Res}_{z=c_k}\frac{z^2}{z^6+1}=\frac{c_k^2}{6c_k^5}=\frac{1}{6c_k^3},\ k=0,1,2.$$
Thus, we obtain
$$2\pi(B_0+B_1+B_2)=2\pi\left(\frac{1}{6i}-\frac{1}{6i}+\frac{1}{6i}\right)=\frac{\pi}{3}$$
and hence,
$$\int_{-R}^R f(x)dx=\frac{\pi}{3}-\int_{C_R}f(z)dz.$$
On $C_R$, $|z|=R$ so
$$|z^6+1|\geq ||z|^6-1|=|R^6-1|=R^6-1$$
and thereby we obtain
$$|f(z)|\leq\frac{R^2}{R^6-1}.$$
Since the length of $C_R$ is $\pi R$,
$$\left|\int_{C_R} f(z)dz\right|\leq\frac{R^2}{R^6-1}\cdot\pi R\to 0$$
as $R\to\infty$. Hence,
$$\mathrm{P.V.}\int_{-\infty}^\infty\frac{x^2}{x^6+1}dx=\lim_{R\to\infty}\frac{x^2}{x^6+1}dx=\frac{\pi}{3}.$$
Since the integrand is even,
$$\int_{-\infty}^\infty\frac{x^2}{x^6+1}dx=\frac{\pi}{3}$$
and
$$\int_0^\infty\frac{x^2}{x^6+1}dx=\frac{\pi}{6}.$$

Zeros and Poles

Zeros and poles are closely related and their relationship may be used to calculates residues. First we introduce two theorems without proof. (Their proofs can be found, for instance, in [1].)

Theorem 1. A function $f$ is that is analytic at a point $z_0$ has a zero of order $m$ there if and only if there is a function $g$, which is analytic and nonzero at $z_0$, such that
$$f(z)=(z-z_0)^mg(z).$$

Theorem 2. Suppose that:

(i) two functions $p$ and $q$ are analytic at a point $z_0$;

(ii) $p(z_0)\ne 0$ and $q$ has a zero of order $m$ at $z_0$.

Then $\frac{p(z)}{q(z)}$ has a pole of order $m$ at $z_0$.

Now we discuss our main theorem in this lecture.

Theorem. Let two functions $p$ and $q$ be analytic at a point $z_0$. If
$$p(z_0)\ne 0,\ q(z_0)=0,\ \mbox{and}\ q’(z_0)\ne 0,$$
thenĀ  $z_0$ is a simple pole of $\frac{p(z)}{q(z)}$ and
$$\mathrm{Res}_{z=z_0}\frac{p(z)}{q(z)}=\frac{p(z_0)}{q’(z_0)}.$$

Proof. From the conditions, we see that $q(z)$ has a zero of order $1$, so by theorem 1 it can be written as
$$q(z)=(z-z_0)g(z)$$
where $g(z)$ is analytic at $z=z_0$ and $g(z_0)\ne 0$. This can be in fact readily seen without quoting theorem 1. Since $q(z)$ is analytic at $z_0$, it can be written as a Taylor series expansion
\begin{align*}
q(z)&=q(z_0)+\frac{q’(z_0)}{1!}(z-z_0)+\frac{q^{\prime\prime}(z_0)}{2!}(z-z_0)^2+\cdots\\
&=\frac{q’(z_0)}{1!}(z-z_0)+\frac{q^{\prime\prime}(z_0)}{2!}(z-z_0)^2+\cdots\\
&=(z-z_0)\left\{\frac{q’(z_0)}{1!}+\frac{q^{\prime\prime}(z_0)}{2!}(z-z_0)+\cdots\right\}.
\end{align*}
Set $g(z)=\frac{q’(z_0)}{1!}+\frac{q^{\prime\prime}(z_0)}{2!}(z-z_0)+\cdots$. Then $g(z)$ is analytic at $z=z_0$ and that $g(z_0)=q’(z_0)\ne 0$.

Now, theorem 2 implies that $\frac{p(z)}{q(z)}$ has a simple pole at $z=z_0$, but without quoting theorem 2, $\frac{p(z)}{q(z)}=\frac{\frac{p(z)}{g(z)}}{z-z_0}$, $\frac{p(z)}{g(z)}$ is analytic and nonzero at $z=z_0$. So, $\frac{p(z)}{q(z)}$ has a simple pole at $z=z_0$ as we studied here. Thus,
$$\mathrm{Res}_{z=z_0}\frac{p(z)}{q(z)}=\frac{p(z_0)}{g(z_0)}=\frac{p(z_0)}{q’(z_0)}.$$
This completes the proof.

Example. Find the residue of the functions
$$f(z)=\frac{z}{z^4+4}$$
at the isolated singularity $z_0=\sqrt{2}e^{\frac{i\pi}{4}}=1+i$.

Solution. Let $p(z)=z$ and $q(z)=z^4+4$. Then $p(z_0)=p(1+i)=1+i\ne 0$, $q(z_0)=0$, and $q’(z_0)=4z_0^3=4(1+i)^3\ne 0$. Hence, $f(z)$ has a simple pole at $z_0$. The residue $B_)$ is found by
$$B_0=\mathrm{Res}_{z=z_0}f(z)=\frac{p(z_0)}{q’(z_0)}=\frac{z_0}{3z_0^3}=\frac{1}{4z_0^2}=-\frac{i}{8}.$$

References:

[1] James Brown and Ruel Churchill, Complex Variables and Applications, 8th Edition, McGraw-Hill, 2008

Residues at Poles

When $f(z)$ has a pole of order $m$, we may be able to find the residue of $f(z)$ at $z_0$ without expanding $f(z)$ into a Laurent series at $z=z_0$. This gives a great computational advantage.

Suppose that $z_0$ is a pole of order $m$ of $f(z)$. Then $f(z)$ has a Laurent series expansion
$$f(z)=\sum_{n=0}^\infty a_n(z-z_0)^n+\frac{b_1}{z-z_0}+\frac{b_2}{(z-z_0)^2}+\cdots+\frac{b_m}{(z-z_0)^m}\ (b_m\ne 0)$$
valid in a punctured disk $0<|z-z_0|<R$.
Define
$$\phi(z)=\left\{\begin{array}{ccc}
(z-z_0)^mf(z) & \mbox{if} & z\ne z_0,\\
b_m & \mbox{if} & z=z_0.
\end{array}\right.$$
Then $\phi(z)$ has a power series representation
$$\phi(z)=b_m+b_{m-1}(z-z_0)+\cdots+b_2(z-z_0)^{m-2}+b_1(z-z_0)^{m-1}+\sum_{n=0}^\infty(z-z_0)^{m+n},$$
for $|z-z_0|<R$. That is, $\phi(z)$ is analytic at $z=z_0$ and in the disk $|z-z_0|<R$. We find that
$$
b_1=\left\{\begin{array}{ccc}\frac{\phi^{(n-1)}(z_0)}{(m-1)!} & \mbox{if} & m\geq 2,\\
\phi(z_0) & \mbox{if} & m=1.
\end{array}\right.$$

Conversely, suppose that $f(z)$ can be written in the form
$$f(z)=\frac{\phi(z)}{(z-z_0)^m},$$
where $\phi(z)$ is analytic and nonzero at $z=z_0$. $\phi(z)$ has a Taylor series expansion at $z_0$
\begin{align*}
\phi(z)=&\phi(z_0)+\frac{\phi’(z_0)}{1!}(z-z_0)+\frac{\phi^{\prime\prime}(z_0)}{2!}(z-z_0)^2\\
&+\cdots+\frac{\phi^{(m-1)}(z_0)}{(m-1)!}(z-z_0)^{m-1}+\sum_{n=m}^\infty\frac{\phi^{(n)}(z_0)}{n!}(z-z_0)^n
\end{align*}
in some neighbourhood $|z-z_0|<\epsilon$. Since $\phi(z_0)\ne 0$, $z_0$ is a pole of order $m$ of $f(z)$. Clearly, we have
$$
\mathrm{Res}_{z=z_0}f(z)=\left\{\begin{array}{ccc}
\phi(z_0) & \mbox{if} & m=1,\\
\frac{\phi^{(n-1)}(z_0)}{(m-1)!} & \mbox{if} & m\geq 2.
\end{array}\right.$$
Therefore, we have the following theorem holds.

Theorem. An isolated singularity $z_0$ of a function $f$ is a pole of order $m$ if and only if $f(z)$ can be written as
$$f(z)=\frac{\phi(z)}{(z-z_0)^m},$$
where $\phi(z)$ is analytic and nonzero at $z=z_0$. Moreover,
$$
\mathrm{Res}_{z=z_0}f(z)=\left\{\begin{array}{ccc}
\phi(z_0) & \mbox{if} & m=1,\\
\frac{\phi^{(n-1)}(z_0)}{(m-1)!} & \mbox{if} & m\geq 2.
\end{array}\right.$$

Example. $f(z)=\frac{z+1}{z^2+9}$ has an isolated singularity at $z=3i$. $f(z)$ can be written as
$$f(z)=\frac{\frac{z+1}{z+3i}}{z-3i}.$$
Then $\phi(z)=\frac{z+1}{z+3i}$ is analytic at $z=3i$ and $\phi(3i)=\frac{3-i}{6}\ne 0$. Hence, $z=3i$ is a simple pole of $f(z)$ and
$$\mathrm{Res}_{z=3i}f(z)=\phi(3i)=\frac{3-i}{6}.$$
$z=-3i$ is also a simple pole of $f(z)$ and
$$\mathrm{Res}_{z=-3i}f(z)=\frac{3+i}{6}.$$

Example. Let us consider $f(z)=\frac{z^3+2z}{(z-i)^3}$. $\phi(z)=z^3+2z$ is analytic at $z=i$ and $\phi(i)=i\ne 0$. Hence, $z=i$ is a pole of order $3$ and
$$b_1=\mathrm{Res}_{z=i}f(z)=\frac{\phi^{\prime\prime}(i)}{2!}=3i.$$

The Three Types of Isolated Singularities

Recall that if $f(z)$ has an isolated singularity at $z=z_0$, it may be represented by a Laurent series
$$f(z)=\sum_{n=0}^\infty a_n(z-z_0)^n+\frac{b_1}{z-z_0}+\frac{b_2}{(z-z_0)^2}+\cdots+\frac{b_n}{(z-z_0)^n}+\cdots$$
in a puctured disk $0<|z-z_0|<R$. The part of series that contains negative powers of $z-z_0$
$$\frac{b_1}{z-z_0}+\frac{b_2}{(z-z_0)^2}+\cdots+\frac{b_n}{(z-z_0)^n}+\cdots$$
is called the principal part of $f(z)$ at $z_0$.

Suppose that there exists $m\in\mathbb{N}$ such that $b_m\ne 0$ and $b_{m+1}=b_{m+2}=\cdots=0$. Then
$$f(z)=\sum_{n=0}^\infty a_n(z-z_0)^n+\frac{b_1}{z-z_0}+\frac{b_2}{(z-z_0)^2}+\cdots+\frac{b_m}{(z-z_0)^m},$$
where $0<|z-z_0|<R$. In this case, the isolated singularity $z_0$ is called a pole of order $m$. A pole of order 1 is usually called a simple pole.

Example.
\begin{align*}
\frac{z^2-2z+3}{z-2}&=z+\frac{3}{z-2}\\
&=2+(z-2)+\frac{3}{z-2},\ 0<|z-2|<\infty
\end{align*}
has a simple pole at $z_0=2$. The residue at $z_0=2$ is 3.

Example.
\begin{align*}
\frac{\sinh z}{z^4}&=\frac{1}{z^4}\left(z+\frac{z^3}{3!}+\frac{z^5}{5!}+\cdots\right)\\
&=\frac{1}{z^3}+\frac{1}{3!z}+\frac{z}{5!}+\frac{z^3}{7!}+\cdots,\ 0<|z|<\infty
\end{align*}
has a pole of order $m=3$ at $z_0=0$. The residue at $z_0=0$ is $\frac{1}{6}$.

When $b_n=0$ for all $n\geq 1$, so that
$$f(z)=\sum_{n=0}^\infty (z-z_0)^n$$
the point $z_0$ is called a removable singularity.

Example.
\begin{align*}
f(z)&=\frac{1-\cos z}{z^2}\\
&=\frac{1}{z^2}\left[1-\left(1-\frac{z^2}{2!}+\frac{z^4}{4!}-\frac{z^6}{6!}+\cdots\right)\right]\\
&=\frac{1}{2!}-\frac{z^2}{4!}+\frac{z^4}{6!}-\cdots,\ 0<|z|<\infty.
\end{align*}
Thus $z_0=0$ is a removable singularity. Define
$$g(z)=\left\{\begin{array}{ccc}
f(z) & \mbox{if} & z\ne 0,\\
\frac{1}{2!} & \mbox{if} & z=0.
\end{array}\right.$$
Then $g(z)$ is entire.

When an infinite number of the $b_n$ are nonzero, $z_0$ is called an essential singularity.

Example.
\begin{align*}
\exp\left(\frac{1}{z}\right)&=\sum_{n=0}^\infty\frac{1}{n! z^n}\\
&=1+\frac{1}{1!z}+\frac{1}{2!z^2}+\cdots,\ 0<|z|<\infty
\end{align*}
has an essential singularity at $z_0=0$.

Example. $e^z=-1$ when $z=(2n+1)\pi i$ $(n=0,\pm 1, \pm 2,\cdots)$. So $e^{\frac{1}{z}}=-1$ when $\frac{1}{z}=(2n+1)\pi i$ or $z=-\frac{i}{(2n+1)\pi}$ $(n=0,\pm 1,\pm 2,\cdots)$and an infinite number of these points lie in any neighbourhood of the essential singularity $z_0=0$.

Picard’s Theorem. In each neighbourhood of an essential singularity, a function assumes every finite value, with one possible exception, an infinite number of time.

In the above example, since $e^{\frac{1}{z}}\ne 0$ for all $z$, $z=0$ is the exceptional value in Picard’s theorem.

More on Residues

Here and here, we studied how to evaluate the contour integral $\oint_C f(z)dz$ when $f(z)$ is analytic everywhere within and on the positively oriented simple closed contour $C$ except for a finite number of isolated singularities interior to $C$. The calculation of residues however can be a pain if there are many isolated singularities of $f(z)$ interior to $C$. It turns out that by slightly modifying the function, we may just need to deal with only one isolated singularity regardless of how many isolated singularities of $f(z)$ there are interior to $C$. This gives a great advantage from computational viewpoint.

Theorem. If a function $f$ is analytic everywhere except for a finite number of isolated singularities interior to a positively oriented simple closed contour $C$, then
$$\oint_C f(z)dz=2\pi i\mathrm{Res}_{z=0}\left[\frac{1}{z^2}f\left(\frac{1}{z}\right)\right].$$

Proof.

From the above picture, we see that the function $f(z)$ has a Laurent series expansion
$$f(z)=\sum_{n=-\infty}^\infty c_n z_n\ (R_1<|z|<\infty)$$
where
$c_n=\frac{1}{2\pi}\oint_{C_0}\frac{f(z)}{z^{n+1}}dz$ $(n=0,\pm 1,\pm 2,\cdots)$. In particular, we have
$$\oint_{C_0}f(z)dz=2\pi ic_{-1}.$$
Since the condition of validity with the representation is not of the type $0<|z|<R_2$, $c_{-1}$ is not the residue of $f$ at $z=0$. Let us replace $z$ by $\frac{1}{z}$ in the representation. Then
$$\frac{1}{z^2}f\left(\frac{1}{z}\right)=\sum_{n=-\infty}^\infty\frac{c_n}{z^{n+2}}=\sum_{n=-\infty}^\infty\frac{c_{n-2}}{z^n}\ \left(0<|z|<\frac{1}{R_1}\right).$$
Hence,
$$c_{-1}=\mathrm{Res}_{z=0}\left[\frac{1}{z^2}f\left(\frac{1}{z}\right)\right]$$
and
$$\int_{C_0}f(z)dz=2\pi i\mathrm{Res}_{z=0}\left[\frac{1}{z^2}f\left(\frac{1}{z}\right)\right].$$
Since $f$ is analytic throughout the region bounded by $C$ and $C_0$ (topologically speaking $C_0$ is homotopic to $C$),
$$\oint_C f(z)dz=\oint_{C_0}f(z)dz.$$

Example. Evaluate $\oint_C\frac{5z-2}{z(z-1)}dz$ where $C:\ |z|=2$.

Solution. Let $f(z)=\frac{5z-2}{z(z-1)}$. Then
\begin{align*}
\frac{1}{z^2}f\left(\frac{1}{z}\right)&=\frac{5-2z}{z(1-z)}\\
&=\frac{5-2z}{z}\cdot\frac{1}{1-z}\\
&=\left(\frac{5}{z}-2\right)(1+z+z^2+\cdots)\\
&=\frac{5}{z}+3+3z+\cdots\ (0<|z|<1).
\end{align*}
Thus,
$$\oint_C\frac{5z-2}{z(z-1)}dz=2\pi i(5)=10\pi i.$$

Cauchy’s Residue Theorem

In here, we discussed that if a function $f(z)$ is analytic except at an isolated singularity $z_0$ interior to a positively oriented simple closed contour $C$, then
$$\oint_C f(z)dz=2\pi i\mathrm{Res}_{z=z_0}f(z).$$
What if there are more than one isolated singularities of $f(z)$ interior to $C$? It turns out that:

Theorem [Cauchy's Residue Theorem]. Let $C$ be a simple closed contour, positively oriented. If a function $f(z)$ is analytic except inside and on $C$ except for a finite number of singularities $z_k$ $(k=1,2,\cdots)$ inside $C$, then
$$\oint_C f(z)dz=2\pi i\sum_{k=1}^n\mathrm{Res}_{z=z_k}f(z).$$

Proof.

By Cauchy-Goursat Theorem, we have
$$\oint_C f(z)dz-\sum_{k=1}^n\oint_{C_k}f(z)dz=0$$
and so,
\begin{align*}
\oint_C f(z)dz&=\sum_{k=1}^n\oint_{C_k}f(z)dz\\
&=\sum_{k=1}^n\mathrm{Res}_{z=z_k}f(z).
\end{align*}

Example. Evaluate $\oint_C\frac{5z-2}{z(z-1)}dz$, where $C$ is the circle $|z|=2$.

Solution.

For the punctured disk $0<|z|<1$,
\begin{align*}
\frac{5z-2}{z(z-1)}&=\frac{5z-2}{z}\cdot\frac{-1}{1-z}\\
&=\frac{5z-2}{z}(-\sum_{n=0}^\infty z^n)\\
&=-\left(5-\frac{2}{z}\right)\sum_{n=0}^\infty z^n\\
&=-5\sum_{n=0}^\infty z^n+2\sum_{n=0}^\infty z^{n-1}.
\end{align*}
Hence, the residue is $b_1=\mathrm{Res}_{z=0}f(z)=2$, where $f(z)=\frac{5z-2}{z(z-1)}$.

For the punctured disk $0<|z-1|<1$,
\begin{align*}
\frac{5z-2}{z(z-1)}&=\frac{5(z-1)+3}{z-1}\cdot\frac{1}{1+(z-1)}\\
&=\left(5+\frac{3}{z-1}\right)\sum_{n=0}^\infty (-1)^n(z-1)^n.
\end{align*}
Hence, the residue is $b_2=\mathrm{Res}_{z=1}f(z)=3$.
Therefore, by Cauchy’s Residue Theorem, we obtain
$$\oint_C\frac{5z-2}{z(z-1)}dz=2\pi i(b_1+b_2)=10\pi i.$$

Residues

Definition. A point $z_0$ is called a singular point or a singularity of a function $f$ if $f$ fails to be analytic at $z_0$ but is analytic at some point in every neighbourhood of $z_0$. A singularity is said to be isolated if in addition there is a deleted neighbourhood $0<|z-z_0|<\epsilon$ of $z_0$ throughout which $f$ is analytic.

Example. $f(z)=\frac{z+1}{z^3(z^2+1)}$ has three isolated singularities $z=0$ and $z=\pm i$.

Example. $\mathrm{Log}z=\ln r+i\Theta$ ($r>0$, $-\pi<\Theta<\pi$), the principal branch of the logarithmic function $\log z$ has a singularity at the origin but it is not isolated.


Example. $f(z)=\frac{1}{\sin\left(\frac{\pi}{z}\right)}$ has singularities $z=0$ and $z=\frac{1}{n}$ ($n=\pm 1, \pm 2, \cdots$). Each singularity except $z=0$ is isolated.

If $z_0$ is an isolated singularity of a function $f$, then there exists $R>0$ such that $f$ is analytic throughout which $0<|z-z_0|<R$, so $f(z)$ is represented by a Laurent series
\begin{align*}
f(z)&=\sum_{n=0}^\infty a_n(z-z_0)^n+\frac{b_1}{z-z_0}+\frac{b_2}{(z-z_0)^2}+\cdots+\frac{b_n}{(z-z_0)^n}+\cdots\\
&(0<|z-z_0|<R)\\
b_n&=\frac{1}{2\pi i}\oint_C\frac{f(z)}{(z-z_0)^{-n+1}}dz\ (n=1,2,\cdots)
\end{align*}
where $C$ is any positively oriented simple closed contour around $z_0$ and lying in the punctured disk $0<|z-z_0|<R$. The coefficient $b_1$ of $\frac{1}{z-z_0}$ in the above Laurent series expansion is called the residue of $f$ at the isolated singularity $z_0$. The residue is important since from the integral formula for $b_n$ above, we find
$$\oint_C f(z)dz=2\pi i b_1.$$
That is, the contour integral $\oint_C f(z)dz$ can be evaluated using the residue $b_1$. The residue $b_1$ of $f(z)$ at $z=z_0$ is also denoted by $\mathrm{Res}_{z=z_0}f(z)$.

Example. Consider $\oint_C\frac{dz}{z(z-2)^4}$ where $C$ is the positively oriented circle $|z-2|=1$. The integrand $\frac{1}{z(z-2)^4}$ is analytic everywhere except at the isolated singularities $z=0$ and $z=2$, so it has a Laurent series representation in the punctured disk $0<|z-2|<2$.
\begin{align*}
\frac{1}{z(z-2)^4}&=\frac{1}{(z-2)^4}\cdot\frac{1}{2+(z-2)}\\
&=\frac{1}{2(z-2)^4}\cdot\frac{1}{1-\left(-\frac{z-2}{2}\right)}\\
&=\frac{1}{2(z-2)^4}\sum_{n=0}^\infty\frac{(-1)^n}{2^n}(z-2)^n\\
&=\sum_{n=0}^\infty\frac{(-1)^n}{2^{n+1}}(z-2)^{n-4}\ (0<|z-2|<2)
\end{align*}
The residue of $\frac{1}{z(z-2)^4}$ at $z=2$ is $-\frac{1}{16}$, hence
$$\oint_C\frac{dz}{z(z-2)^4}=2\pi i\left(-\frac{1}{16}\right)=-\frac{\pi i}{8}.$$

Example. Evaluate $\oint_C e^{\frac{1}{z^2}}dz$ where $C$ is the unit circle $|z|=1$.

Solution. $e^{\frac{1}{z^2}}$ is analytic everywhere except at $z=0$. $e^{\frac{1}{z^2}}$ has an Laurent series expansion
$$e^{\frac{1}{z^2}}=1+\frac{1}{1!z^2}+\frac{1}{2!z^4}+\cdots\ (0<|z|<\infty).$$
Since $b_1=0$, $\oint_C e^{\frac{1}{z^2}}dz=0$.

Laurent Series

If a function fails to be analytic at a point $z_0$, we cannot apply Taylor’s theorem at that point. However, it may be possible to find a series representation for $f(z)$ involving both positive and negative powers of $z-z_0$.

Theorem [Laurent's Theorem]. Suppose that a function $f$ is analytic throughout an annular domain $R_1<|z-z_0|<R_2$, centered at $z_0$, and let $C$ denote any positively oriented simple closed contour around $z_0$ and lying in that domain. Then, at each point in the domain, $f(z)$ has the series representation
$$f(z)=\sum_{n=0}^\infty a_n(z-z_0)^n+\sum_{n=1}^\infty\frac{b_n}{(z-z_0)^n}\ (R_1<|z-z_0|<R_2),$$
where
\begin{align*}
a_n&=\frac{1}{2\pi i}\oint_C\frac{f(z)}{(z-z_0)^{n+1}}dz\ (n=0,1,2,\cdots),\\
b_n&=\frac{1}{2\pi i}\oint_C\frac{f(z)}{(z-z_0)^{-n+1}}dz\ (n=1,2,\cdots).
\end{align*}


The expansion can be also written as
$$f(z)=\sum_{n=-\infty}^\infty c_n(z-z_0)^n\ (R_1<|z-z_0|<R_2),$$
where
$$c_n=\frac{1}{2\pi i}\oint_C\frac{f(z)}{(z-z_0)^{n+1}}dz\ (n=0,\pm 1,\pm 2,\cdots).$$

Example. From the Maclaurin series expansion $e^z=\sum_{n=0}^\infty\frac{z^n}{n!}$, we obtain Laurent series expansion for $e^{\frac{1}{z}}$
$$e^{\frac{1}{z}}=\sum_{n=0}^\infty\frac{1}{n!z^n}=1+\frac{1}{1!z}+\frac{1}{2!z^2}+\cdots\ (0<|z|<\infty).$$
The coefficient $b_1$ is
$$b_1=\frac{1}{2\pi i}\oint_C e^{\frac{1}{z}}dz=1$$
for any positively oriented simple closed contour $C$ around $0$ and lying in the domain $0<|z|<\infty$. Hence, we obtain the integral
$$\oint_C e^{\frac{1}{z}}dz=2\pi i$$
for any positively oriented simple closed contour $C$ around $0$ and lying in the domain $0<|z|<\infty$.

Example. $f(z)=\frac{1}{(z-i)^2}$ is already in the form of a Laurent series, where $z_0=i$. From
$$f(z)=\sum_{n=-\infty}^\infty c_n(z-i)^n\ (0<|z-i|<\infty),$$
we find that $c_{-2}=1$ and all other coefficients are zero. Hence, we have
$$\oint_C\frac{dz}{(z-i)^{n+3}}=\left\{\begin{array}{ccc}
0 &\mbox{if}&n\ne -2,\\
2\pi i &\mbox{if}& n=-2
\end{array}
\right.$$
for any positively oriented simple closed contour $C$ around $i$ and lying in the domain $0<|z-i|<\infty$.

Example. Let $f(z)$ be the function
$$f(z)=\frac{-1}{(z-1)(z-2)}=\frac{1}{z-1}-\frac{1}{z-2}.$$
Since $f(z)$ has two singularities $z=1$ and $z=2$, we may consider the following three different domains to obtain Laurent series expansion in each domain
$$D_1: |z|<1,\ D_2: 1<|z|<2,\ D_3: |z|>2.$$


For $D_1: |z|<1$,
$$\frac{1}{z-1}=-\frac{1}{1-z}=-\sum_{n=0}^\infty z^n$$
and
$$-\frac{1}{z-2}=\frac{1}{2-z}=\frac{1}{2}\frac{1}{1-\frac{z}{2}}.$$
Since $|z|<1$, $|z|<2$ and so $\frac{1}{1-\frac{z}{2}}=\sum_{n=0}^\infty\left(\frac{z}{2}\right)^n$. Hence, we obtain the Taylor series expansion
\begin{align*}
f(z)&=-\sum_{n=0}^\infty z^n+\sum_{n=0}^\infty\frac{z^n}{2^{n+1}}\\
&=\sum_{n=0}^\infty(2^{-n-1}-1)z^n\ (|z|<1).
\end{align*}
For $D_2: 1<|z|<2$,
$$\frac{1}{z-1}=\frac{1}{z}\frac{1}{1-\frac{1}{z}}=\frac{1}{z}\sum_{n=0}^\infty\left(\frac{1}{z}\right)^n.$$
Hence, we obtain the Laurent series expansion
\begin{align*}
f(z)&=\frac{1}{z}\sum_{n=0}^\infty\left(\frac{1}{z}\right)^n+\frac{1}{2}\sum_{n=0}^\infty\left(\frac{z}{2}\right)^n\\
&=\sum_{n=0}^\infty\frac{z^n}{2^{n+1}}+\sum_{n=1}\frac{1}{z^n}\ (1<|z|<2).
\end{align*}
For $D_3: |z|>2$,
\begin{align*}
f(z)&=\frac{1}{z-1}-\frac{1}{z-2}\\
&=\frac{1}{z}\sum_{n=0}^\infty\left(\frac{1}{z}\right)^n-\frac{1}{z}\sum_{n=0}^\infty\left(\frac{2}{z}\right)^n\\
&=\sum_{n=1}^\infty\frac{1-2^{n-1}}{z^n}\ (2<|z|<\infty).
\end{align*}

Taylor Series

Theorem. Suppose that a function $f$ is analytic throughout a disk $|z-z_0|<R_0$ centered at $z_0$ and with radius $R_0$. Then $f(z)$ has the power series representation
$$f(z)=\sum_{n=0}^\infty a_n(z-z_0)^n\ (|z-z_0|<R_0),$$
where
$$a_n=\frac{f^{(n)}(z_0)}{n!}\ (n=0,1,2,\cdots).$$

Proof. First consider the case $z_0=0$ and show that
$$f(z)=\sum_{n=0}^\infty\frac{f^{(n)}(0)}{n!}z^n\ (|z|<R_0).$$
This particular Taylor series is called a Maclaurin series. Let us write $|z|=r$ and let $C_0$ denote any positively oriented circle centered at the origin and with radius $r_0$, where $r<r_0<R_0$.

Since $f$ is analytic inside and on the circle $C_0$ and since $z$ is interior to $C_0$, by the Cauchy Integral Formula, we have
$$f(z)=\frac{1}{2\pi i}\oint_{C_0}\frac{f(s)}{s-z}ds.$$
Note that $\frac{1}{s-z}$ may be written as
\begin{align*}
\frac{1}{s-z}&=\frac{1}{s}\frac{1}{1-\frac{z}{s}}\\
&=\sum_{n=0}^{N-1}\frac{z^n}{s^{n+1}}+z^N\frac{1}{(s-z)s^N}.
\end{align*}
Using this, $f(z)$ may be written as
\begin{align*}
f(z)&=\frac{1}{2\pi i}\oint_{C_0}\frac{f(s)}{s-z}ds\\
&=\sum_{n=0}^{N-1}\frac{1}{2\pi i}\oint_{C_0}\frac{f(s)}{s^{n+1}}ds z^n+\frac{z^N}{2\pi i}\oint_{C_0}\frac{f(s)}{(s-z)s^N}ds\\
&=\sum_{n=0}^{N-1}\frac{f^{(n)}(0)}{n!}z^n+\rho_N(z),
\end{align*}
where
$$\rho_N(z)=\frac{z^N}{2\pi i}\oint_{C_0}\frac{f(s)}{(s-z)s^N}ds.$$
We are done if we can show that $\displaystyle\lim_{N\to\infty}\rho_N=0$. By triangle inequality, $|s-z|\geq ||s|-|z||=r_0-r$. So, we obatin
\begin{align*}
|\rho_N(z)|&\leq \frac{r^N}{2\pi}\frac{M}{(r_0-r)r_0^N}2\pi r_0\\
&=\frac{Mr_0}{r_0-r}\left(\frac{r}{r_0}\right)^N.
\end{align*}
Since $r<r_0$, $\displaystyle\lim_{N\to\infty}|\rho_N(z)|=0$ i.e. $\displaystyle\lim_{N\to\infty}\rho_N=0$. Hence, we have proved that
$$f(z)=\sum_{n=0}^\infty\frac{f^{(n)}(0)}{n!}z^n.$$
Now, suppose that $f(z)$ is analytic when $|z-z_0|<R_0$. Then $g(z):=f(z+z_0)$ is analytic when $|z|=|(z+z_0)-z_0|<R_0$. So, $g(z)$ has the Maclaurin series representation
$$g(z)=\sum_{n=0}^\infty\frac{g^{(n)}(0)}{n!}z^n\ (|z|<R_0)$$
or
$$f(z+z_0)=\sum_{n=0}^\infty\frac{f^{(n)}(z_0)}{n!}z^n\ (|z|<R_0).$$
Replacing $z$ by $z-z_0$, we finally obtain the Taylor series representation
$$f(z)=\sum_{n=0}^\infty\frac{f^{(n)}(z_0)}{n!}(z-z_)^n\ (|z-z_0|<R_0).$$

Example. The function $f(z)=e^z$ is entire, so it has a Maclaurin series representation for all $z\in\mathbb{C}$.
$$e^z=\sum_{n=0}^\infty\frac{z^n}{n!}\ (|z|<\infty).$$

Example. $\sin z$ is defined as
$$\sin z=\frac{e^{iz}-e^{-iz}}{2i}.$$
So,
\begin{align*}
\sin z&=\frac{1}{2i}\left[\sum_{n=0}^\infty\frac{(iz)^n}{n!}-\sum_{n=0}^\infty\frac{(-iz)^n}{n!}\right]\\
&=\frac{1}{2i}\sum_{n=0}^\infty[1-(-1)^n]\frac{i^nz^n}{n!}\\
&=\sum_{n=0}^\infty(-1)^n\frac{z^{2n+1}}{(2n+1)!}\ (|z|<\infty).
\end{align*}
Using the definition $\cos z=\frac{e^{iz}+e^{-iz}}{2}$, one can similarly obtain the Maclaurin series representation for $\cos z$
$$\cos z=\sum_{n=0}^\infty(-1)^n\frac{z^{2n}}{(2n)!}.$$