Lecture 8
Complex Analysis III

C.L. Wyatt

2025-07-11

In today’s lecture we finish up our introduction to complex analysis by defining contour integration in the complex plane. This will be used later in the course for inverse transforms.

Contour Integration

Recall from lecture 6 the definition of a parametric curve in the complex plane:

C:s(p)=x(p)+jy(p) for p,apbC: s(p) = x(p) +jy(p) \text{ for } p\in\mathbb{R}, a \leq p \leq b

The integral of a complex function f(s)f(s) along a curve CC is the complex number

Cf(s)ds=abf(s(p))s(p)dp\int_{C} f(s) ds = \int\limits_{a}^{b} f(s(p)) s^\prime(p) dp

where s(p)=dsdps^\prime(p) = \frac{ds}{dp}.

Example 8.1: Let f(s)=1sf(s) = \frac{1}{s} and CC be the unit circle

s(p)=ejp=cos(p)+jsin(p) for 0p2πs(p) = e^{jp} = \cos(p) + j\sin(p) \text{ for } 0 \leq p \leq 2\pi

circular contour of integration for the example

Unit circle contour for integration.

Then

f(s(p))=1s(p)=1ejp=ejpf\left(s(p)\right) = \frac{1}{s(p)} = \frac{1}{e^{jp}} = e^{-jp} and s(p)=jejps^\prime(p) = je^{jp}

Using the contour integration formula

C1sds=02πejpjejpdp=j02πdp=2πj\int_C \frac{1}{s} ds = \int\limits_0^{2\pi} e^{-jp} j e^{jp} dp = j \int\limits_0^{2\pi} dp = 2\pi j

Example 8.2: Let f(s)=s2f(s) = s^2 and CC the line from 1j-1-j to 1+j1 + j.

s(p)p+jp for 1p1s(p) - p + jp \text{ for } -1 \leq p \leq 1

line contour of integration for the example

Line representing the contour for integration.

f(s(p))=[s(p)]2=(p+jp)(p+jp)=p2+2jp2p2=j2p2f\left(s(p)\right) = [s(p)]^2 = (p + jp)(p + jp) = p^2 + 2jp^2 -p^2 = j2p^2 and s(p)=1+js^\prime(p) = 1 + j

Using the contour integration formula

Cs2ds=11j2p2(1j)dp=2j(1+j)11p2dp=43(j1)\int_C s^2 ds = \int\limits_{-1}^{1} j2p^2(1_j) dp = 2j(1+j) \int\limits_{-1}^{1} p^2 dp = \frac{4}{3} (j-1)

In general the integral between points s0s_0 and s1s_1 depends on the path taken.

Example 8.3: Let s0=r+0js_0 = -r + 0j and s1=r+0js_1 = r + 0j, for r>0r > 0 fixed. Consider two curves connecting the two points:

and the function f(s)=1sf(s) = \frac{1}{s}.

two contours of integration for the example

Two half-circles (arcs) making up the contour for integration.

Using the contour integration formula for both contours

C11sds=0π1rej(πp)jrej(πp)dp=j0πdp=j(π0)=jπ\int_{C_1} \frac{1}{s} ds = \int\limits_{0}^{\pi} - \frac{1}{re^{j(\pi - p)}} jre^{j(\pi - p)} dp = -j \int\limits_{0}^{\pi} dp = -j(\pi - 0) = - j\pi

C21sds=0π1rej(π+p)jrej(π+p)dp=j0πdp=j(π0)=jπ\int_{C_2} \frac{1}{s} ds = \int\limits_{0}^{\pi} \frac{1}{re^{j(\pi + p)}} jre^{j(\pi + p)} dp = j \int\limits_{0}^{\pi} dp = j(\pi - 0) = j\pi

Note that the two integrals are different, but that C2C1=2πj\int_{C_2} - \int_{C_1} = 2\pi j, the same as for the circular contour. This make sense because the contour along C2C_2 and then backwards along C1C_1 is the same as a counter-clockwise the circle.

Example 8.4: Let f(s)=s2f(s) = s^2 and the two contours from the previous example.

Using the contour integration formula for both contours

C1s2ds=0πr2ej2(πp)jrej(πp)dp=jr30πej3(πp)dp=jr313jej3(πp)|0π=13r3(ej3(ππ)ej3(π0)=23r3\int_{C_1} s^2 ds = \int\limits_{0}^{\pi} - r^2e^{j2(\pi - p)} jre^{j(\pi - p)} dp = -jr^3 \int\limits_{0}^{\pi} e^{j3(\pi - p)} dp = -jr^3 \left. \frac{-1}{3j} e^{j3(\pi - p)} \right|_{0}^{\pi} = \frac{1}{3} r^3 ( e^{j3(\pi - \pi)} - e^{j3(\pi - 0)} = \frac{2}{3} r^3

C2s2ds=0πr2ej2(π+p)jrej(π+p)dp=jr30πej3(π+p)dp=jr313jej3(π+p)|0π=13r3(ej3(π+π)ej3(π+0)=23r3\int_{C_2} s^2 ds = \int\limits_{0}^{\pi} r^2e^{j2(\pi + p)} jre^{j(\pi + p)} dp = jr^3 \int\limits_{0}^{\pi} e^{j3(\pi + p)} dp = jr^3 \left. \frac{1}{3j} e^{j3(\pi + p)} \right|_{0}^{\pi} = \frac{1}{3} r^3 ( e^{j3(\pi + \pi)} - e^{j3(\pi + 0)} = \frac{2}{3} r^3

In contrast to the previous example the two integrals are the same, and that C2C1=0\int_{C_2} - \int_{C_1} = 0. The difference between the two examples is that while the two contours were the same the first example had a singularity while the second was analytic everywhere. This insight is formalized in the following.

Fundamental Theorem of Complex Analysis

Let f(s)=F(s)f(s) = F^\prime(s) over some region of \mathbb{C} where ff is analytic. Given a curve CC from s0s_0 to s1s_1

Cf(s)ds=F(s)|s0s1=F(s1)F(s0)\int_C f(s) ds = \left. F(s) \right|_{s_0}^{s_1} = F(s_1) - F(s_0)

For a closed, simple curve CC (s0=s1s_0 = s_1) where ff is analytic on and inside CC, then

Cf(s)ds=F(s0)F(s1)=0\oint_C f(s) ds = F(s_0) - F(s_1) = 0

This is Cauchy’s integral theorem.

Now consider a curve CC and function f(s)f(s) analytic on and inside CC and a function

g(s)=f(s)ss0g(s) = \frac{f(s)}{s-s_0} where s0s_0\in\mathbb{C} is a singularity and CC encloses s0s_0, then

Cg(s)ds=Cf(s)ss0ds=2πjf(s0)\oint_C g(s) ds = \oint_C \frac{f(s)}{s-s_0} ds = 2\pi j f(s_0)

The term f(s0)f(s_0) is called the residue, the value of the analytic function f(s)f(s) at the singularity of g(s)g(s). This is called the Residue Theorem, or the long-winded Fundamental Theorem of Complex nalysis.

For the functions we will be interested in integrating (rational functions) this machinery is all we need, since integration is a linear operator, and f(s)f(s) will take on two forms: sns^n or este^{st}, both of which are analytic everywhere.

Example 8.5: Lets start with a simple example, f(s)=1f(s) = 1 and g(s)=f(s)s+1=1s+1g(s) = \frac{f(s)}{s+1} = \frac{1}{s+1}, which has a singularity at s0=1s_0 = -1. We showed in example 8.1 that

C1sds=2πj\oint_C \frac{1}{s} ds = 2\pi j The residue theorem tells us

C1s+1ds=2πjf(1)=2πj\oint_C \frac{1}{s+1} ds = 2\pi j f(-1) = 2\pi j

Lets verify that using the contour integral. Let CC be the circle of radius one, centered at -1, the location of the singularity.

circular contour of integration for the example

Circular contour of integration.

We will use figures like the above frequently so it is worth taking some time to describe them fully. It is a plot of the singularity points (poles) as crosses on the complex plane, as well as the contour with its direction indicated by the arrow. In some cases we might also plot the roots of the numerator polynomial (called the zeros) as small unfilled circles.

The contour can be described by

s(p)=(cos(p)1)+jsin(p) for 0p2πs(p) = (\cos(p) - 1) + j\sin(p) \text{ for } 0 \leq p \leq 2\pi and s(p)=sin(p)+jcos(p)s^\prime(p) = -\sin(p) + j\cos(p)

Substituting we get

g(s(p))=1s(p)+1=1cos(p)+jsin(p)g(s(p)) = \frac{1}{s(p) + 1} = \frac{1}{\cos(p) + j\sin(p)}

The contour integral is then

02πsin(p)+jcos(p)cos(p)+jsin(p)dp=02πjejpejpdp=j02πdp=2πj\int\limits_{0}^{2\pi} \frac{-\sin(p) + j\cos(p)}{\cos(p) + j\sin(p)} dp = \int\limits_{0}^{2\pi} \frac{je^{jp}}{e^{jp}} dp = j \int\limits_{0}^{2\pi} dp = 2\pi j

Why did we use a circle for the contour? Because it makes the integral easier. As long as the contour is closed and encompases the singularity you will get the same answer. However the steps to evaluate the integral will likely be more tedious.

Also notice the residue theorem saves us a good deal of work, as we do not have to specify the contour and perform the contour integral.

Example 8.6: Here is an example where f(s)f(s) is more complicated but still analytic inside the contour. These contour integrals are much harder to do by hand but the residue theorem makes them rather easy. Let f(s)=snf(s) = s^n for n+n\in\mathbb{Z}^+ (a positive integer) and let g(s)=sns+1g(s) = \frac{s^n}{s+1}.

For now, we will assume without proof that f(s)=snf(s) = s^n is analytic and let CC be the unit circle centered at the pole (-1,0), as in the previous example. Then by the residue theorem

Cf(s)s+1ds=Csns+1ds=2πjf(1)=2πj(1)n\oint_C \frac{f(s)}{s+1} ds = \oint_C \frac{s^n}{s+1} ds = 2\pi j f(-1) = 2\pi j (-1)^n

Similarly if f(s)=estf(s) = e^{st} with the same gg and contour, then

Cf(s)s+1ds=Cests+1ds=2πjf(1)=2πjet\oint_C \frac{f(s)}{s+1} ds = \oint_C \frac{e^{st}}{s+1} ds = 2\pi j f(-1) = 2\pi j e^{-t}

Multiple Residues

What if there are more than one singularity? Let

g(s)=f(s)(ss1)(ss2)(ssN)g(s) = \frac{f(s)}{(s-s_1)(s-s_2)\cdots (s-s_N)} where f(s)f(s) is analytic on and inside a closed contour CC enclosing all the NN singularities. Then

Cg(s)ds=Cf(s)(ss1)(ss2)(ssN)ds=2πjn=1NKn\oint_C g(s) ds = \oint_C \frac{f(s)}{(s-s_1)(s-s_2)\cdots (s-s_N)} ds = 2\pi j \sum\limits_{n = 1}^{N} K_n where KnK_n is the n-th residue Kn=(ssn)g(s)|s=snK_n = \left. (s-s_n)g(s) \right|_{s = s_n}

Example 8.7: Let f(s)=sestf(s) = se^{st} be assumed analytic and

g(s)=f(s)s2+3s+2=f(s)(s+1)(s+2)g(s) = \frac{f(s)}{s^2 + 3s + 2} = \frac{f(s)}{(s+1)(s+2)} Let CC be a circle of radius three centered at the origin, which encloses the singularities at (-1,0) and (-2.0). Then

Cg(s)ds=2πj[K1+K2]\oint_C g(s) ds = 2\pi j [K_1 + K_2] where

K1=(s+1)g(s)|s=1=f(s)s+2|s=1=sests+2|s=1=etK_1 = \left. (s+1)g(s) \right|_{s = -1} = \left. \frac{f(s)}{s+2} \right|_{s = -1} = \left. \frac{se^{st}}{s+2} \right|_{s = -1} = -e^{-t}

K2=(s+2)g(s)|s=2=f(s)s+1|s=2=sests+1|s=2=2e2tK_2 = \left. (s+2)g(s) \right|_{s = -2} = \left. \frac{f(s)}{s+1} \right|_{s = -2} = \left. \frac{se^{st}}{s+1} \right|_{s = -2} = 2e^{-2t}

So the final result is

Csests2+3s+2ds=2πj[et+2e2t]\oint_C \frac{se^{st}}{s^2 + 3s + 2} ds = 2\pi j \left[-e^{-t} + 2e^{-2t} \right]

Use in Inverse Transforms

We will be interested in two specific complex integrals:

where X(s)X(s) and X(z)X(z) will be rational complex functions. X(s)=P(s)Q(s)X(s) = \frac{P(s)}{Q(s)}

X(z)=P(z)Q(z)X(z) = \frac{P(z)}{Q(z)}

So as long as P(z)zn1P(z) z^{n-1} and P(s)estP(s) e^{st} are analytic then the residue theorem can be used to evaluate the transforms.

Bromwitch contour

Notice the contour for the inverse Laplace transform is not written as as closed integral but with limits that include imaginary values at infinity.

γjγ+jX(s)estds\int\limits_{\gamma -j\infty}^{\gamma + j\infty} X(s) e^{st} ds

where γ\gamma is larger than the largest singularity of X(s)X(s). This can be visualized as the linear contour

s(p)=γ+jp for ps(p) = \gamma + jp \text{ for } p\in\mathbb{R}

linear contour of integration

Linear contour of integration for the Laplace transform

Recall however that there is only one point at infinity for complex numbers. To convert this to a closed integral so we can apply the residue theorem we need to define the Bromwitch contour.

Bromwitch contour of integration

Bromwitch contour of integration for the Laplace transform.

This closed piecewise contour consists of four sub-contours. To make this contour be the closed equivalent of the one above we let the value of aa, where the contour crosses the imaginary axis approach infinity. The integral that corresponds to the inverse Laplace transform then becomes

γjγ+jX(s)estds=limaC1X(s)estds+C2X(s)estds+C3X(s)estds+C4X(s)estds=CX(s)estds\int\limits_{\gamma -j\infty}^{\gamma + j\infty} X(s) e^{st} ds = \lim_{a \rightarrow \infty} \int_{C_1} X(s) e^{st} ds + \int_{C_2} X(s) e^{st} ds + \int_{C_3} X(s) e^{st} ds + \int_{C_4} X(s) e^{st} ds = \oint_C X(s) e^{st} ds

I think of this as the contour goes off to infinity, and comes back in from the other side, but this is just a mental convenience.

We will see several examples of this contour over the next week.