Lecture 8: line integrals

Complex analysis, lecture 2
(February 20, 2026)

Our goal today is to briefly review line integrals from multivariable calculus and some properties we can derive using them, in anticipation of building up the complex analogues next week. In theory, everything this week is real, but we will sometimes sneak in complex numbers, or hint what the analogues will look like.

A path, or curve, in a domain D is a map γ:[a,b]→D, for fixed real numbers a≤b (previously always 0 and 1). We call this a path from γ⁢(a) to γ⁢(b). We often want to assume that our path is smooth, i.e. infinitely differentiable; very often it will suffice to assume it is continuously differentiable. We’ll often refer to the image of γ as the same thing as γ.

We say a path is simple if it never intersects itself, or more formally if γ is injective, and as closed if γ⁢(a)=γ⁢(b); we say it is a simple closed path if γ⁢(a)=γ⁢(b) but γ⁢(s)≠γ⁢(t) for any s≠t other than s=a, t=b (or vice versa). So a simple closed path can be thought of as a loop in D.

If ϕ:[c,d]→[a,b] is a strictly increasing continuous function, then γ∘ϕ:[c,d]→D is again a path in D, with the same image. We call this a reparametrization of γ, and think of it as essentially equivalent, or a different way of tracing out the same path. Up to potentially reparametrizing, we can concatenate one path with another: if γ1:[a,b]→D and γ2:[c,d]→D with γ1⁢(b)=γ2⁢(c), choosing ϕ⁢(t)=t−b+c we get γ2∘ϕ:[b,d+b−c]→D with starting point the same as the ending point of γ1, so we can combine them to get a “piecewise smooth” path γ:[a,d+b−c]→D.

Suppose γ is a path in D⊂ℝ2 from A to B, and P,Q:ℝ2→ℂ are complex-valued functions on D. For points A=(x0,y0), (x1,y1), …, (xn,yn)=B on γ, say (xi,yi)=γ⁢(ti) with a=t0<t1<⋯<tn=b, we can consider the Riemann sum

∑iP⁢(xi,yi)⁢(xi+1−xi)+Q⁢(xi,yi)⁢(yi+1−yi).

As n→∞ such that the distances between each point tend to zero (for example if ti=a+in⁢(b−a) and γ is continuous), if this has a limit we call it the integral of P⁢d⁢x+Q⁢d⁢y along γ, denoted

∫γP⁢𝑑x+Q⁢d⁢y.

If we write γ⁢(t)=(x⁢(t),y⁢(t)) and assume it is continuously differentiable, with x⁢(ti)=xi, y⁢(ti)=yi, by the mean value theorem we can find some Ti such that xi+1−xi=x′⁢(Ti)⁢(ti+1−ti) and similarly for y⁢(t), so we can rewrite the sum above as

∑iP⁢(x⁢(ti),y⁢(ti))⁢x′⁢(Ti)⁢(ti+1−ti)+Q⁢(x⁢(ti),y⁢(ti))⁢y′⁢(Ti)⁢(ti+1−ti),

so the integral can be rewritten as

∫abP⁢(x⁢(t),y⁢(t))⁢x′⁢(t)⁢𝑑t+∫abQ⁢(x⁢(t),y⁢(t))⁢y′⁢(t)⁢𝑑t.

This is now something that can be explicitly evaluated using ordinary one-variable calculus.

For the first formula above, we only use the points (xi,yi) on the image of the curve γ, so in particular it is independent of the parametrization, even though the one-variable formulation above appears to depend on this choice. If we reverse the orientation, i.e. go from b to a (or B to A) instead of the other way around, we should multiply everything by −1.

Consider for example P⁢(x,y)=x⁢y, Q⁢(x,y)=0, and γ the quarter circle in the first quadrant, γ⁢(t)=(cos⁡t,sin⁡t), from t=0 to t=π2. Then we have

∫γx⁢y⁢𝑑x=∫0π/2cos⁡(t)⁢sin⁡(t)⋅(−sin⁡(t))⁢𝑑t=−∫0π/2cos⁡(t)⁢sin⁡(t)⁢d2⁢t=−∫01u2⁢𝑑u=−13

where u=sin⁡t. Indeed, as t increases, x decreases, so it makes sense that d⁢x is negative while x⁢y is positive so the integral is negative.

Another useful tool for evaluating path integrals is Green’s theorem. If D is a domain with boundary ∂D consisting of a smooth simple closed curve, or possible a disjoint union of piecewise smooth closed curves, and P, Q are continuously differentiable functions on D∪∂D, then

∫∂DP⁢𝑑x+Q⁢d⁢y=∬D(∂Q∂x−∂P∂y)⁢𝑑x⁢𝑑y.

This is useful even for non-closed curves. For example, for γ the quarter-circle as above, write ℓ1 for the straight line segment connecting (0,0) and (1,0), i.e. ℓ1⁢(t)=(t,0) from t=0 to t=1, and ℓ2 for the line segment connecting (0,1) and (0,0), i.e. ℓ2⁢(t)=(0,1−t), again from 0 to 1. Then concatenating γ, ℓ1, and ℓ2 gives a simple closed curve, the boundary of the quarter-disk D. Now, for P⁢(x,y)=x⁢y and Q⁢(x,y)=0, note that P and Q both vanish on ℓ1 and ℓ2, so

∫∂DP⁢𝑑x+Q⁢d⁢y=∫γx⁢y⁢𝑑x.

By Green’s theorem, this is the same thing as

∬D(∂Q∂x−∂P∂y)⁢𝑑x⁢𝑑y =−∬Dx⁢𝑑x⁢𝑑y
=−∫01r⁢∫0π/2r⁢cos⁡θ⁢d⁢θ⁢d⁢r
=−∫0π/2cos⁡θ⁢d⁢θ⁢∫01r2⁢𝑑r
=−13,

agreeing with the computation above.

An important question is when a path integral is independent of the path chosen, so long as the endpoints are the same. It’s not immediately obvious that this would ever be true, but is strongly suggested by the analogy with the fundamental theorem of calculus: recall that if f⁢(x) is the derivative of some function F⁢(x) on [a,b], then

∫abf⁢(x)⁢𝑑x=F⁢(b)−F⁢(a).

What about the multivariable situation?

If h⁢(x,y) is continuously differentiable, write

d⁢h=∂h∂x⁢d⁢x+∂h∂y⁢d⁢y.

We say P⁢d⁢x+Q⁢d⁢y is exact if it is equal to d⁢h for some function h. In this case, a similar result holds:

∫γ𝑑H =∫γ∂h∂x⁢𝑑x+∂h∂y⁢d⁢y
=∫ab(∂h∂x⁢x′⁢(t)+∂h∂y⁢y′⁢(t))⁢𝑑t
=∫abdd⁢t⁢h⁢(x⁢(t),y⁢(t))⁢𝑑t
=h⁢(B)−h⁢(A).

Thus the path integral of an exact differential is independent of the path. In fact the converse is true as well, though we won’t prove this.

However, not every differential is exact. I claim that our example of x⁢y⁢d⁢x already gives an example. To see this, it’s useful to give a criterion we can check. Suppose P⁢d⁢x+Q⁢d⁢y is exact, and so equal to some d⁢h, so P=∂h∂x and Q=∂h∂y. Then

∂P∂y=∂∂y⁢∂h∂x=∂∂x⁢∂h∂y=∂Q∂x.

More generally, we say that P⁢d⁢x+Q⁢d⁢y is closed if ∂P∂y=∂Q∂x; so the above shows that every exact differential is closed. But x⁢y⁢d⁢x is not closed: P⁢(x,y)=x⁢y while Q⁢(x,y)=0, so ∂P∂y=x while ∂Q∂x=0, so x⁢y⁢d⁢y therefore cannot be exact.

Note that the differential being closed is the same as the integrand ∂P∂y−∂Q∂x in Green’s theorem being zero, so it follows that the integral of a closed differential along the boundary of some domain D satisfying the conditions of the theorem is zero.

Aside.

Next week, we’ll see that this forms the basis of much of our theory of complex integrals, in the following way. For z=x+i⁢y, write d⁢z=d⁢x+i⁢d⁢y. If f=u+i⁢v is a complex function, then f⁢d⁢z=(u+i⁢v)⁢d⁢x+(−v+i⁢u)⁢d⁢y, i.e. P=u+i⁢v and Q=−v+i⁢u, then f⁢d⁢z is closed if

∂P∂y=∂∂y⁢(u+i⁢v)=∂Q∂x=∂∂x⁢(−v+i⁢u),

or taking real and imaginary parts

∂u∂y=−∂v∂x,∂v∂y=∂u∂x.

These are precisely the Cauchy–Riemann equations for f. In other words, f⁢d⁢z is closed if and only if f is analytic. As a consequence, if f is not analytic then f⁢d⁢z is not closed and therefore not exact.

For certain domains, though, it is true that every closed differential is actually exact. This is actually a characterizing property of simply connected domains (in ℂ, though not abstractly); let’s restrict ourselves to star-shaped domains. We can state the result as follows: if D is a star-shaped domain and P⁢d⁢x+Q⁢d⁢y is a closed differential on D, where P and Q are continuously differentiable functions, then P⁢d⁢x+Q⁢d⁢y is exact on D.

To prove this, we need to construct h. Suppose D is star-shaped with respect to a point A, and for B∈D set

f⁢(B)=∫γP⁢𝑑x+Q⁢d⁢y

where γ is the straight line segment from A to B, say γ⁢(t)=(1−t)⁢A+t⁢B. We claim that d⁢h=P⁢d⁢x+Q⁢d⁢y.

If B=(x0,y0), consider C=(x0+ϵ,y0) for ϵ small enough that the triangle with vertices A,B,C is contained in D. Since P⁢d⁢x+Q⁢d⁢y is closed, the integral along the boundary of the triangle is zero, so

∫ABP⁢𝑑x+Q⁢d⁢y+∫BCP⁢𝑑x+Q⁢d⁢y+∫CAP⁢𝑑x+Q⁢d⁢y=0,

i.e.

h⁢(C)−h⁢(B) =h⁢(x0+ϵ,y)−h⁢(x0,y0)
=∫ACP⁢𝑑x+Q⁢d⁢y−∫ABP⁢𝑑x+Q⁢d⁢y
=∫BCP⁢𝑑x+Q⁢d⁢y
=∫x0x0+ϵP⁢(t,y0)⁢𝑑t.

Differentiating, we get

∂h∂x⁢(x0,y0)=P⁢(x0,y0).

The same argument gives

∂h∂y⁢(x0,y0)=Q⁢(x0,y0),

so d⁢h=P⁢d⁢x+Q⁢d⁢y, i.e. P⁢d⁢x+Q⁢d⁢y is exact.

Finally, we want to consider the case where P⁢d⁢x+Q⁢d⁢y is closed, but not necessarily exact, on a domain D, so it is not in general independent of the path. However, if we have two paths γ0, γ1 which are “very close” to each other in a certain sense and have the same endpoints, then the integrals along these paths do agree. More precisely, suppose that for 0≤s≤1 we have paths γs in D such that at s=0 we recover γ0 and at s=1 we recover γ1, and γ:[0,1]×[a,b]→D, sending (s,t) to γs⁢(t), is a continuous map. Then

∫γ0P⁢𝑑x+Q⁢d⁢y=∫γ1P⁢𝑑x+Q⁢d⁢y.

We won’t prove this; the proof is mostly straightforward but tedious, and amounts to checking that shifting the path by individual small squares doesn’t change the result, and that the overall change from γ0 to γ1 can be written as a composite of such changes.

A similar argument works for closed paths, in which case we can also allow the starting point to vary. In particular, if a path can be deformed down to the “trivial loop” γ⁢(t)=A, independent of t, then the integral over it must be zero.