Skip to content

Harmonic Functions

In this lesson you’ll learn what harmonic means, how every harmonic function is the real part of an analytic one, how to construct harmonic conjugates, and how the Dirichlet problem is solved on a disc and transported everywhere else.

A real function u(x,y)u(x,y) with continuous second partials is harmonic on a domain if it satisfies Laplace’s equation

2u=uxx+uyy=0\nabla^2u = u_{xx}+u_{yy} = 0

Laplace’s equation is arguably the most important PDE in physics. It governs steady-state temperature, electrostatic and gravitational potential in empty space, incompressible irrotational fluid flow, and the equilibrium shape of a stretched membrane. All of those are the same equation, so all of them are the same mathematics.

Two facts, and they run in both directions.

If f=u+ivf = u+iv is analytic, then uu and vv are both harmonic.

This came out of the Cauchy–Riemann equations in lesson 5: differentiate ux=vyu_x=v_y with respect to xx, differentiate uy=vxu_y=-v_x with respect to yy, and add.

Conversely, if uu is harmonic on a simply connected domain, there is a harmonic vv, unique up to a constant, with u+ivu+iv analytic. That vv is the harmonic conjugate of uu.

Together these say that harmonic functions and analytic functions are two views of the same objects. Real two-dimensional potential theory is complex analysis in different clothing, which is why every result in this section has a physical reading.

The simple connectivity matters. On an annulus, u=lnzu = \ln|z| is harmonic but its conjugate would have to be argz\arg z, which cannot be made single-valued there. That is the same obstruction as the branch cut for the logarithm.

Because they are real parts of analytic functions, harmonic functions inherit the strong behaviour of the section.

Mean value property. The value at a point is the average over any circle about it inside the domain:

u(z0)=12π02πu(z0+reiθ)dθu(z_0) = \frac{1}{2\pi}\int_0^{2\pi}u\big(z_0+re^{i\theta}\big)\,d\theta

The figure tests this. For u=x2y2u = x^2-y^2, the real part of z2z^2, every circular average equals the centre value exactly. For u=x2+y2=z2u = x^2+y^2 = |z|^2, which has 2u=40\nabla^2u = 4 \ne 0, the averages exceed the centre value and grow with the radius - in fact by exactly r2r^2, which is the Laplacian times r2/4r^2/4.

Maximum principle. A harmonic function on a bounded domain attains its maximum and minimum on the boundary, and if an interior maximum is attained the function is constant. This is immediate from the mean value property: a strict interior maximum could not equal the average of its neighbours.

Uniqueness. Two harmonic functions with the same boundary values are identical, since their difference is harmonic with zero boundary values, hence zero by the maximum principle. This is what makes physics well posed: specify the temperature on the boundary and the interior temperature is determined.

Smoothness. Harmonic functions are automatically infinitely differentiable, and even real-analytic, inherited from the corresponding property of analytic functions.

Liouville. A harmonic function bounded on all of R2\mathbb{R}^2 is constant.

Dirichlet problem. Given a domain DD and a continuous function on its boundary, find the harmonic function on DD matching those boundary values.

On the unit disc there is an explicit answer, the Poisson integral formula:

u(reiθ)=12π02π1r212rcos(θφ)+r2u(eiφ)dφu(re^{i\theta}) = \frac{1}{2\pi}\int_0^{2\pi}\frac{1-r^2}{1-2r\cos(\theta-\varphi)+r^2}\,u(e^{i\varphi})\,d\varphi

The kernel is a weighted average that concentrates near the nearest boundary point as r1r\to1. Setting r=0r=0 recovers the mean value property, so the formula is its refinement to off-centre points.

For any other simply connected region the strategy is the one from the conformal mapping lesson:

  1. Map the region conformally to the disc.
  2. Carry the boundary data along.
  3. Apply the Poisson formula.
  4. Pull back.

Because harmonicity survives conformal maps, this solves the problem on every region you can map - and by the Riemann mapping theorem, that is every simply connected region.

For f=u+ivf=u+iv analytic, the level curves of uu and vv are orthogonal, which we saw in lesson 6. Physically:

uuvvSetting
equipotentialsfield lineselectrostatics
isothermsheat flow linesconduction
velocity potentialstreamlinesfluid flow

The pair f=u+ivf = u+iv is called the complex potential, and f(z)=ux+ivxf'(z) = u_x + iv_x gives the field directly: in fluid dynamics f(z)\overline{f'(z)} is the velocity vector. One analytic function encodes an entire two-dimensional field, which is the compression that makes the method powerful.

Example 1: Verify u=x2y2u = x^2-y^2 is harmonic and find its conjugate.

Solution. uxx=2u_{xx}=2 and uyy=2u_{yy}=-2, so uxx+uyy=0u_{xx}+u_{yy}=0

For the conjugate, use vy=ux=2xv_y = u_x = 2x, so v=2xy+g(x)v = 2xy+g(x). Then vx=2y+g(x)v_x = 2y+g'(x), and this must equal uy=2y-u_y = 2y, forcing g=0g'=0.

v=2xy+C,f=z2+iCv = 2xy+C, \qquad f = z^2 + iC

Example 2: Show u=x2+y2u = x^2+y^2 is not harmonic.

Solution. uxx+uyy=2+2=40u_{xx}+u_{yy} = 2+2 = 4 \ne 0.

not harmonic\text{not harmonic}

Consequently it has no harmonic conjugate, and indeed z2=zzˉ|z|^2 = z\bar z involves zˉ\bar z and is not analytic. The figure shows the failure quantitatively: circular averages exceed the centre value. ∎

Example 3: Verify u=lnzu = \ln|z| is harmonic away from 0.

Solution. With r=x2+y2r = \sqrt{x^2+y^2}, u=12ln(x2+y2)u = \frac12\ln(x^2+y^2). Then

ux=xx2+y2,uxx=y2x2(x2+y2)2u_x = \frac{x}{x^2+y^2}, \qquad u_{xx} = \frac{y^2-x^2}{(x^2+y^2)^2}

and by symmetry uyy=x2y2(x2+y2)2u_{yy} = \frac{x^2-y^2}{(x^2+y^2)^2}. They cancel, so 2u=0\nabla^2u=0 on C{0}\mathbb{C}\setminus\{0\}. ∎

Its conjugate is argz\arg z, and Logz=lnz+iargz\operatorname{Log}z = \ln|z|+i\arg z. On any annulus around 0 the conjugate cannot be single-valued, which shows the simple connectivity hypothesis is not removable. Physically this uu is the potential of a point charge, whose field lines wind around the charge and never close.

Example 4: Find the harmonic conjugate of u=excosyu = e^x\cos y.

Solution. Check first: uxx=excosyu_{xx} = e^x\cos y and uyy=excosyu_{yy} = -e^x\cos y, which sum to 0 ✓

From vy=ux=excosyv_y = u_x = e^x\cos y, integrate in yy:

v=exsiny+g(x)v = e^x\sin y + g(x)

Then vx=exsiny+g(x)v_x = e^x\sin y+g'(x) must equal uy=exsiny-u_y = e^x\sin y, so g=0g'=0.

v=exsiny+C,f=ez+iCv = e^x\sin y+C, \qquad f = e^z+iC

Example 5: Use the maximum principle.

uu is harmonic on z1|z|\le1 with u=3u = 3 on the boundary circle. What is uu inside?

Solution. The constant function 3 is harmonic and matches the boundary data. By uniqueness there is only one such function, so

u3u \equiv 3

Example 6: Solve a Dirichlet problem on the disc.

uu is harmonic on z<1|z|<1 with boundary values u(eiθ)=cosθu(e^{i\theta}) = \cos\theta. Find uu.

Solution. Guess a low-order candidate: Re(z)=x=rcosθ\operatorname{Re}(z) = x = r\cos\theta is harmonic and equals cosθ\cos\theta when r=1r=1.

u=x=rcosθu = x = r\cos\theta

By uniqueness this is the answer, with no integration needed. ✓

At the centre, u(0)=0u(0)=0, which is the average of cosθ\cos\theta over the circle. Consistent with the mean value property, and a good check to run on any such solution.

Example 7: Use the complex potential.

The complex potential of uniform flow past a cylinder of radius aa is f(z)=U(z+a2z)f(z) = U\left(z+\frac{a^2}{z}\right). Find the streamlines and the velocity.

Solution. With z=reiθz = re^{i\theta},

f=U(reiθ+a2reiθ)f = U\left(re^{i\theta}+\frac{a^2}{r}e^{-i\theta}\right)

so the stream function is

ψ=Imf=U(ra2r)sinθ\psi = \operatorname{Im}f = U\left(r-\frac{a^2}{r}\right)\sin\theta

On r=ar=a this is identically 0, so the circle is a streamline - the flow does not cross the cylinder, which is exactly the physical boundary condition.

The velocity comes from the derivative:

f(z)=U(1a2z2)f'(z) = U\left(1-\frac{a^2}{z^2}\right)

which vanishes at z=±az=\pm a, the two stagnation points at the front and back of the cylinder, and tends to UU far away as it should. ∎

One analytic function delivered the entire flow field, boundary condition included.

Steady heat conduction. Temperature in a body with fixed boundary temperatures and no internal sources is harmonic. Solving for it is the Dirichlet problem, and conformal mapping handles awkward cross-sections.

Electrostatics. Potential in a charge-free region is harmonic, and field lines are the conjugate’s level curves. Capacitance calculations for irregular electrodes were built on this before numerical solvers.

Groundwater and porous flow. Darcy flow has a harmonic pressure head, so aquifer models and seepage under dams are solved as Dirichlet problems. Flow nets drawn by hand in civil engineering are exactly these orthogonal families.

Aerodynamics. Potential flow around bodies is the complex potential of Example 7, and adding circulation gives lift. The stagnation points are physically observable.

Membrane deflection. A stretched membrane with a fixed boundary takes a harmonic shape under small deflection, which is why soap-film experiments were once used as analog computers for Laplace’s equation.

Image processing. Harmonic inpainting fills a missing region by solving Laplace’s equation with the surrounding pixels as boundary data. The maximum principle guarantees no new extremes appear inside the patch, which is why the result looks smooth.

What does it mean for u to be harmonic?
What is the relationship between harmonic and analytic functions?
What is the mean value property for harmonic functions?
Why is u = x² + y² not harmonic?
What is the harmonic conjugate of u = e^x cos y?
Why does ln|z| have no single-valued harmonic conjugate on an annulus around 0?
What does the Poisson integral formula do?
For the flow potential f(z) = U(z + a²/z), why is the circle |z| = a a streamline?