Complex Numbers II: A Guide to Contour Integration (Part 2 of 3)
by greenturtle3141, May 19, 2023, 5:09 AM
Lesson 5: Cauchy's Theorem
So here's a CRAZY fact.
Theorem (Cauchy): Suppose
is a holomorphic function. Suppose
is a path that loops. If
is defined everywhere inside the loop, then

Example 1
What is
Remember that
is the unit circle oriented counter-clockwise. Well, the integrand is holomorphic, and it's defined on the entire plane (so it's defined inside the unit circle). Since the unit circle loops, the answer to this integral must be
.
Example 2
What is
, where
is the following curve?
Well, the integrand is holomorphic, defined everywhere, and the path loops, so it's
.
Example 3
Remember that annoying pacman integral
?
Well,
is very holomorphic, is defined everywhere, and the path loops, so without needing to do any annoying computations I can say that the integral is
.
Non-Example 1
It is not true that
. In fact, if we work it out
, this integral will be equal to
.
That's strange.
is just a circle, so it definitely loops... and
is defined inside the circle too. What went wrong? Can you figure it out? The reason is that...
is not holomorphic! That's why I needed to talk about holomorphic functions, so you don't try and apply the theorems we discuss to bad functions like
. The last thing I want is for you to try something like that, and then think that math is broken!
Non-Example 2
It is not true that
. In fact, if we work it out
, this integral will be equal to
.
Huh?
is a looping path, and
is holomorphic wherever it is defined. What went wrong this time? The reason is that...
is not defined everywhere inside the circle! The number
lies in the interior of the unit circle, and
breaks at
.
We call
a singularity of
. In particular, it is a pole of
. Because
has a pole inside the loop, we cannot apply Cauchy's theorem.
Example 4
Let
be a holomorphic function that is defined everywhere on
(i.e. "
is entire"). Let
and
be two complex numbers, and consider two different paths that start at
and end at
. Call these paths
and
.
It turns out that
! This means that the path integral between
and
is the same, no matter what path you take.
Why is that the case? Let's reverse one of the paths... say,
.
Hey, now that's a loop! So by Cauchy's Theorem,
But remember: Reversing the direction of a path will negate the integral over it. So
. This means that
So yeah, the integrals are equal!
Exercises[/]
Lesson 6: Residues
The Residue Theorem is basically Cauchy's Theorem but better. To understand it, we need to know how to calculate a function's residue at a singularity.
I won't give you the "correct" definition of what a residue is, because that would make this post a lot longer and more complicated. So I'll just tell you how to calculate it in some simple cases.
General Setting: A holomorphic function
may not be defined at some complex number
. But, it would have something called a residue at this
. A prototypical example is the function
being not defined at
.
has no value at
, but it has a residue.
General Idea: The residue of a function at a certain point tells you how much "spinning" it induces around that point.
How to calculate the residue in most cases: If
is continuous at
(meaning, we can "plug in the hole" at
to make the function
nice), then the residue is simply
(i.e. the residue is the number we need to plug into the hole). The residue is denoted by
.
This is a very informal definition, so it will make a lot more sense when we try some examples.
Example 1
is not defined at
, but it has a residue there. What is it? To find it, all we need to do is multiply by
to make the singularity go away. Indeed, when we multiply
by
, we get
, which is nice. The value of
at
is... well,
. So the residue is
. i.e.
.
Example 2
is not defined at
, but it has a residue there. What is it? To find it, we need to multiply by
to try and make the singularity go away. When we multiply
by
, we get
.
At first glance, it's not clear if we made the singularity go away. But if you took Calculus, you might know that
. The same limit holds in the complex world (and you can verify this by a Taylor expansion
and this is
when you plug in
.). That is,
. The
factor helped make this limit possible! Because of this, the residue is easily found: It is exactly equal to that limit, which is
. i.e.
.
Example 3
is not defined at
, but it has a residue there. What is it? To find it, we need to multiply by
to make the singularity go away. Indeed,
This new expression has no singularity at
anymore! So we successfully got rid of the badness at
. The residue is then equal to the limit
. But as I just said, this new function is nice at
, so to evaluate the limit we can just plug in
to get
. This is the residue! And we can write
.
Non-Example
is not defined at
, but it has a residue there. What is it? To try and find it, we could multiply by
to get
. But this doesn't remove the singularity because
is still bad at
. Oops!
That mean that the easy method I gave you doesn't work here. It turns out that
, for reasons that I will explain below.
Wait so what is the residue, actually? And how do I find the residue of higher-order poles, like in
?
To ease optional eyestrain, I'm going to put this in spoilers.
The Methodology and Rough Motivation
Exercises
Lesson 7: The Residue Theorem
We're finally here.
The Residue Theorem gives us a very simple way to evaluate basically any contour integral!
To reduce complexity, the theorem will only be for "simple loops", which are basically loops that don't intersect themselves. (So circles are good, but figure-8's are not.)
Theorem (Residue Theorem): Let
be a simple looping path, which loops in the counter-clockwise direction. Let
be a holomorphic (meromorphic) function that is not defined (i.e. has a "pole") at some points
inside the loop. Then
In other words, the contour integral is just
times the sum of all residues inside the loop.
Example 1
Let us return to this classic example of integrating
around the unit circle.
There is exactly one point in the interior of the circle where
explodes, and that is
. The residue of
at
, as we saw before, is
. Thus we may apply the Residue Theorem to get

Example 2
Let us return to Lesson 3 Example 2, where we once again integrate
, but this time around a square.
What is
? Again, there is only one place inside this square where the integrand explodes:
. The residue there has not changed: It's still
. So
, just like in the previous example.
This shows that the integral of
around any path that loops around
will be
. (As long as you loop only once, and you loop in the counter-clockwise direction.)
Example 3
Let
be a (simple) loop oriented counter-clockwise. Let
be a holomorphic function that is defined everywhere in the interior of this loop.
Then the sum of the residues inside the loop is... well,
, because there are no singularities to deal with (and hence no residues to sum up). So
. This is Cauchy's Theorem.
Example 4
Let
be the circle centered at
of radius
, oriented counter-clockwise. When
, what are the possible values of the integral
First let us write it as
This tells us that the integrand explodes at only two points:
and
.
First case: If
, then the interior of the disk of radius
won't contain either
or
, meaning that the integrand is defined everywhere inside it. So by Cauchy's Theorem, we would get
.
Second case: If
, then the interior of the disk of radius
will contain both
and
. We need to sum up the residues at both of these singularities.
For
, we multiply the integrand by
to get
. Plugging in
into this will give us
, so
.
For
, we instead multiply by
to get
. Plugging in
gives
, so
.
Therefore, by the Residue Theorem,

The two possible values are
and
.
Exercises
(Next Part)
So here's a CRAZY fact.
Theorem (Cauchy): Suppose




Example 1
What is



Example 2
What is


![[asy]
size(7cm);
draw((-2,0)--(2,0),p=linewidth(1.5),arrow=Arrows(5));
draw((0,-2)--(0,2),p=linewidth(1.5),arrow=Arrows(5));
draw((-1,-1)..(-1,0)..(-.5,1)..(-.2,-.2)..(0,0)..(1,1)..(0,.5)..(1.5,1)..(1.5,-.4)..(-1,-1),p=red+linewidth(1.75),arrow=MidArrow(7));
label("$\gamma$",(-1,1.5),p=red);
[/asy]](http://latex.artofproblemsolving.com/1/5/e/15e614c787f1d2ae5e5901b821566dc1c34216f4.png)

Example 3
Remember that annoying pacman integral

![[asy]
size(7cm);
draw((-2,0)--(2,0),p=linewidth(1.5),arrow=Arrows(5));
draw((0,-2)--(0,2),p=linewidth(1.5),arrow=Arrows(5));
draw((0,0)--dir(45)--arc((0,0),1,45,360-45,CCW)--(0,0),p=red,arrow=MidArrow);
label("$\gamma$",(-1,1.5),p=red);
[/asy]](http://latex.artofproblemsolving.com/5/2/a/52aa6b4e4dd6c26e745ec50b33b7afb9ead2c545.png)
Well,


Non-Example 1
It is not true that



That's strange.




Non-Example 2
It is not true that



Huh?






We call




Example 4
Let









![[asy]
size(7cm);
draw((-2,0)--(2,0),p=linewidth(1.5),arrow=Arrows(5));
draw((0,-2)--(0,2),p=linewidth(1.5),arrow=Arrows(5));
draw((-1,-1)--(1,1),p=linewidth(1.5)+purple,arrow=MidArrow(5));
draw((-1,-1)..(-.5,1)..(0,1)..(1,1),p=linewidth(1.5)+red,arrow=MidArrow(5));
dot("$w_1$",(-1,-1),SW);
dot("$w_2$",(1,1),NE);
label("$\beta$",(-1,1.5),p=red);
label("$\alpha$",(.5,-.5),p=purple);
[/asy]](http://latex.artofproblemsolving.com/texer/c/criryogv.png)
It turns out that



Why is that the case? Let's reverse one of the paths... say,

![[asy]
size(7cm);
draw((-2,0)--(2,0),p=linewidth(1.5),arrow=Arrows(5));
draw((0,-2)--(0,2),p=linewidth(1.5),arrow=Arrows(5));
draw((-1,-1)--(1,1),p=linewidth(1.5)+purple,arrow=MidArrow(5));
draw((1,1)..(0,1)..(-.5,1)..(-1,-1),p=linewidth(1.5)+orange,arrow=MidArrow(5));
dot("$w_1$",(-1,-1),SW);
dot("$w_2$",(1,1),NE);
label("$-\beta$",(-1,1.5),p=orange);
label("$\alpha$",(.5,-.5),p=purple);
[/asy]](http://latex.artofproblemsolving.com/c/e/1/ce138438fa68d85ef1e8797454d42435819d2ccc.png)
Hey, now that's a loop! So by Cauchy's Theorem,



Exercises[/]
- Compute the contour integral
Answer
It's just 0. - Remember Lesson 3 Exercise 1? You showed that for any
that is not a negative real number, we have the identity
where
is some carefully-chosen path from
to
.
Prove that, actually, this identity holds no matter what pathwe choose from
to
(as long as it doesn't cross the negative real line, where
would be undefined).
SolutionWe use the principle that we learned from Example 4. Ifis the carefully-chosen path from the exercise, and
is some other path from
to
, then we want to show that the integrals
and
are the same.
All we need to show that if we reverse the pathto get
, then the paths
and
form a loop that we can apply Cauchy's Theorem to.
Well,is holomorphic over all
, so the only thing that can go wrong is if the singularity at
is inside the loop formed by
and
. But this can't happen becaues neither of these two paths cross the negative real line!
So nothing can go wrong, and so we can apply Cauchy's Theorem to deduce that the two original integrals are indeed equal.
Lesson 6: Residues
The Residue Theorem is basically Cauchy's Theorem but better. To understand it, we need to know how to calculate a function's residue at a singularity.
I won't give you the "correct" definition of what a residue is, because that would make this post a lot longer and more complicated. So I'll just tell you how to calculate it in some simple cases.
General Setting: A holomorphic function







General Idea: The residue of a function at a certain point tells you how much "spinning" it induces around that point.
How to calculate the residue in most cases: If






This is a very informal definition, so it will make a lot more sense when we try some examples.
Example 1











Example 2






At first glance, it's not clear if we made the singularity go away. But if you took Calculus, you might know that








Example 3











Non-Example






That mean that the easy method I gave you doesn't work here. It turns out that

Wait so what is the residue, actually? And how do I find the residue of higher-order poles, like in

To ease optional eyestrain, I'm going to put this in spoilers.
The Methodology and Rough Motivation
So, functions like
are not that nice. But they're a quotient of two nice (i.e. holomorphic) functions. Because of this, we call such functions meromorphic, more or less. It turns out that functions like these always have a "two-sided Taylor series", meaning that the series can include negative-integer-exponent terms like
or
to account for the "badness" at singularities. For example, the series expansion of
at
is
and the series expansion of
at
is given by
The coefficient of the
term is the residue. (More generally, when the pole is at
, then the residue is the coefficient of
in the series expansion around
.) Intuitively, we look at this term because it is the only term that gives you a non-zero result when you compute its contour integral over a path that loops around
. So it is the only term that induces "spin".
For example, from the series above, we can see that
(as we saw earlier!), and that
.
What is
? Well, the series for
is
so the residue is the coefficient of
in this series, which is
.
There is a formula for finding the residue of things like
that have "higher-order poles". It's a two step process.
To find
...
As nasty as it is, it kinda makes sense. Multiplying by
shifts the terms in the series just enough so that all the terms have positive exponents. Then, differentiating
times shifts it back the other way, but also kills all low-order terms... except for that one term (the one that used to be the
term) that we need! In fact, after we're done taking derivatives, the constant term will be
multiplied by what used to be the coefficient of
. Sending
gets rid of all the other terms, laeving us with just the residue... alone!














For example, from the series above, we can see that


What is





There is a formula for finding the residue of things like

To find

- First, find the smallest natural number
for which
becomes nice, so that the singularity is basicially gone.
- Then, the residue is given by this formula:
As nasty as it is, it kinda makes sense. Multiplying by






Exercises
- Compute
.
SolutionMultiplying byremoves the singularity at
, leaving us with
, and indeed this is nice at
. Pluging in
gives
.
- Compute
.
SolutionWe write. Now we remove the singularity by multiplying by
. This leaves us with
, which is now indeed nice at
. Plugging in
gives
. Whatever that is.
- (Using the Ugly Formula) Compute
.
SolutionFirst step: How many times do we need to multiply byso that the function becomes nice at
? At first glance, it might seem like you want to do it three times so that it becomes
, and this is definitely nice at
. But actually, just two times is enough! This is because
has a zero at
.
How can we verify thatis nice at
? Meaning, does this have a limit when we send
? One way to do this is using the Taylor series for
. We can write
so that
This clearly does not explode at
, so this proves that
is continuous at
.
Sois the power we need.
Second step: We now have to use the formula.
is just
.
Now we differentiate thistimes. By the quotient rule, this is equal to
Now we need to take the limit of this as. Blegh. Let's first make a substitution
. This will make things a bit simpler to write.
We can find this limit using the Taylor expansion for
. The expression is equal to
The "blah" terms go to 0 fast enough so that we can ignore them (I'm not being very rigorous). So if we send
here, we get
.
Lesson 7: The Residue Theorem
We're finally here.
The Residue Theorem gives us a very simple way to evaluate basically any contour integral!
To reduce complexity, the theorem will only be for "simple loops", which are basically loops that don't intersect themselves. (So circles are good, but figure-8's are not.)
Theorem (Residue Theorem): Let





Example 1
Let us return to this classic example of integrating








Example 2
Let us return to Lesson 3 Example 2, where we once again integrate

![[asy]
size(7cm);
draw((-2,0)--(2,0),p=linewidth(1.5),arrow=Arrows(5));
draw((0,-2)--(0,2),p=linewidth(1.5),arrow=Arrows(5));
draw((0,-1)--(1,-1)--(1,1)--(-1,1)--(-1,-1)--(0,-1),p=red,arrow=MidArrow);
label("$\Gamma$",(-1,1.5),p=red);
[/asy]](http://latex.artofproblemsolving.com/9/0/0/900a5d00edd422c4f67a74af25e86b82d766b56b.png)
What is




This shows that the integral of



Example 3
Let


Then the sum of the residues inside the loop is... well,


Example 4
Let








First case: If





Second case: If




For






For






Therefore, by the Residue Theorem,

The two possible values are


Exercises
- Compute
. Answer
- Compute
. (Careful!) Answer
SolutionThere are actually three singularities you need to worry about:,
, and
. Since
, we have
, and similarly for
. The integral is then
.
- Compute
, where
is the rectangle with vertices
, oriented counter-clockwise.
SolutionThe singularities are. But only two of them lie inside the interior of the looping rectangle:
and
.
The residue atis just
evaluated at
, which is
.
The residue atis just
evaluated at
, which is
.
By the Residue Theorem, we conclude that
(Next Part)
This post has been edited 2 times. Last edited by greenturtle3141, May 19, 2023, 5:55 AM