Complex Numbers II: A Guide to Contour Integration (Part 1 of 3)

by greenturtle3141, May 19, 2023, 4:58 AM

Reading Difficulty: 3.5/5
Prerequisites:
- Know what complex numbers are and how to do arithmetic with them.
- Know what an integral is and how to compute some basic integrals.
- It would be good to take a glance at my previous post on complex numbers.
- Sufficient spare time to read this gargantuan post.


This post ended up being so much longer than I anticipated. It is written with the intent of lowering the barrier to entry for learning this methodology. I hope this is helpful, and if nothing else, you can enjoy timing how long it takes you to scroll to the bottom of this post. Enjoy!

When I was young, I was really fascinated by the idea of using complex numbers to evaluate integrals such as $\int_{-\infty}^\infty \frac{1}{1+x^4}\,dx$. Unfortunately, I could not learn it. Any videos on YouTube showcasing the idea never really quite explained how it works or what to do. Any articles I found on the internet were simply way too advanced. This post here is meant to bridge the gap, assuming only a general knowledge of integration.

I cover things like holomorphic functions because without this background, it's once again quite easy to fall into weird pitfalls and paradoxes. I won't go too much into depth into the details because that should be deferred for an actual college course.

This post will be divided into several "lessons", each serving a different purpose.

Lesson 0: Complex Number Arithmetic and Review

My first post on complex numbers established some "hidden facts" about complex numbers, and how to avoid common but tricky pitfalls with complex number arithmetic. Let's review some of the key facts.

Complex Addition, Subtraction, Multiplication, Division

If you don't know how to do these, then you are not ready to read this post.

Magnitude ($|z|$) and Conjugation ($\overline{z}$)

If you don't know what these are and/or how to compute these quantities, then you are not ready to read this post.

Complex Exponents

Summary of Background:
  • Complex exponentiation doesn't really have an intitive interpretation, unless you'd like to enlighten me.
  • When $z$ is a complex number, $e^z$ is also a complex numberm and it is formally defined as a power series (which is a technicality that we won't need).
  • $e^z$ satisfies basic algebraic properties for real exponents, that you would expect. For example, $e^{z+w} = e^ze^w$.

Computing complex exponents:
  • $e^x$, when $x$ is real, is... just that.
  • $e^{iy}$, when $y$ is real, is the complex number $\cos(y) + i\sin(y)$. (ALL ANGLES ARE INTERPRETED AS RADIANS. NO DEGREES ALLOWED! THEY BREAK EVERYTHING.)
  • In general, to compute $e^{x+iy}$, you just combine the above two. You rewrite as $e^{x+iy} = e^x \cdot e^{iy}$, then simplify this to $e^x(\cos y + i\sin y)$.
  • Intuitively, for $z \in \mathbb{Z}$, the magnitude of $e^z$ is controlled by $\operatorname{Re} z$, whereas the angle of $e^z$ is controlled by $\operatorname{Im} z$.
  • Indeed, $e^{it}$ parametrizes the unit circle as $t$ ranges through $\mathbb{R}$, with $e^{it}$ being the complex number on the unit circle at angle $t$.

We will not worry about computing complex exponents with bases other than $e$.

Exercises
  1. Let $r > 0$ be a fixed real number. As parameter $t$ ranges through all real numbers, what path does the complex number $re^{it}$ trace? Answer
  2. Compute $e^{(1+i)\pi}$. Solution

Polar Form

You should be familiar with this, but I will review what this is just in case.

We know that $e^{i\theta}$ is the point on the complex unit circle at angle $\theta$. By scaling the unit circle, it follows that any nonzero complex number $z$ can be represented in the form $z = re^{i\theta}$, where $r > 0$ is the magnitude $|z|$ and $\theta$ is the angle of $z$.

Summary of Facts:
  • Actually, the angle is not unique. For example, $2e^{i\pi} = 2e^{3i\pi}$. So, it is only unique up to differences of multiples of $2\pi$.
  • We could make the angle unique by restricting it to an interval such as $[0,2\pi)$ or $(-\pi,\pi]$.
  • Writing in polar form can be incredibly useful. For example, it allows one to compute quantities such as $(1+i)^{2023}$ fairly quickly.

Examples:
  • $1+i$ has magnitude $\sqrt{2}$ and is at an angle of $\pi/4$. So we can write it in polar form as $1+i = \sqrt{2}e^{i\pi/4}$.
  • What is $\sqrt{3}e^{2i\pi/3}$? This can be evaluated purely using the rules we established for complex exponentiation, but the perspective of polar form is also useful. Here, we seek the complex number with magnitude $\sqrt{3}$ and angle $2\pi/3$. The complex number on the unit circle at the desired angle is $-1/2 + (\sqrt{3}/2)i$. Scaling this by $\sqrt{3}$, we get $-\sqrt{3}/2 + (3/2)i$.

Exercises
  1. Write $i$ in polar form. Answer

Roots of Unity

This is another thing you should know by now before reading this.

Uh, basically the roots of the polynomial $z^n-1$ are $\{e^{2\pi ik/n} : k = 0,1,\cdots,n-1\}$.

Exercises
  1. Why?
  2. How about $z^n+1$? Hint

Square Root of Complex Numbers

Summary of Facts:
  • Every non-zero complex number has two square roots. So, $\sqrt{z}$ is hard to define as a nice well-defined function, because functions can't output two different results.
  • If you had to make $\sqrt{z}$ a function, you would use the principal square root.
  • This is computed by writing $z$ in polar form $z = re^{i\theta}$, where $-\pi < \theta < \pi$, and then taking $\sqrt{z} := \sqrt{r} \cdot e^{i\theta/2}$.
  • (Disallowing $\theta = \pi$ is disputable. I exclude it for "safety" as you shall see soon.)
  • (There are "other square roots" that you can "choose".)

Exercises
  1. Compute $\sqrt{i}$, where $\sqrt{\cdot}$ is the principal square root. Answer
  2. Show that $\sqrt{-i}\sqrt{-i} \neq \sqrt{-i \times -i}$. (Technically the RHS is undefined under my definition, but if you want you can pretend that it is $\sqrt{-1}= i$.)

Complex Log

Summary of Facts:
  • This is a mess.
  • There are infinitely many logs, and none of them are perfect.
  • The "best" log is the principal log.
  • It is calculated as follows: If we write $z = re^{i\theta}$, where $-\pi < \theta < \pi$, then $\log z := \log(r) + i\theta$.
  • Intuitively this makes a lot of sense: We use the "rule" $\log(ab) = \log a + \log b$ to write
    $$\log(re^{i\theta}) = \log r + \log e^{i\theta}.$$
  • In general, however, it is NOT true that $\log(wz) = \log w + \log z$ holds. It only works in specific cases like the above equality.
  • (I have excluded $\theta = \pi$ for safety, once again.)

Exercises
  1. Compute $\log{i}$, where $\log{\cdot}$ is the principal log. Answer

Complex Trig

Basically you throw out all geometric intuition for sine and cosine. Instead we have very brute-force definitions:
$$\cos z := \frac{e^{iz} + e^{-iz}}{2}$$$$\sin z := \frac{e^{iz} - e^{-iz}}{2i}$$When $z$ is a real number $x$, then the formula $e^{ix} = \cos x + i\sin x$ holds, in which case these equations are obviously true. So, these formulas are the "most natural" way to extend the domains of sine and cosine to take in values other than real numbers.

(It is true that $e^{iz} = \cos z + i\sin z$ as a consequence of this definition, but this doesn't really help you evaluate what $\cos z$ is for complex $z$. The point is that we know how to exponentiate complex numbers, so we use that to figure out the cosine and sine.)

Exercises
  1. Compute $\cos{i}$. Answer
  2. Compute $\cos(\pi + i)$. Solution
  3. We say that the real function $\cos x$ is a bounded function because $-1 \leq \cos(x) \leq 1$ for all $x \in \mathbb{R}$. Can the same be said for $\cos z$ (i.e. the complex cosine)? Answer


Lesson 1: Differentiating Complex Expressions

The rules are all the same as for differentiating real expressions. The definition is the same ($f'(z_0) = \lim_{z \to z_0} \frac{f(z)-f(z_0)}{z-z_0}$). The $i$ doesn't really interfere with anything - just treat it as a constant.

I'll let you dive right into the exercises. This will show you that the answers you expect are basically just completely correct.

Exercises
  1. $\frac{d}{dz} iz =?$ Answer
  2. $\frac{d}{dz} \sin z =?$ Answer
  3. $\frac{d}{dz} \sin(iz) =?$ Answer
  4. $\frac{d}{dz} e^{iz} =?$ Answer
  5. $\frac{d}{dz} i^{9999999}$ Answer

Lesson 2: Integrating Complex Expressions

This is really easy. If you're trying to integrate something like $\int_a^b f(x) + g(x)i\,dx$ (where $f,g$ are real functions), then this is literally just $\int_a^b f(x)\,dx + i\int_a^b g(x)\,dx$.

Alternatively, suppose that $f$ is a complex-valued function, and you knew that $F' = f$ for some $F:\mathbb{C} \to \mathbb{C}$. Then you can apply the fundamental theorem of calculus (FTC)
$$\int_a^b f(x)\,dx = \int_a^b F'(x)\,dx = F(b) - F(a),$$which still works for complex numbers.

Example

How can we compute $\int_0^\pi e^{it}\,dt$? Well, we know that an antiderivative for $e^{it}$ is $\frac{1}{i}e^{it}$. So by the FTC we compute
$$\int_0^\pi e^{it}\,dt = \left.\frac{1}{i}e^{it}\,\right|_{t=0}^\pi = \frac{1}{i}\left(e^{i\pi} - e^0\right) = \frac{-2}{i} = \boxed{2i}.$$
But let's say you're not feeling confident about this computation. We could also have split the integrand into the real part and the imaginary part to get
$$\int_0^\pi e^{it}\,dt = \int_0^\pi \cos t + i\sin t\,dt = \int_0^\pi \cos t\,dt + i\int_0^\pi \sin t\,dt = 0 + i(2) = \boxed{2i}.$$
In general, all "nice properties" you are familiar with for integrating real expressions will naturally carry over to integrating complex expressions. For example we still have linearity such as $\int_a^b if(x)\,dx = i\int_a^b f(x)\,dx$.

Note that the variable we integrate with respect to MUST be a real number, ranging over an interval! Integrals such as "$\int_{\mathbb{C}} z\,dz$" or "$\int_{-i}^i z^2\,dz$" do not make sense, for example. (Well, actually the second integral is kinda ok for weird reasons, but please avoid it for now lol.)

Exercises
  1. $\int_0^1 it\,dt =?$ Answer
  2. $\int_0^1 (x+i)^{2023}\,dx =?$ Answer

ANNOYING WARNING: What is $\int_{-1}^1 \frac{1}{-1+it}\,dt$? You might be tempted to say that $\frac{1}{i}\log(-1+it)$ is an antiderivative and then plug in the limits. This is WRONG! The reason is because the $\log$ won't be defined at $t=0$. This isn't just a cheap reason to say not do this: The integrand jumps quite a bit at $t=0$, which breaks the FTC for a subtle reason. (Now you see why I exclude negative reals! As long as you stay where functions are defined, bad things don't happen.)

More generally, if you get a weird result or paradox in your computations, and they involve a square root or log, there is a good chance that these sublties are tripping you up. It's ok if you don't understand what's going wrong.

Lesson 3: Contour Integrals

An integral that looks like
$$\int_\gamma f(z)\,dz$$is called a contour integral. One major difference from before is that it's a $dz$, meaning that the "variable" ranges over complex numbers!

Let's talk about what this means.
  • $f(z)$ is a complex-valued function over complex numbers. That means that it can take in complex numbers and output complex numbers. It can be like, $e^{iz}$ or $\cos z$ or $3z^2$ or $1/z$ or... basically anything in terms of a complex variable $z$.
  • $\gamma$ is a curve in the complex plane. It's basically a path you can draw from a point $a \in \mathbb{C}$ to a point $b \in \mathbb{C}$.

Curves/paths need an orientation too: You either go one way or the other. Here are some examples of paths.
  • This thingy is a path! Let's call it $\gamma$.
    [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.5)..(-.5,1)..(1,.6)..(1.5,1.5),p=linewidth(1)+red,arrow=MidArrow);
dot((-1,-1.5),p=red);
dot((1.5,1.5),p=red);
label("$\gamma$",(-1,1.5),p=red);
[/asy]
  • This thingy is a different path because it's going the other way, so we call it $-\gamma$.
    [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.5,1.5)..(1,.6)..(-.5,1)..(-1,-1.5),p=linewidth(1)+red,arrow=MidArrow);
dot((-1,-1.5),p=red);
dot((1.5,1.5),p=red);
label("$-\gamma$",(-1,1.5),p=red);
[/asy]
  • This is a totally different path, so we're giving it a different letter.
    [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.5)--(1.5,-1.5)--(1.5,1.5),p=linewidth(1)+orange,arrow=MidArrow);
dot((-1,-1.5),p=red);
dot((1.5,1.5),p=red);
label("$-\alpha$",(-1,1.5),p=orange);
[/asy]
  • The unit circle is an important example of a path that loops.
    [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(arc((0,0),1,0,360,CCW),p=purple,arrow=MidArrow);
dot((1,0),p=purple);
label("$\partial D$",(-1,1.5),p=purple);
[/asy]
    One way to denote this path is by $\partial D$. Whenever we talk about the unit circle as a path, you should assume that we're going counter-clockwise. (The starting point doesn't really matter.)
  • It's ok for paths to have sharp corners. This sector boundary is a perfectly good path! (It also loops)
    [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)--(1,0)--arc((0,0),1,0,45,CCW)--(0,0),p=blue,arrow=MidArrow);
dot((0,0),p=blue);
label("$\beta$",(-1,1.5),p=blue);
[/asy]

How do you integrate over a path? Here are the steps.
  1. Let's say the path is called $\gamma$. First, find a parametrization for $\gamma$. A parametrization is a function $\varphi(t)$ that traces out the $\gamma$ path. For example, if $\gamma$ is the unit circle, a parametrization is given by $e^{it}$ as $t$ ranges from $0$ to $2\pi$.
  2. Once you have a parametrization $\varphi:[a,b] \to \mathbb{C}$ for $\gamma$, the contour integral is given by
    $$\int_\gamma f(z)\,dz := \int_a^b f(\varphi(t))\varphi'(t)\,dt.$$

It's important that you know how to do this, so let's do three examples.

Example 1

Let's compute the contour integral $\int_{\partial D} \frac{1}{z}\,dz$, where $\partial D$ is the unit circle oriented counter-clockwise.

A parametrization for $\partial D$ is the function $e^{it}$ as $t$ ranges from $0$ to $2\pi$. Thus the integral is just
$$\int_{\partial D} \frac{1}{z}\,dz = \int_0^{2\pi} \frac{1}{e^{it}} \cdot \left(\frac{d}{dt} e^{it}\right)\,dt = \int_0^{2\pi} \frac{ie^{it}}{e^{it}}\,dt = \int_0^{2\pi}i\,dt = \boxed{2\pi i}.$$
Example 2

Let's try a more annoying example. Compute the contour integral $\int_{\Gamma} \frac{1}{z}\,dz$, where $\Gamma$ is the square with vertices $\pm 1 \pm i$, oriented counter-clockwise.
[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]

Man, it's annoying to make a single function that traces out the entire square! Fortunately, because of properties of contour integrals, we're allowed to split this path up into four nicer paths, which are each easier to parametrize. Here, I want to split this up into the four segments that make up the 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((-1,-1)--(1,-1),p=red,arrow=MidArrow);
draw((1,-1)--(1,1),p=purple,arrow=MidArrow);
draw((1,1)--(-1,1),p=orange,arrow=MidArrow);
draw((-1,1)--(-1,-1),p=red+purple,arrow=MidArrow);
label("$\Gamma_1$",(0,-1.5),p=red);
label("$\Gamma_2$",(1.5,0),p=purple);
label("$\Gamma_3$",(0,1.5),p=orange);
label("$\Gamma_4$",(-1.5,0),p=red+purple);
[/asy]

I'm allowed to split up the contour integral into the sum of four smaller contour integrals over these smaller paths:
$$\int_\Gamma \frac{1}{z}\,dz = \int_{\Gamma_1} \frac{1}{z}\,dz + \int_{\Gamma_2} \frac{1}{z}\,dz + \int_{\Gamma_3} \frac{1}{z}\,dz + \int_{\Gamma_4} \frac{1}{z}\,dz$$So we just need to compute these four integrals. (Yeah yeah yeah it's still annoying, but what can you do...)
  • The lower side $\Gamma_1$ can be parametrized by the function $t-i$ as $t$ ranges from $-1$ to $1$. So
    $$\int_{\Gamma_1} \frac{1}{z}\,dz = \int_{-1}^1 \frac{1}{t-i} \cdot \left(\frac{d}{dt} t-i\right)\,dt = \int_{-1}^1 \frac{1}{t-i}\,dt$$Being wary of tbe warning at the end of Lesson 2, we will NOT be using the complex (principal) log to quickly evaluate this. (Here it should work fine, but I want to be veerrryyyy careful, and so should you!) Let's find a different way to evaluate this.

    Remember: If you are ever nervous about what things you're allowed to do with complex integrals, you can always sidestep the issue by splitting the integral into the real part and the imaginary part. This is ALWAYS ok. Here, we can do this by multiplying by the conjugate:
    $$\int_{-1}^1 \frac{1}{t-i}\,dt = \int_{-1}^1 \frac{t+i}{(t-i)(t+i)}\,dt = \int_{-1}^1 \frac{t+i}{t^2+1}\,dt = \int_{-1}^1 \frac{t}{t^2+1}\,dt + i\int_{-1}^1 \frac{1}{t^2+1}\,dt.$$The first integral evaluates to 0 by symmetry (the integrand is odd), and the second integral is $\left.i\tan^{-1}(t)\,\right|_{t=-1}^1 = i\pi/2$. Thus $\int_{\Gamma_1} \frac1z\,dz = i\pi/2$.
  • The right side $\Gamma_2$ can be parametrized by the function $1+it$ as $t$ ranges from $-1$ to $1$. So
    $$\int_{\Gamma_2} \frac{1}{z}\,dz = \int_{-1}^1 \frac{1}{1+it} \cdot \left(\frac{d}{dt} 1+it\right)\,dt = i\int_{-1}^1 \frac{1}{1+it}\,dt.$$If you do the same trick as we did for $\Gamma_1$, you get that $\int_{\Gamma_2} \frac{1}{z}\,dz = i\pi/2$. Again.
  • $\Gamma_3$ is paramterized by $-t+i$, $t \in [-1,1]$ and we get $\int_{\Gamma_3} \frac{1}{z}\,dz = i\pi/2$ by the same process.
  • $\int_{\Gamma_4} \frac{1}{z}\,dz = i\pi/2$ by the same process.

Thus $\int_{\Gamma} \frac{1}{z}\,dz = i\pi/2 + i\pi/2 + i\pi/2 + i\pi/2 = \boxed{2i\pi}$. Wait, isn't that the same answer as the previous example? Strange.

Example 3, Kinda

Let's compute the contour integral $\int_\gamma e^z\,dz$, where $\gamma$ is the following pacman shape of radius $1$:
[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]

We need to split this into three different parts.
[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),p=red,arrow=MidArrow);
draw(arc((0,0),1,45,360-45,CCW)--(0,0),p=purple,arrow=MidArrow);
draw(dir(-45)--(0,0),p=orange,arrow=MidArrow);
label("$\gamma_1$",(0.7,0.3),p=red);
label("$\gamma_3$",(0.7,-0.3),p=orange);
label("$\gamma_2$",(-0.8,1),p=purple);
[/asy]

The first part, $\gamma_1$, is parametrized by $e^{i\pi/4}t$ for $t \in [0,1]$. So the integral over $\gamma_1$ is
$$\int_{\gamma_1} e^z\,dz = \int_0^1 e^{e^{i\pi/4}t} \cdot \left(\frac{d}{dt}e^{i\pi/4}t\right)\,dt$$$$= \int_0^1 e^{e^{i\pi/4}t} \cdot e^{i\pi/4}\,dt = e^{i\pi/4}\int_0^1 e^{e^{i\pi/4}t}\,dt.$$This might look complicated, but the integrand is basically just of the form $e^{ct}$ where $c$ is a constant. So its antiderivative is $c^{-1}e^{ct}$, meaning that this integral evaluates to
$$e^{i\pi/4}\int_0^1 e^{e^{i\pi/4}t}\,dt = \left.e^{e^{i\pi/4}t}\,\right|_{t=0}^1 = e^{e^{i\pi/4}}-1.$$
The third part, $\gamma_3$, is handled similarly.
$$\int_{\gamma_3} e^z\,dz = \int_0^1 e^{e^{-i\pi/4}t} \cdot \left(\frac{d}{dt}e^{-i\pi/4}t\right)\,dt = \ldots = e^{e^{-i\pi/4}}-1$$
Now we tackle the second part, $\gamma_2$. This is parametrized by $e^{it}$ for $t \in [\pi/4,7\pi/4]$. So
$$\int_{\gamma_2} e^z\,dz = \int_{\pi/4}^{7\pi/4} e^{e^{it}} \cdot \left(\frac{d}{dt} e^{it}\right)\,dt = \int_{\pi/4}^{7\pi/4} e^{e^{it}} \cdot ie^{it}\,dt.$$This integral sucks to evaluate, so I'm not going to do it. (note that making the "substitution" $u = e^{it}$ doesn't actually help you because it just goes backwards a step.)

Darn, if only there was some really cool theorem that could help solve this problem. What a shame.

Summary of Contour Integral Properties
  • It's linear, so $\int_\gamma f(z)+g(z)\,dz = \int_\gamma f(z)\,dz + \int_\gamma g(z)\,dz$, and also $\int_\gamma c \cdot f(z)\,dz = c\int_\gamma f(z)\,dz$.
  • It's "additive on paths". So if you split a path $\gamma$ into two paths $\gamma_1$ and $\gamma_2$, then $\int_\gamma f(z)\,dz = \int_{\gamma_1}f(z)\,dz + \int_{\gamma_2}f(z)\,dz$. We used this property to do Example 2.
  • Reversing the direction of the path will negate the integral. That is, if $\gamma$ is a path and $-\gamma$ is that same path but going the opposite way, then $\int_{-\gamma} f(z)\,dz = -\int_\gamma f(z)\,dz$.

(Stupid warning: If you're intentionally trying to break math, it's possible to take contour integrals over really strange paths that completely destroy this post. It's basically impossible for you to do that though unless you try though, because those paths that might do that are REALLY nasty and hard to come up with, so don't worry.)

Exercises
  1. Let $\log$ denote the principle logarithm, so that $\log(re^{i\theta}) = \log(r) + i\theta$ whenever $r > 0$ and $\theta \in (-\pi/2,\pi/2)$. Demonstrate the identity
    $$\log(re^{i\theta}) = \int_\gamma \frac{1}{z}\,dz,$$where $\gamma$ is the path that starts at $1$, moves left/right to the real number $r$, then moves along a $\theta$-radian arc centered at $0$ with radius $r$ in order to reach the complex number $re^{i\theta}$.
    [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,0)--(1.5,0)--arc((0,0),1.5,0,120,CCW),p=red+linewidth(1.75),arrow=MidArrow(7));
dot("$1$",(1,0),S);
dot("$r$",(1.5,0),S);
dot("$re^{i\theta}$",1.5*dir(120),S);
label("$\gamma$",(-1,1.5),p=red);
[/asy]

    (If you want, you may assume that $r > 1$ and $\theta > 0$ so you don't have to consider multiple cases.)

    Solution

Lesson 4: Holomorphic Functions

In the complex world, "holomorphic" is just a fancy word for "differentiable". All of the functions we've mentioned so far are holomorphic:
  • Polynomials like $z^n + z^2 - z + 3$ are holomorphic, over all $z \in \mathbb{C}$.
  • $e^z$ is holomorphic, over all $z \in \mathbb{C}$.
  • $\cos z$ is holomorphic, over all $z \in \mathbb{C}$.
  • Rational functions such as $1/z$ or $\frac{1}{z^2+1}$ are holomorphic, wherever they are defined.
  • Combining things from above (using addition, multiplication, composition, etc.) will still make a holomorphic function. For example, $\sin(z^2) - 1/\cos(e^z)$ is holomorphic, wherever it is defined.

If you want more fancy words: A function that is holomorphic on the whole complex plane is called entire.

Some functions are a bit more subtle.
  • The principal square root $\sqrt{z}$ is holomorphic wherever it is defined, because I excluded the negative reals in the definition. If you define the square root over the negative reals, then it won't be holomorphic... or even continuous! This is why it's so important to restrict the principal square root to the slit plane $\mathbb{C} \setminus \{x \in \mathbb{R} : x < 0\}$.
  • The principal log $\log z$ is holomorphic for the same reason. Its derivative is $1/z$ (with domain being the slit plane).

Not everything is holomorphic.
  • Unsurprising Counterexample: $|z|$ is not holomorphic. It has a "sharp corner" at $0$.
  • Surprising Counterexample: $\overline{z}$ is not holomorphic! Very roughly speaking, this is because conjugation messes up rotations.

(Holomorphic functions satisfy some really insanely cool properties. They're honestly miracles. We won't really talk about these miracles, though, since that would mak this post longer than it needs to be.)

Here is the motto I want you to take away from this lesson: Holomorphic functions are really nice, and you should not try and apply any of the theorems we talk about to functions that are not holomorphic. I can't guarantee that the numbers will work out if you do that. Fortunately, basically all sane things that you would consider integrating are holomorphic!


(Next part)
This post has been edited 1 time. Last edited by greenturtle3141, May 19, 2023, 5:18 AM

Comment

2 Comments

The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
very nice read, learned contour integration better than random google sites. :)

by wasu, Nov 13, 2024, 2:21 PM

The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
cool stuff!

by kingu, Dec 4, 2024, 12:23 AM

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: 40542
  • Total comments: 126
Search Blog
a