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 $f$ is a holomorphic function. Suppose $\gamma$ is a path that loops. If $f$ is defined everywhere inside the loop, then
$$\int_\gamma f(z)\,dz = 0.$$


Example 1

What is $\int_{\partial D} \sin(e^z) + e^{e^{e^{z}}} - e^{\cos(z^2)}\,dz?$ Remember that $\partial D$ 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 $\boxed{0}$.

Example 2

What is $\int_\gamma \cos(\cos(\cos(\cos(\cos(z)))))\,dz$, where $\gamma$ is the following curve?
[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]
Well, the integrand is holomorphic, defined everywhere, and the path loops, so it's $\boxed{0}$.

Example 3

Remember that annoying pacman integral $\int_\gamma e^z\,dz$?
[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]

Well, $e^z$ 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 $\boxed{0}$.

Non-Example 1

It is not true that $\int_{\partial D} \overline{z}\,dz = 0$. In fact, if we work it out, this integral will be equal to $2\pi i$.

That's strange. $\partial D$ is just a circle, so it definitely loops... and $\overline{z}$ is defined inside the circle too. What went wrong? Can you figure it out? The reason is that...

Non-Example 2

It is not true that $\int_{\partial D} \frac{1}{z}\,dz=0$. In fact, if we work it out, this integral will be equal to $2\pi i$.

Huh? $\partial D$ is a looping path, and $\frac{1}{z}$ is holomorphic wherever it is defined. What went wrong this time? The reason is that...

Example 4

Let $f$ be a holomorphic function that is defined everywhere on $\mathbb{C}$ (i.e. "$f$ is entire"). Let $w_1$ and $w_2$ be two complex numbers, and consider two different paths that start at $w_1$ and end at $w_2$. Call these paths $\alpha$ and $\beta$.
[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]

It turns out that $\int_\alpha f(z)\,dz = \int_\beta f(z)\,dz$! This means that the path integral between $w_1$ and $w_2$ is the same, no matter what path you take.

Why is that the case? Let's reverse one of the paths... say, $\beta$.
[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]

Hey, now that's a loop! So by Cauchy's Theorem,
$$\int_\alpha f(z)\,dz + \int_{-\beta} f(z)\,dz = 0.$$But remember: Reversing the direction of a path will negate the integral over it. So $\int_{-\beta} f(z)\,dz = -\int_{\beta} f(z)\,dz$. This means that
$$\int_\alpha f(z)\,dz - \int_{\beta} f(z)\,dz = 0.$$So yeah, the integrals are equal!

Exercises[/]

  1. Compute the contour integral
    $$\int_{\partial D} e^{e^{e^{e^{e^{z}}}}}\,dz.$$Answer
  2. Remember Lesson 3 Exercise 1? You showed that for any $w \in \mathbb{C}$ that is not a negative real number, we have the identity
    $$\int_\gamma \frac{1}{z} \,dz = \log w,$$where $\gamma$ is some carefully-chosen path from $1$ to $w$.

    Prove that, actually, this identity holds no matter what path $\gamma$ we choose from $1$ to $w$ (as long as it doesn't cross the negative real line, where $\log$ would be undefined).

    Solution

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 $f$ may not be defined at some complex number $z_0$. But, it would have something called a residue at this $z_0$. A prototypical example is the function $1/z$ being not defined at $z=0$. $1/z$ has no value at $z=0$, 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 $(z-z_0)f(z)$ is continuous at $z_0$ (meaning, we can "plug in the hole" at $z = z_0$ to make the function $(z-z_0)f(z)$ nice), then the residue is simply $\lim_{z \to z_0} (z-z_0)f(z)$ (i.e. the residue is the number we need to plug into the hole). The residue is denoted by $\operatorname*{Res}_{z=z_0} f(z)$.

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

Example 1

$1/z$ is not defined at $z=0$, but it has a residue there. What is it? To find it, all we need to do is multiply by $(z-0) = z$ to make the singularity go away. Indeed, when we multiply $1/z$ by $z$, we get $1$, which is nice. The value of $1$ at $z=0$ is... well, $1$. So the residue is $1$. i.e. $\operatorname*{Res}_{z=0} \frac1z = 1$.

Example 2

$\frac{1}{\sin z}$ is not defined at $z=0$, but it has a residue there. What is it? To find it, we need to multiply by $(z-0) = z$ to try and make the singularity go away. When we multiply $1/\sin z$ by $z$, we get $\frac{z}{\sin z}$.

At first glance, it's not clear if we made the singularity go away. But if you took Calculus, you might know that $\lim_{x \to 0} \frac{x}{\sin x} = 1$. The same limit holds in the complex world (and you can verify this by a Taylor expansion). That is, $\lim_{z \to 0} \frac{z}{\sin z} = 1$. The $z$ factor helped make this limit possible! Because of this, the residue is easily found: It is exactly equal to that limit, which is $1$. i.e. $\operatorname*{Res}_{z=0} \frac{1}{\sin z} = 1$.

Example 3

$\frac{1}{z^2+1}$ is not defined at $z=i$, but it has a residue there. What is it? To find it, we need to multiply by $(z-i)$ to make the singularity go away. Indeed,
$$\frac{z-i}{z^2+1} = \frac{z-i}{(z-i)(z+i)} = \frac{1}{z+i}.$$This new expression has no singularity at $z=i$ anymore! So we successfully got rid of the badness at $z=i$. The residue is then equal to the limit $\lim_{z \to i} \frac{1}{z+i}$. But as I just said, this new function is nice at $z=i$, so to evaluate the limit we can just plug in $z=i$ to get $\frac{1}{2i}$. This is the residue! And we can write $\operatorname*{Res}_{z=i} \frac{1}{z^2+1} = \frac{1}{2i}$.

Non-Example

$1/z^2$ is not defined at $z=0$, but it has a residue there. What is it? To try and find it, we could multiply by $z-0 = z$ to get $1/z$. But this doesn't remove the singularity because $1/z$ is still bad at $z=0$. Oops!

That mean that the easy method I gave you doesn't work here. It turns out that $\operatorname*{Res}_{z=0} \frac{1}{z^2} = 0$, 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 $1/z^2$?

To ease optional eyestrain, I'm going to put this in spoilers.

The Methodology and Rough Motivation

Exercises
  1. Compute $\operatorname*{Res}_{z=42} \frac{\log z}{z - 42}$.
    Solution
  2. Compute $\operatorname*{Res}_{z=i} \frac{1}{z^4-1}$.
    Solution
  3. (Using the Ugly Formula) Compute $\operatorname*{Res}_{z=1} \frac{\log z}{(z - 1)^3}$.
    Solution

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 $\gamma$ be a simple looping path, which loops in the counter-clockwise direction. Let $f$ be a holomorphic (meromorphic) function that is not defined (i.e. has a "pole") at some points $z_1,z_2,\cdots,z_k$ inside the loop. Then
$$\int_\gamma f(z)\,dz = 2\pi i \sum_{j=1}^k \operatorname*{Res}_{z=z_j} f(z).$$In other words, the contour integral is just $2\pi i$ times the sum of all residues inside the loop.


Example 1

Let us return to this classic example of integrating $1/z$ around the unit circle.
$$\int_{\partial D} \frac{1}{z}\,dz$$There is exactly one point in the interior of the circle where $1/z$ explodes, and that is $z=0$. The residue of $1/z$ at $z=0$, as we saw before, is $1$. Thus we may apply the Residue Theorem to get
$$\int_{\partial D} \frac{1}{z}\,dz = 2\pi i \times \operatorname*{Res}_{z=0} \frac1z = \boxed{2\pi i}.$$
Example 2

Let us return to Lesson 3 Example 2, where we once again integrate $1/z$, but this time around a square.
[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]

What is $\int_\gamma \frac1z\,dz$? Again, there is only one place inside this square where the integrand explodes: $z=0$. The residue there has not changed: It's still $1$. So $\int_\gamma \frac1z\,dz = \boxed{2\pi i}$, just like in the previous example.

This shows that the integral of $1/z$ around any path that loops around $0$ will be $2\pi i$. (As long as you loop only once, and you loop in the counter-clockwise direction.)

Example 3

Let $\gamma$ be a (simple) loop oriented counter-clockwise. Let $f$ 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, $0$, because there are no singularities to deal with (and hence no residues to sum up). So $\int_\gamma f(z)\,dz = 0$. This is Cauchy's Theorem.

Example 4

Let $\partial D(r)$ be the circle centered at $0$ of radius $r$, oriented counter-clockwise. When $r \neq 1$, what are the possible values of the integral
$$\int_{\partial D(r)} \frac{1}{z+1/z}\,dz?$$First let us write it as
$$\int_{\partial D(r)} \frac{z}{z^2+1}\,dz = \int_{\partial D(r)} \frac{z}{(z+i)(z-i)}\,dz.$$This tells us that the integrand explodes at only two points: $z=i$ and $z=-i$.

First case: If $0 < r < 1$, then the interior of the disk of radius $r$ won't contain either $i$ or $-i$, meaning that the integrand is defined everywhere inside it. So by Cauchy's Theorem, we would get $\int_{\partial D(r)} \frac{z}{z^2+1}\,dz = 0$.

Second case: If $r > 1$, then the interior of the disk of radius $r$ will contain both $i$ and $-i$. We need to sum up the residues at both of these singularities.

For $z=i$, we multiply the integrand by $z-i$ to get $\frac{z}{z+i}$. Plugging in $z = i$ into this will give us $\frac{i}{2i} = \frac{1}{2}$, so $\operatorname*{Res}_{z=i} \frac{z}{z^2+1} = \frac12$.

For $z = -i$, we instead multiply by $z+i$ to get $\frac{z}{z-i}$. Plugging in $z = -i$ gives $\frac{-i}{-2i} = \frac12$, so $\operatorname*{Res}_{z=-i} \frac{z}{z^2+1} = \frac12$.

Therefore, by the Residue Theorem,
$$\int_{\partial D(r)} \frac{z}{z^2+1}\,dz = 2\pi i\left(\operatorname*{Res}_{z=i} \frac{z}{z^2+1} + \operatorname*{Res}_{z=-i} \frac{z}{z^2+1}\right) = 2\pi i(1/2+1/2) = 2\pi i.$$
The two possible values are $\boxed{0}$ and $\boxed{2\pi i}$.

Exercises
  1. Compute $\int_{\partial D} \frac{1}{\sin z}\,dz$. Answer
  2. Compute $\int_{\partial D(\pi+0.001)} \frac{1}{\sin z}\,dz$. (Careful!) Answer Solution
  3. Compute $\int_\gamma \frac{e^z}{z^4-1}\,dz$, where $\gamma$ is the rectangle with vertices $\pm 100 \pm 0.5i$, oriented counter-clockwise.
    Solution

(Next Part)
This post has been edited 2 times. Last edited by greenturtle3141, May 19, 2023, 5:55 AM

Comment

0 Comments

Turtle math!

avatar

greenturtle3141
Archives
+ October 2024
Shouts
Submit
  • Can you give some thought to dropping a guide to STS? Just like how you presented your research (in your paper), what your essays were about, etc. Also cool blog!

    by Shreyasharma, Mar 13, 2025, 7:03 PM

  • this is so good

    by purpledonutdragon, Mar 4, 2025, 2:05 PM

  • orz usamts grader

    by Lhaj3, Jan 23, 2025, 7:43 PM

  • Entertaining blog

    by eduD_looC, Dec 31, 2024, 8:57 PM

  • wow really cool stuff

    by kingu, Dec 4, 2024, 1:02 AM

  • Although I had a decent college essay, this isn't really my specialty so I don't really have anything useful to say that isn't already available online.

    by greenturtle3141, Nov 3, 2024, 7:25 PM

  • Could you also make a blog post about college essay writing :skull:

    by Shreyasharma, Nov 2, 2024, 9:04 PM

  • what gold

    by peace09, Oct 15, 2024, 3:39 PM

  • oh lmao, i was confused because of the title initially. thanks! great read

    by OlympusHero, Jul 20, 2024, 5:00 AM

  • It should be under August 2023

    by greenturtle3141, Jul 11, 2024, 11:44 PM

  • does this blog still have the post about your math journey? for some reason i can't find it

    by OlympusHero, Jul 10, 2024, 5:41 PM

  • imagine not tortoise math

    no but seriously really interesting blog

    by fruitmonster97, Apr 2, 2024, 12:39 AM

  • W blog man

    by s12d34, Jan 24, 2024, 11:37 PM

  • very nice blog greenturtle it is very descriptive and fascinating to pay attention to :-D

    by StarLex1, Jan 3, 2024, 3:12 PM

  • orz blog

    by ryanbear, Dec 6, 2023, 9:23 PM

67 shouts
Tags
About Owner
  • Posts: 3553
  • Joined: Oct 14, 2014
Blog Stats
  • Blog created: Oct 23, 2021
  • Total entries: 54
  • Total visits: 40786
  • Total comments: 126
Search Blog
a