<<

MATH 551 LECTURE NOTES COMPLEX VARIABLES: A VERY SHORT PRACTICAL GUIDE (FUNDAMENTALS AND CONTOUR )

Topics covered • Complex functions ◦ Complex differentiability; analytic functions ◦ Cauchy-Riemann equations (connection to harmonic functions) ◦ Multiple-valued functions and branch cuts • Preparing for contour integrals ◦ Poles and meromorphic functions ◦ Cauchy formula, Laurent ◦ Contour integrals; contour deformation (in general) ◦ , calculating residues ◦ Trick for simple poles

Introduction The main goal here is to introduce the fundamentals of complex required to work with contour integrals that arise in the Fourier and Laplace transforms and the nice prop- erties of complex functions that inform the solutions. Our focus will be on these transform methods for solving PDEs, but it will be necessary to first learn the methods for computing contour integrals in general.

As such, the treatment here is minimal and is by no means a thorough look at this rather deep subject. We will leave out some topics in favor of having more time to focus on the intended applications.

Notation: The following notation will be used (refer back as needed): √ • i = −1 (the ) and z = x+iy is a complex with real/imaginary parts x and y. A point z in the complex C is associated with (x, y) in R2. • A complex f(z) with real/imaginary parts u and v can be written f(z) = f(x + iy) = u(x, y) + iv(x, y) • Γ is a contour in the , often parameterized by z(t) = (x(t), y(t)) R H • Γ f dz is a contour integral in the complex plane and Γ f dz is a contour integral over a closed contour (or ‘closed loop’)

1. Review of complex √ • Complex numbers: C is the of complex numbers z = x + iy where i = −1 is the ‘imaginary unit’ and x = Re(z) = ‘real part’, y = Im(z) = ‘imaginary part’. 1 2 COMPLEX VARIABLES

Addition is component-wise as in R2 but i2 = −1 so

z1z2 = (x1 + y1i)(x2 + y2i) = x1x2 − y1y2 + (y1x2 + x1y2)i. While tempting to compare to the plane R2, the ‘complex plane’ has much more structure due to the multiplication of complex numbers.

The conjugate (with an overbar) of z = x + iy and the modulus |z| (‘magnitude’) are √ p z = x − yi, |z| = zz = x2 + y2. The conjugate distributes over sums/products (vw = vw etc.) and 1 1 Re(z) = (z + z), Im(z) = (z − z). 2 2

• Polar form: A z can be written in rectangular or polar coordinates: z = x + iy or z = r cos θ + ir sin θ, r2 = x2 + y2, θ = arg z = tan−1(y/x) The values r and θ are the modulus and argument, respectively.

Euler’s formula and n-th roots: A critical result is Euler’s formula, cos θ + i sin θ = eiθ (so z = reiθ in polar form) In particular, note that this implies that e2πi = 1 and zn = 1, n ≥ 1 an =⇒ z = e2πik/n, k = 0, ··· n − 1 More generally, solving zn = c is done in polar form: zn = reiα =⇒ z = r1/neiα/ne2πik/n, k = 0, ··· , n − 1

iθ −iθ iθ1 iθ2 i(θ1+θ2) Other is also easy in this form e.g. e = e and r1e · r2e = r1r2e .

• Functions: A general complex function is a function of two variables, typically written as f(z, z) or a function of x, y for the input z = x + iy. It can be written in terms of real/imaginary components: f(z, z) = u(x, y) + iv(x, y) where u, v are real functions from the plane to R. Most real functions f(x) have ‘complexi- fied’ versions f(z) (just a function of z) e.g. f(x) = x2 =⇒ f(z) = (x + iy)2 = x2 − y2 + i2xy. COMPLEX VARIABLES 3

2. Multi-valued functions, branch cuts A complex function can be multi-valued due to the formula e2πik = 1 for all k. Most functions are still single-valued dspite this, e.g. f(z) = z2 =⇒ f(ze2πik) = z2e4πik = z2. However, multi-valued functions are also common. For example, consider f(z) = z1/2. Evaluating in polar coordinates with z = reiθ, f(reiθ) = f(reiθ · 1) = f(reiθ+i2πk) = r1/2eiθ/2eiπk, k = 0 or 1. That is, there are two versions of f that can be defined: ( f(z) = |z|1/2eiθ/2 (k = 0) f(z) = −|z|1/2eiθ/2 (k = 1) The two definitions are the branches of f. We must choose one branch to have a single val- ued function. The k = 0 version is called the principal branch of the function. Regardless of which branch is chosen, there is a jump across some line (segmaent) in the complex plane:

The location of this line depends on the choice of argument. If we take θ ∈ [−π, π] then there is a jump at θ = π since f(eiθ) → i as θ increases to π , f(eiθ) → −i as θ decreases to −π so there is a jump at θ = π. The problem is that the argument θ = arg z is periodic , but ei arg z/2 has different values for θ’s separated by 2π. We could also choose θ ∈ [0, 2π], in which case the jump is across θ = 0 instead.

The segment across which f is discontinuous is the branch cut and the endpoints are the branch points. In this case, we have one at 0 and another ‘at ∞’ (at −∞ + 0i with θ ∈ [−π, π] and ∞ + 0i for θ ∈ [0, 2π].

: An important example is the natural : ln(z) = ln(reiθe2πik) = ln(r) + iθ + 2πik = ln |f(z)| + i arg(z) + 2πik 4 COMPLEX VARIABLES with infinite number of branches (one for each integer k). The principal branch is ln(z) = ln(r) + iθ. This function has a branch cut where arg(z) jumps and a branch point at the origin, and discontinuous across this jump (by a value of 2πi).

• Typically, the branch cut occurs where arg(z) jumps, and the range of θ determines the placement of the branch cut. For more complicated functions (to be discussed later), branch cuts can be segments or centered at branch points other than the origin.

• Roots in general: Using the we may determine branch cuts for ‘n-th roots’ and other powers using the definition zp = ep ln z. 1/m For example, consider (z − z1) . Using the above and the formula for ln z, 1 2πik (z − z )1/m = exp( ln(z − z )) = |z − z |1/m exp( arg(z − z )) 1 m 1 1 m 1 iα With z − z1 = re , this reads 1/m 1/m (z − z1) = r exp(2πikα/m). Each distinct value of exp(2πikα/m) yields a branch; there may be finite or infinitely many depending on the number of distinct values.

Example (branch cut): Suppose we wish to define a branch of z4 so that f(z) = z4, f(1) = i, f is continuous along the real axis (except 0). There are four choices for z4, from the calculation f(ze2πik) = |z|1/4eiθ/4eπik/2. The one with f(1) = i is (plug in z = ei0) z4 = |z|1/4eiθ/4eiπ/2. The branch cut occurs at the endpoint of the range for θ = arg z. We needed continuity at θ = 0 and θ = π so the branch cut must be placed somewhere else e.g. by taking [−π/2, 3π/2] (any range including 0, π inside). This puts the branch cut at −π/2 . COMPLEX VARIABLES 5

3. Analytic functions A complex function f(z, z) has the form z + z z − z f(z, z) = u(x, y) + iv(x, y), x = , y = . (3.1) 2 2 The function is called analytic or holomorphic if it is well-defined and solely a function of z. The ‘brute force’ meaning of this is that if the expressions for x, y are plugged into (3.1), the z’s cancel, leaving only z (so f = f(z)).

This is equivalent to no dependence on z, written succinctly as ∂f f = f(z) ⇐⇒ = 0. (3.2) ∂z The complex of an is f(z + ∆z) − f(z) f 0(z) = lim . (3.3) ∆z→0 ∆z The can be taken over ∆z = ∆x + i∆y as ∆x, ∆y → 0 in any way. Thus (3.3) is really two partial . However, when f is analytic, (3.3) is well-defined - the limit in any direction (∆x, ∆y → 0 by any path) will give the same value f 0(z).

To understand why f 0(z) is well defined, let z = x + iy, let f be analytic and write f(z) = u(x, y) + iv(x, y) We can take the derivative along the ‘real’ or ‘imaginary’ directions:  ∆x → 0, ∆y = 0 (real)  ∆z = ∆x + i∆y → 0 with or ∆x = 0, i∆y → 0 (imaginary) This gives two values for f 0(z), which are f(z + ∆x) − f(z) ∂u ∂v f 0(z) = lim = + i ∆x→0 ∆x ∂x ∂x f(z + i∆y) − f(z) ∂u ∂v f 0(z) = lim = −i + ∆y→0 i∆y ∂y ∂y Equating the two, we obtain the Cauchy-Riemann equations, which also characterize analytic functions. Putting the results in a nice box:

Analytic functions: For f = u(x, y) + iv(x, y), the following are equivalent: • f is well-defined and ‘a function of z only’ (f = f(z) or equiv. ∂f/∂z = 0) • f(z) is complex differentiable in the sense that (3.3) exists. • The real/imaginary parts u, v satisfy the Cauchy-Riemann equations ∂u ∂v ∂v ∂u = , = − . (3.4) ∂x ∂y ∂x ∂y A function with these properties is called (complex) analytic or holomorphic. 6 COMPLEX VARIABLES

Aside: harmonic functions: Suppose f(z) = u(x, y) + iv(x, y) and u and v are smooth. Letting subscripts denote partial derivatives, we have that

ux = vy, vx = −uy. Now take ∂/∂x of the first CR equation and ∂/∂y of the second and use the other to simplify:

uxx = (vy)x = (vx)y = −uyy

vxx = −(uy)x = −(ux)y = −vxx so it follows that u, v are both harmonic functions (solutions to Laplace’s equation): ∇2u = 0, ∇2v = 0. We can use this fact to solve Laplace’s equation ∇2u = 0 (beyond the scope of the discussion here) by finding the right f(z) whose real part satisfies the desired boundary conditions. For example, f(z) = z2 is analytic and, with z = x + iy, z2 = x2 − y2 + 2ixy =⇒ u = x2 − y2, v = 2xy solve Laplace’s equation.

4. Contour integrals The starting point is the regular in R2. Analyticity will provide additional structure that we can exploit to evaluate such integrals in C.

Line integrals (review): Let v(x, y) = (p(x, y), q(x, y)) be a vector field in the plane. Let Γ be a path from a point A to a point B with parameterization x(t) = (x(t), y(t)) (from t0 to t1). Then Z Z t1 dx Z Z t1 dx dy v · dx = v · dt = p dx + q dy = p + q dt. Γ t0 dt Γ t0 dt dt A vector field v = (p, q) is conservative if v = ∇φ for a ‘potential’ φ(x, y). We have: Z ∂q ∂p v is conservative ⇐⇒ v · dx is path-independent ⇐⇒ = . (4.1) Γ ∂x ∂y Path-independence means the integral depends only on the endpoints of the path: Z Γ from A → B =⇒ v · dx = φ(B) − φ(A). Γ Green’s theorem’s in the plane (the divergence/Stokes’ theorem) state that I Z ∂p ∂q −q dx + p dy = + dA ∂Ω Ω ∂x ∂y I Z ∂q ∂p p dx + q dy = − dA ∂Ω Ω ∂x ∂y if p and q do not blow up in Ω. Note that the result does not hold otherwise. COMPLEX VARIABLES 7

4.1. Contour integrals (analytic functions). First, some notation: • Given a path Γ from A to B, we define the ‘reverse’ path −Γ to be the same , traversed in the opposite direction. An important rule is that Z Z f(z) dz = − f(z) dz. (4.2) Γ −Γ H • A ‘closed contour’ is a path Γ from A back to itself. We write Γ ··· dz (with a circle) to denote integrals over closed contours. For a bounded Ω, the boundary contour is the boundary traversed counter-clockwise. • This defines the inside of a closed contour Γ. To check, use the ‘right hand rule’: if the index finger of your right hand points along the path, your thumb points into the region (the inward normal).

In general, for a complex function f(z, z) = u + iv, the ‘contour integral’ over a path (‘contour’) in the complex plane is a line integral with real and imaginary parts: Z Z Z Z f dz = (u + iv)(dx + i dy) = u dx − v dy + i u dx + v dy. Γ Γ Γ Γ For a general f, there is not much more to say. However, when f is analytic, the contour integral has much nicer properties due to the Cauchy-Riemann equations.

Theorem (path independence): Let f(z) be analytic in a region Ω with anti-derivative F (z) = R f dz. If Γ is a path in Ω from A to B then Z f(z) dz = F (B) − F (A) Γ which depends only on the endpoints and is independent of the path.

Proof. To see this, use the theorem for conservative vector fields (4.1). By definition, Z Z  Z  f dz = u dx − v dy + i v dx + u dy Γ Γ Γ = line int. of (u, −v) + i (line int. of (v, u))

From the Cauchy-Riemann equations, vx = −uy and ux = vy so using theorem (4.1), ∂ (−v) = ∂/∂x(u) =⇒ (u, −v) is conservative ∂y 8 COMPLEX VARIABLES ∂ ∂ (u) = (v) =⇒ (v, u) is conservative. ∂x ∂u R It follows that both the real/imaginary parts of Γ f dz are path-independent.  Contour integrals can thus be computed without dealing with the path, e.g. ( Γ = any path from 0 to 0 + 2i Z 1 0+2i =⇒ I = z2 dz = z3 = 8i3/3 = −8i/3 2 f(z) = z Γ 3 0 since f(z) = z2 is analytic on all of C.

Now suppose Γ is a closed contour and f is analytic inside Γ. This curve is the union of a path Γ1 from A to B and a path ΓB from B to A (see sketch). Because f is analytic, f has a single anti-derivative F (z). Thus, if the path independence theorem applies, I Z Z f dz = f dz + f dz = ((F (B) − F (A)) + (F (A) − F (B)) = 0. (4.3) Γ Γ1 ΓB

Cauchy’s theorem: Let Γ be a closed contour. If f(z) is analytic inside Γ (no singularities), I f dz = 0. Γ

Importantly, the result applies only if f(z) is analytic in the region inside the contour. For example, let Γ be the circle of radius 1, traversed counter-clockwise: Γ = {z(t) = eit, t ∈ [0, 2π]}. Then 1/(z − 2) is analytic in the region |z| ≤ 1 , so I 1 dz = 0. Γ z − 2 However, 1/z is not analytic inside, and I 1 Z 2π Z 2π dz = e−itz0(t) dt = 1 dt = 2π. Γ z 0 0 The integral Γ is path-independent along any arc: but fails for the full closed contour. The argument in (4.3) does not apply because f does not have a single anti-derivative in the circle; R 1/z dz = ln z is multi-valued. We must place a branch cut somewhere! COMPLEX VARIABLES 9

4.2. Deformation. A function can fail to be analytic for two reasons: either it diverges at a point, or there is a branch cut (the multi-valued problem). Recall that we must choose a branch of a multi-valued f(z) to make it uniquely defined. To summarize:

Singularities: A singularity is a point where a complex function fails to be analytic. There are two main types:

• A ‘pole’ of order m at z = z0, where C f(z) ≈ m as z → z0. (z − z0) • A ‘branch cut’, chosen when specifying a branch of f(z) - usually a ray from some point (the branch point) out to ∞. The singularity is the entire ray, and f(z) is typically discontinuous across this line. A function that is analytic except at an isolated of poles is called meromorphic.

Path independence applies only when f is analytic. If this is the case, a contour ΓA can be freely ‘deformed’ into another contour ΓB with the same endpoints and preserve the value: Z Z f dz = f dz if f is analytic between ΓA and ΓB. ΓA ΓB The deformation must avoid any singularity of f. To prove this (see below), observe that the contour formed by ΓA and −ΓB is closed and contains no singularities, so Z Z Z Z 0 = f dz + f dz =⇒ 0 = f dz − f dz ΓA −ΓB ΓA ΓB by flipping the direction of the second integral.

For closed contours: Similarly, a closed contour can be deformed freely as long as the deformation does not make Γ cross a singularity. To be precise, suppose ΓA and ΓB are closed contours with no singularities between them. Then Z Z f dz = f dz. ΓA ΓB

The sketch below illustrates the proof. We insert a small ‘bridge’ of width  between ΓA and ΓB, cutting out a bit of the closed loops as well to get a closed contour

− + C = ΓeA + L + (−ΓeB) + L 10 COMPLEX VARIABLES as shown below. There are no singularities in this contour (by assumption) so I Z Z Z Z 0 = f dz = f dz − f dz + f dz + f dz. (4.4) − + C ΓeA ΓeB L L As  → 0, the two sides of the bridge approach the same line (but opposite directions) and the cut out parts of the closed loops shrink in size to zero so we have that ˜ ˜ − + ΓA → ΓA, ΓB → ΓB,L → −L . Taking these limits in (4.4), the contributions along the bridge cancel, leaving Z Z 0 = f dz − f dz. ΓA ΓB

Key point: In contour integrals over paths where f is analytic, the contour can be deformed as long as it does not touch/cross a singularity.

In particular, we can deform contours into unions of simple shapes like circular arcs and straight lines, which are nice for computation.

Contour deformation is a powerful tool because if interested in evaluating a contour integral, we can always deform the contour into the simplest form possible: Z Z f dz = f dz, Γnice = easiest equivalent contour for evaluating the integral. Γ Γnice With a few more tools, ‘bad’ segments of contours can be dealt with, leaving only nice closed contours or contours with simple shapes. The only barriers are the singularities of the function, that block convenient deformation. For this reason, is more about avoiding singularities than it is about computing integrals. COMPLEX VARIABLES 11

5. ; Cauchy’s formula

If a function f(z) has an isolated pole at z0 like 1/(z − z0), then a contour around f(z) can be deformed to arbitrarily small size around the pole. Thus, local behavior of f(z0 is important to know. The basic tool for this is the Laurent series.

Review: Recall that the for a real function f(x) around x0 is ∞ X 1 f(x) = a (x − x )n, a = f (n)(x ), (5.1) n 0 n n! 0 n=0

which is valid in an interval around x0 of radius ρ (the ‘radius of convergence’)

(5.1) converges for all x such that |x − x0| < ρ.

Complex case: If f(z) is analytic in a disk of radius ρ around z0 it has the Taylor series ∞ X 1 f(z) = a (z − z )n, a = f (n)(z ) (5.2) n 0 n n! 0 n=0 which converges in the disk.1 In particular, this means that the radius of convergence of (5.2) is the distance to the nearest singularity of f.

A Laurent series for f generalizes Taylor series, allowing an isolated pole. It has the form ∞ X n f(z) = an(z − z0) n=−m a−m a−m+1 a−1 = m + m−1 + ··· + + a0 + a1(z − z0) + ··· (z − z0) (z − z0) z − z0 | {z } analytic part where m is the order of the pole. While the first term (n = −m) determines the order of the pole, it is the last term (n = −1) that determines the contour integral (as we will see shortly).

Along with the Taylor series formula, we also have a nice integral form for derivatives:

Cauchy’s integral formula: If f is analytic in a closed contour Γ and z0 is inside, then I 0 = f(z) dz (Cauchy’s theorem) Γ and for n ≥ 0, I (n) n! f(z) f (z0) = n+1 dz. 2πi Γ (z − z0)

Important case: Most notably, for n = 0 the formula reads 1 I f(z) f(z0) = dz, 2πi Γ z − z0 which is remarkably like the sifting property of the δ. The formula says that if we know f on the boundary of a loop, then f is known in the entire region! 12 COMPLEX VARIABLES

6. The residue theorem

The coefficient a−1 is called the residue of f(z) at the pole z0: 1 Res(f, z0) := a−1 = coeff. of in the Laurent series of f at z0. z − z0 For example, 4 3 f(z) = + =⇒ Res(f, 1) = 3. (z − 1)2 z − 1

At every other z0, this function is analytic so there are no other residues. A key result is that this value determines the contour integral of a closed contour around the pole, regardless 2 of the higher order terms (1/(z − z0) etc.):

Residue theorem (one pole): If f is analytic in a closed contour Γ except a pole at z0, I f(z) dz = 2πi Res(f, z0). Γ The integral over the loop only cares about the residue of the pole inside it (nothing else).

Proof. The proof illustrates some useful ideas. We can deform the contour to be a circle of arbitrarily small size   1 around z0: iθ Γ = {z(t) = z0 +  · e , θ ∈ [0, 2π]}. In this small region, f(z) is approximately equal to its Laurent series −1 X n f(z) ≈ an(z − z0) + (analytic). n=−m The integral H ··· dz of the analytic part is zero and I Z 2π Z 2π ( 1 1−m −imθ iθ i(1−m)θ) 0 m 6= 1 m dz =  e ie dθ = i e dθ = . Γ (z − z0) 0 0 2π m = 1 Thus the contour integral only picks up the n = −1 term, and so I I f(z) dz ≈ f(z) dz = 2πia−1. Γ Γ Finally, take  → 0 (shrinking the circle to arbitrarily small) to make the ≈ an equality. COMPLEX VARIABLES 13

 The brute force method to calculate the residue (shortcuts to follow) is to find the Laurent series around z = 1; this is most easily done by expanding simpler parts and doing ‘ arithmetic’ (products etc. of series). Two examples:

Example 1: Suppose e2z f(z) = (z − 1)2 and let Γ be a circle of radius 2 centered at the origin. Then z0 = 1 is inside the contour, so I f(z) dz = 2πiRes(f, 1). Γ The denominator is okay already, so expand the numerator: e2z = e2e2(z−1) = e2(1 + 2(z − 1) + 2(z − 1)2 + ··· ). This gives the Laurent series e2 2e2 f(z) = + + ··· (z − 1)2 z − 1 I 2z e 2 2 =⇒ 2 dz = 2πi(2e ) = 4e πi. Γ (z − 1) If instead Γ is a a circle of radius 1/2 around 0, then there is no singularity inside, so I e2z 2 dz = 0. |z|=1/2 (z − 1)

Example 2: If there is no residue (no 1/(z − z0) term in the Laurent series) the integral is zero, just like for an analytic function. For example, 1 1 2  1  2 f(z) = = = = + 1 + 1 + a z2 + ··· 1 2 1 4 2 1 2 2 2 1 − cos z 2 z − 4 z + ··· z 1 − 2 z + ··· z which has a pole at z = 0 but no 1/z term, so I 1 dz = 0. |z|=1 1 − cos z On the other hand, I z I 2 dz = + ··· dz = 4πi, |z|=1 1 − cos z |z|=1 z 14 COMPLEX VARIABLES

6.1. Multiple singularities. Now suppose Γ is a closed contour and f is analytic inside Γ except at a set of isolated poles z1, z2, ··· zn, e.g. 1 f(z) = . (z − 1)(z − 2i)(z + 2)

The contour can be deformed around the singularities into small arcs Ck around each pole ± and bridges Lk made of straight lines between successive poles. The idea is sketched below.

+ − Because the full contour is closed, each straight part Lk has a ‘return trip’ k ≈ −Lk. Since f is analytic in this region, the contributions cancel due to the rule that Z Z f dz = − f dz. Γ −Γ Only the circular parts remain, leaving (after taking the width of the bridges to zero)

n Z X Z f dz = f dz Γ k=1 Ck

where Ck is a small circular path containing zk. Applying the theorem for one pole, we get:

Residue theorem: Let Γ be a closed contour and suppose f is analytic inside Γ except at an isolated set of poles z1, ··· , zn. Then n I X f(z) dz = 2πi Res(f, zk). Γ k=1

The residue theorem is powerful because it asserts that if f is mostly analytic (only sin- gular at isolated points), then closed contour integrals only care about the residues at the poles and nothing else. Two examples: COMPLEX VARIABLES 15

Example 1: Let ΓR is a circle of radius R (counter-clockwise) around the origin. Then  0 R < 1 I 1 3  + dz = 2πi 1 < R < 2 z − 1 z + 2i ΓR 2πi + 6πi 2 < R since the poles are at z = 1 and z = 3 with residues 1 and 3, respectively.

Example 2: Let I e2z I = dz. |z|=1 sin(3z)

There are singularities at z0 = 0 and z = ±π/3 (plus more). Only z0 = 0 is instead the contour, so we have I = 2πiRes(f, 0). To find the residue, we proceed directly (see later for a shortcut), expanding the numera- tor/denominatory in a Laurent series: e2z 1 + 2z + ··· 1 1 + 2z + ··· 1 = = = + Taylor series sin 3z 3z + ··· 3z 1 + ··· 3z so the residue is 1/3 and thus I e2z 2πi I = dz = . |z|=1 sin(3z) 3 On the other hand, I e2z I = dz = 2πi (Res(f, −π/3) + Res(f, 0) + Res(f, π/3)) |z|=2 sin(3z) which would require more work (we really do want the shortcut here; see next page). 16 COMPLEX VARIABLES

6.2. Simple poles (shortcut): Let f(z) = p(z)/q(z) (a common form). Suppose p(z) and q(z) have no singularities inside a closed contour Γ and

q(z) has a simple zero at z = z0.

Then f has a pole of order 1 (from 1/q(z)) at z0. Because z0 is a simple zero we can write

q(z) = (z − z0)r(z), r(z0) 6= 0 since otherwise the root would be a double root or higher. It follows that I I p(z)/r(z) p(z ) I = f(z) dz = dz = 2πi 0 Γ Γ z − z0 r(z0)

since p(z)/r(z) has a Taylor series in z−z0 (no singularities) and the first term is p(z0)/r(z0).

Obtaining r(z) might be a nuisance, but we can shortcut this by observing that 0 0 q (z) = (z − z0)r(z) + r(z) =⇒ q (z0) = r(z0).

Shortcut (simple pole): If q has a simple zero at z0 (and no others) in Γ and p, q have no singularities in Γ then I p(z) p(z0) dz = 2πi 0 Γ q(z) q (z0) 0 i.e. the residue of f = p/q at z0 is Res(f, z0) = p(z0)/q (z0).

Returning to the earlier example of computing I e2z dz |z|=2 sin 3z we have e2z f(z) = =⇒ p = e2z, q = sin 3z =⇒ Res(f, 0) = p(0)/q0(0) = 1/3. sin 3z Similarly, at the two other poles in the contour, e±2π/3 1 Res(f, ±π/3) = p(±π/3)/q0(±π/3) = = − e±2π/3. 3 cos(±π) 3 It follows that for the circle of radius 2, I e2z 1 1 1 2πi dz = 2πi( e−2π/3 + + e2π/3) = (e−2π/3 + 1 + e2π/3). |z|=2 sin 3z 3 3 3 3 6.3. Another approach: We can also use Cauchy’s integral formula, I f(z) 2πif(z0) = dz Γ z − z0 to calculate residues (this formula holds if f is analytic inside Γ). For instance, I sin 2z dz = 2πi sin(2). |z|=2 z − 1 COMPLEX VARIABLES 17

This is most useful if the integrand is of the form analytic/(z − z0). More generally, (n) I 2πif (z0) f(z) = n+1 dz n! Γ (z − z0) which is useful for higher-order poles in this form, e.g. I sin 2z 2πi 3 8πi 4 dz = − · 2 sin 2 = − sin 2. |z|=2 (z − 1) 6 3 k If the (z − z0) factor is not already there, then we must do some work to use Cauchy’s integral formula since the f(z) (numerator) must be analytic (see below).

General rule: Suppose f(z) = p(z)/q(z), that p(z) is analytic and q has a zero of or- der m at z0. Then m q(z) = (z − z0) r(z), r(z0) 6= 0.

Letting s(z) = p(z)/r(z) (which is analytic near z0, we have s(z) f(z) = m . (z − z0)

Now let Γ be a closed contour around z0, enclosing only the singularity art z0. From the residue theorem and Cauchy’s integral formula, I I (m−1) s(z) s (z0) 2πiRes(f, z0) = f(z) dz = m dz = 2πi . Γ (z − z0) (m − 1)!

This gives the contour integral around z0 and also a formula for the residue:  m−1  1 d m Res(f, z0) = lim m−1 ((z − z0) f(z)) (m − 1)! z→z0 dz m after plugging in f = p/q = s/(z − z0) . The limit is there because one may need to apply L’Hˆopital’srule to evaluate the expression (can be 0/0 at z0).