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 ab (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 st 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)=tb+c we get γ2ϕ:[b,d+bc]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+bc]D.

Suppose γ is a path in D2 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+1xi)+Q(xi,yi)(yi+1yi).

As n such that the distances between each point tend to zero (for example if ti=a+in(ba) and γ is continuous), if this has a limit we call it the integral of Pdx+Qdy along γ, denoted

γP𝑑x+Qdy.

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+1xi=x(Ti)(ti+1ti) and similarly for y(t), so we can rewrite the sum above as

iP(x(ti),y(ti))x(Ti)(ti+1ti)+Q(x(ti),y(ti))y(Ti)(ti+1ti),

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)=xy, Q(x,y)=0, and γ the quarter circle in the first quadrant, γ(t)=(cost,sint), from t=0 to t=π2. Then we have

γxy𝑑x=0π/2cos(t)sin(t)(sin(t))𝑑t=0π/2cos(t)sin(t)d2t=01u2𝑑u=13

where u=sint. Indeed, as t increases, x decreases, so it makes sense that dx is negative while xy 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 DD, then

DP𝑑x+Qdy=D(QxPy)𝑑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,1t), 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)=xy and Q(x,y)=0, note that P and Q both vanish on 1 and 2, so

DP𝑑x+Qdy=γxy𝑑x.

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

D(QxPy)𝑑x𝑑y =Dx𝑑x𝑑y
=01r0π/2rcosθdθdr
=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

dh=hxdx+hydy.

We say Pdx+Qdy is exact if it is equal to dh for some function h. In this case, a similar result holds:

γ𝑑H =γhx𝑑x+hydy
=ab(hxx(t)+hyy(t))𝑑t
=abddth(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 xydx already gives an example. To see this, it’s useful to give a criterion we can check. Suppose Pdx+Qdy is exact, and so equal to some dh, so P=hx and Q=hy. Then

Py=yhx=xhy=Qx.

More generally, we say that Pdx+Qdy is closed if Py=Qx; so the above shows that every exact differential is closed. But xydx is not closed: P(x,y)=xy while Q(x,y)=0, so Py=x while Qx=0, so xydy therefore cannot be exact.

Note that the differential being closed is the same as the integrand PyQx 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+iy, write dz=dx+idy. If f=u+iv is a complex function, then fdz=(u+iv)dx+(v+iu)dy, i.e. P=u+iv and Q=v+iu, then fdz is closed if

Py=y(u+iv)=Qx=x(v+iu),

or taking real and imaginary parts

uy=vx,vy=ux.

These are precisely the Cauchy–Riemann equations for f. In other words, fdz is closed if and only if f is analytic. As a consequence, if f is not analytic then fdz 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 Pdx+Qdy is a closed differential on D, where P and Q are continuously differentiable functions, then Pdx+Qdy 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 BD set

f(B)=γP𝑑x+Qdy

where γ is the straight line segment from A to B, say γ(t)=(1t)A+tB. We claim that dh=Pdx+Qdy.

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

ABP𝑑x+Qdy+BCP𝑑x+Qdy+CAP𝑑x+Qdy=0,

i.e.

h(C)h(B) =h(x0+ϵ,y)h(x0,y0)
=ACP𝑑x+QdyABP𝑑x+Qdy
=BCP𝑑x+Qdy
=x0x0+ϵP(t,y0)𝑑t.

Differentiating, we get

hx(x0,y0)=P(x0,y0).

The same argument gives

hy(x0,y0)=Q(x0,y0),

so dh=Pdx+Qdy, i.e. Pdx+Qdy is exact.

Finally, we want to consider the case where Pdx+Qdy 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 0s1 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+Qdy=γ1P𝑑x+Qdy.

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.