Lecture 6: harmonic functions

Complex analysis, lecture 2
(February 6, 2026)

1.  Harmonic functions

We begin with an important problem from analysis, apparently unrelated to complex numbers: the differential equation

2ux12++2uxn2=0

for a function u(x1,,xn). This is Laplace’s equation; the operator 2x12++2xn2 is called the Laplacian Δ, so we could more simply rewrite the equation as

Δu=0.

Solutions u to this differential equation are called harmonic functions. They have many applications both within pure mathematics and to numerous other fields.

We will be interested in the case n=2, so

2ux2+2uy2=0.

We claim that these harmonic functions of two variables have a close relation to analytic functions, via the Cauchy–Riemann equations:

Proposition.

If f=u+iv is an analytic function on a domain D, then viewing D2 as a subset of the plane, u and v are harmonic functions on D.

This is a corollary of the Cauchy–Riemann equations: we have

ux=vy,uy=vx,

so

2ux2=xux=xvy=yvx=yuy=2uy2

and therefore

2ux2+2uy2=0,

i.e. u is harmonic. A similar argument works for v.

Given a harmonic function u on a domain D, it is then natural to ask if it “comes from” an analytic function f on D, i.e. whether there exists another harmonic function v on D such that u+iv is an analytic function, and if so whether such an f is unique. (You could also swap the places of u and v, but this amounts to multiplying by i and so is equivalent.) Such a function v is called a harmonic conjugate of u, so this is equivalent to asking whether u has a harmonic conjugate on D.

It turns out that it’s not too hard to show uniqueness, up to an additive constant: that is, if v1 and v2 are both harmonic conjugates of u, then v1v2 is constant. Indeed, f1=u+iv1 and f2=u+iv2 are, by assumption, both analytic functions, so so is (f1f2)/i=((u+iv1)(u+iv2))/i=v1v2. However, since v1 and v2 are real-valued, so is v1v2, and we saw last time that a real-valued analytic function must be constant.

The existence of a harmonic conjugate is more subtle. Let’s try an example: let u(x,y)=xy. First, we claim that this is a harmonic function. Indeed, both second partial derivatives vanish, so Δu=0 everywhere. How can we find a harmonic conjugate for u?

Well, we should solve the Cauchy–Riemann equations:

vx=uy=x,vy=ux=y.

The first equation tells us that v(x,y)=x22+f(y) and the second that v(x,y)=y22+g(x), so equating these and setting x=0 gives f(y)=y22+g(0) while setting y=0 gives g(x)=x22+f(0). Letting C=f(0), we have g(0)=C, so

v(x,y)=x22+y22+C

for some constant C. This gives the analytic function

f(z)=f(x+iy)=u(x,y)+iv(x,y)=xy+12(x2+y2)i+Ci=i2(x+iy)2+Ci=i2z2+Ci,

which is visibly analytic in z; this is in fact already guaranteed by our construction of v, but it’s good to check. So v(x,y)=12(x2+y2)+C is a harmonic conjugate of u for any constant C; and by the uniqueness above, these are the only harmonic conjugates of u.

This reasoning might lead you to believe that we can always find a harmonic conjugate. However, this is not true: it was implicitly important in the above that we were working on the entire complex plane . If we had a different domain, such as D={0}2{(0,0)}, this can fail. Consider for example u(x,y)=log(x2+y2), defined on this domain D. We have

2ux2+2uy2=2y2x2(x2+y2)2+2x2y2(x2+y2)2=0,

so u is harmonic on D. If v is a harmonic conjugate of u, applying the same method we have

vx=uy=2yx2+y2,vy=ux=2xx2+y2.

We could integrate as before, and we would find v(x,y)=2tan1(y/x)=2arg(x+iy). But we know very well that there is no way to choose a function arg(z) which is continuous everywhere in D={0}: we had to choose a branch cut. For v to be harmonic, it must be continuous, so there is no harmonic conjugate to u on D.

Nevertheless, under certain conditions on D we can show that the above method will always work: for example if D is the entire complex plane, an open disk, or a rectangle, or more generally a star-shaped domain. More precisely, the argument can only fail if it is possible to draw a path in D which contains inside of it a point which is not in D (in the example above, this would have been the origin). If D does not have any “holes,” this is impossible (the precise version is: if D is simply connected) and so the argument works.

We’ll come back to the maximally general version later. For the moment, let’s assume we have a star-shaped domain D, with respect to some point (x0,y0). For any point (x,y) in D, we can choose a path connecting (x0,y0) and (x,y), and integrate along it it. The equation

vx=uy

gives

v(x,y)=(x0,y0)(x,y)uy(t,s)dt+ux(t,s)ds+C

for some constant C; in particular a harmonic conjugate exists. For the case u(x,y)=xy as above, this gives

v(x,y)=(x0,y0)(x,y)tdt+sds+C=x22+y22+x022y022+C,

recovering the same harmonic conjugate as above after absorbing the extra additive constants into C.

2.  The mean value property

Suppose f:D is a continuous function on a domain D2. If P=(x0,y0)D and γ is the circle around P of radius r, i.e. γ={QD:|QP|=r} for any r small enough that γ is contained in D, we can consider the “average value” of f on the circle:

A(r)=12π02πf(x0+rcost,y0+rsint)𝑑t.

(If we viewed D as a subset of and P=z0=x0+iy0, we could write this as f(z0+reit).) This is a continuous function of r so long as r is not too high; D must contain some disk around P of radius R, so this is well-defined for r<R. As r0, each point on which we’re estimating f approaches P and so A(r)f(P). In general though for r>0 the average value A(r) may differ from f(P), e.g. if P is a local maximum.

If f is harmonic, however, we claim that the average value at any radius r<R is equal to f(P) on the nose. That is: if f is harmonic on D, then

f(x0,y0)=12π02πf(x0+rcosθ,y0+rsinθ)𝑑θ.

This is quite a special property: it means we can detect the value on the center of the loop only by evaluating the function on the perimeter!

The proof of this fact is not too hard, but it does use some multivariable integral calculus, and we are still mostly in the “differential” portion of this class, so we’ll defer the proof until next unit.

More generally, we’ll say that f has the mean value property at (x0,y0) if A(r)=f(x0,y0) for any r<R, and that f has the mean value property on D if it has the mean value property everywhere in D. So we can restate the above as the fact that harmonic functions have the mean value property. We will, hopefully, soon see that this is a characterizing property: any function f satisfying the mean value property is harmonic. Note that a priori, f is only continuous, while harmonic functions have to be twice differentiable, so this is actually quite surprising!

3.  The maximum principle

Recall the fact that a continuous function f on a compact set S is bounded and attains its maximum. A domain D, however, is (at least in general) not compact, since it is open, while compact sets are closed. (One can have sets which are both open and closed, but not interesting ones in our setting.) If u is a function on D which is further harmonic, we claim that almost the opposite is true: u will never attain its maximum, unless it is constant. More precisely:

Proposition.

If u:D is a harmonic function and for some M we have u(z)M for all zD, then if u(z0)=M for z0M, then u is constant.

This is sometimes called the strict maximum principle (for real-valued harmonic functions).

The proof uses some topology, which I’ll just briefly summarize: since D is a domain, i.e. an open and (path-)connected subset of the plane, it can’t be partitioned into two nonempty open sets (indeed, this is the definition of being connected). So we’ll write down two disjoint open sets inside D whose union is D, and then conclude that one of them has to be empty.

First, let UD be the set of points zD such that u(z)<M. This is an open condition, so it’s an open set. Its complement VD is the set of points zD such that u(z)M; since we know that u(z)M, this is equivalently the set of points with u(z)=M. We’d like to show that this is open. If we knew this, then the above argument would tell us that either V is empty, so U=D and u doesn’t attain its maximum on D; or W is empty, so u(z)=M for every zD, i.e. u is constant.

To show that V is open, we need to show that for every z0V, we can find an open disk of some radius R>0 centered at z0 which is contained in V. For z0V, we have u(z0)=M. Since u is harmonic, it satisfies the mean value property, so there is some R>0 such that for any r<R,

12π02π(u(z0)u(z0+(rcost,rsint)))𝑑t.

Since u(z)M for all zD, the integrand u(z0)u(z0+(rcost,rsint)) is nonnegative for all t; so the only way the integral can be 0 is if in fact u(z0)u(z0+(rcost,rsint))=0 for all t. Hence for every z contained in the open disk of radius R centered at z0, we can write it as z0+(rcost,rsint) for some r<R and 0t2π, hence u(z)=u(z0)=M, i.e. zV; so V contains this disk, and therefore is an open set, so we’re done.

A consequence is the strict maximum principle for complex harmonic functions:

Proposition.

If h is a bounded harmonic complex-valued function on D such that |h(z)|M for all zD and |h(z0)|=M for some z0D, then h is constant on D.

This is not quite immediate, since |h(z)| isn’t necessarily harmonic. However, the real and imaginary parts of h are harmonic. Multiplying h by eiθ for some θ, we can safely assume that h(z0)=M is real; so if h=u+iv, then u(z0)=M, v(z0)=0, so u attains its maximum and is therefore constant. Therefore h=M+iv satisfies |h(z)|=M2+v(z)2M implies |v(z)|20, i.e. v(z)=0 for all zD, so h is constant.

Finally, we can extend to the boundary to get the maximum principle:

Proposition.

If h is a complex-valued harmonic function on a bounded domain D such that h extends continuously to D and |h(z)|M for all zD, then |h(z)|M for all zD.

That is: a harmonic function can never be higher on the interior of such a domain then on its boundary.

To see this, observe that DD is a closed and bounded set, hence compact, so f attains its maximum somewhere on this set. If it attained it on D, by the above principles it would be constant, hence also constant on D with the same value, so the principle trivially holds. Otherwise, it attains its maximum on D, so the principle again holds.