Skip to main content

Section 3.3 Harmonic Functions

Let \(\phi (x,y)\) be a real-valued function of the two real variables \(x\) and \(y\) defined on a domain \(D\text{.}\) (Recall that a domain is a connected open set.) The partial differential equation
\begin{equation} \phi _{xx}(x,y) +\phi _{yy}(x,y) = 0 \tag{3.3.1} \end{equation}
is known as Laplaceโ€™s equation (sometimes referred to as the potential equation). If \(\phi, \, \phi _x, \, \phi_y, \, \phi _{xx}, \, \phi _{xy}, \, \phi _{yx}\text{,}\) and \(\phi _{yy}\) are all continuous, and if \(\phi (x,y)\) satisfies Laplaceโ€™s equation, then \(\phi(x,y)\) is harmonic on \(D\text{.}\) Harmonic functions are important in applied mathematics, engineering, and mathematical physics. They are used to solve problems involving steady state temperatures, two-dimensional electrostatics, and ideal fluid flow. In Chapterย 10 we describe how complex analysis techniques can be used to solve some problems involving harmonic functions. We begin with an important theorem relating analytic and harmonic functions.

Proof.

In Corollary 6.3 we will show that, if \(f(z)\) is analytic, then all partial derivatives of \(u\) and \(v\) are continuous. Using that result here, we see that, as \(f\) is analytic, \(u\) and \(v\) satisfy the Cauchy-Riemann equations
\begin{equation*} u_x = v_y, \quad \text{and} \quad u_y = -v_x\text{.} \end{equation*}
Taking the partial derivative with respect to \(x\) of each side of these equations gives
\begin{equation*} u_{xx} = v_{yx}, \quad \text{and} \quad u_{yx} = -v_{xx}\text{.} \end{equation*}
Similarly, taking the partial derivative of each side with respect to \(y\) yields
\begin{equation*} u_{xy}=v_{yy}, \quad \text{and} \quad u_{yy} = -v_{xy}\text{.} \end{equation*}
The partial derivatives \(u_{xy}\text{,}\) \(u_{yx}\text{,}\) \(v_{xy}\text{,}\) and \(v_{yx}\) are all continuous, so we use a theorem from the calculus of real functions that states that the mixed partial derivatives are equal; that is,
\begin{equation*} u_{xy}=u_{yx} \quad \text{and} \quad v_{xy}=v_{yx}\text{.} \end{equation*}
Combining all these results finally gives \(u_{xx}+u_{yy}=v_{yx}-v_{xy}=0\text{,}\) and \(v_{xx}+v_{yy}=-u_{yx}+u_{xy}=0\text{.}\) Therefore both \(u\) and \(v\) are harmonic functions on \(D\text{.}\)
If we have a function \(u(x,y)\) that is harmonic on the domain \(D\) and if we can find another harmonic function \(v(x,y)\) such that the partial derivatives for \(u\) and \(v\) satisfy the Cauchy-Riemann equations throughout \(D\text{,}\) then we say that \(v(x,y)\) is a harmonic conjugate of \(u(x,y)\text{.}\) It then follows that the function \(f(z) =u(x,y) + iv(x,y)\) is analytic on \(D\text{.}\)

Example 3.3.2.

If \(u(x,y) =x^2-y^2\text{,}\) then \(u_{xx}(x ,y) + u_{yy}(x,y) = 2-2 = 0\text{;}\) hence \(u\) is a harmonic function for all \(z\text{.}\) We find that \(v(x,y) = 2xy\) is also a harmonic function and that
\begin{equation*} u_x=v_y=2x, \quad \text{and} \quad u_y=-v_x=-2y\text{.} \end{equation*}
Therefore \(v\) is a harmonic conjugate of \(u\text{,}\) and the function \(f\) given by
\begin{equation*} f(z) =x^2-y^2+i2xy=z^2 \end{equation*}
is an analytic function.
Theoremย 3.3.1 makes the construction of harmonic functions from known analytic functions an easy task.

Example 3.3.3.

The function \(f(z)=z^3=x^3-3xy^2+i(3x^2y-y^3)\) is analytic for all values of \(z\text{.}\) Hence it follows that
\begin{equation*} u(x,y) = \mathrm{Re}\left[ f(z) \right] =x^3-3xy^2 \end{equation*}
is harmonic for all \(z\text{,}\) and that
\begin{equation*} v(x,y) = \mathrm{Im}\left[ f(z) \right] =3x^2y-y^3 \end{equation*}
is a harmonic conjugate of \(u(x,y)\text{.}\)
Figuresย 3.3.4(a) and Figureย 3.3.4(b) show the graphs of these two functions. The partial derivatives are \(u_x(x,y)=3x^2-3y^2, \, u_y(x,y)=-6xy, \, v_x(x,y)=6xy\text{,}\) and \(v_y(x,y)=3x^2-3y^2\text{.}\) They satisfy the Cauchy-Riemann equations because they are the real and imaginary parts of an analytic function. At the point \((x,y) =(2,-1)\text{,}\) we have \(u_x(2,-1)=v_y(2,-1) =9\text{,}\) and these partial derivatives appear along the edges of the surfaces for \(u\) and \(v\) where \(x=2\) and \(y=-1\text{.}\) Similarly, \(u_y(2,-1) =12\) and \(v_x(2,-1) =-12\) also appear along the edges of the surfaces for \(u\) and \(v\) where \(x=2\) and \(y=-1\text{.}\)
(a) \(u(x,y) =x^3-3xy^2\)
(b) \(v(x,y)=3x^2y-y^3\)
Figure 3.3.4. Harmonic conjugates from the analytic function \(f(z)=z^3\)
We can use complex analysis to show easily that certain combinations of harmonic functions are harmonic. For example, if \(v\) is a harmonic conjugate of \(u\text{,}\) then their product \(\phi(x,y)=u(x,y)v(x,y)\) is a harmonic function. This condition can be verified directly by computing the partial derivatives and showing that Equationย (3.3.1) holds, but the details are tedious. If we use complex variable techniques instead, we can start with the fact that \(f(z)=u(x,y) + iv(x,y)\) is an analytic function. Then we observe that the square of \(f\) is also an analytic function:
\begin{equation*} [f(z)]^2 = [u(x,y)]^2-[v(x,y)]^2 + i2u(x,y) v(x,y)\text{.} \end{equation*}
We then know immediately that the imaginary part, \(2u(x,y) v(x,y)\text{,}\) is a harmonic function by Theoremย 3.3.1. A constant multiple of a harmonic function is harmonic, so it follows that \(\phi\) is harmonic. We leave as an exercise to show that, if \(u_1\) and \(u_2\) are two harmonic functions that are not related in the preceding fashion, then their product need not be harmonic.

Proof.

A conjugate harmonic function \(v\) will satisfy the Cauchy-Riemann equations \(u_x=v_y\) and \(u_y=-v_x\text{.}\) Assuming that such a function exists, we determine what it would have to look like by using a two-step process. First, we integrate \(v_y\) (which should equal \(u_x\)) with respect to \(y\) and get
\begin{equation} v(x,y) = \int u_x(x,y)\,dy + C(x)\text{,}\tag{3.3.2} \end{equation}
where \(C(x)\) is a function of \(x\) alone that is yet to be determined. Second, we compute \(C'(x)\) by differentiating both sides of this equation with respect to \(x\) and replacing \(v_x\) with \(-u_y\) on the left side, which gives
\begin{equation*} -u_y(x,y) = \frac{d}{dx}\int u_x(x,y)\,dy+C\,'(x)\text{.} \end{equation*}
It can be shown (we omit the details) that because \(u\) is harmonic, all terms except those involving \(x\) in the last equation will cancel, revealing a formula for \(C\,'(x)\) involving \(x\) alone. Elementary integration of the single-variable function \(C\,'(x)\) can then be used to discover \(C(x)\text{.}\) We finally observe that the function \(v\) so created indeed has the properties we seek.
Technically we should always specify the domain of function when defining it. When no such specification is given, it is assumed that the domain is the entire complex plane, or the largest set for which the expression defining the function makes sense.

Example 3.3.6.

Show that \(u(x,y) =xy^3-x^3y\) is a harmonic function and find a conjugate harmonic function \(v(x,y)\text{.}\)
Solution.
We follow the construction process of Theoremย 3.3.5. The first partial derivatives are
\begin{equation} u_x(x,y) = y^3-3x^2y, \quad \text{and} \quad u_y(x,y) =3xy^2-x^3\text{.}\tag{3.3.3} \end{equation}
To verify that \(u\) is harmonic, we compute the second partial derivatives and note that \(u_{xx}(x,y)+u_{yy}(x,y)=-6xy+6xy=0\text{,}\) so \(u\) satisfies Laplaceโ€™s Equationย (3.3.1). To construct \(v\text{,}\) we start with Equationย (3.3.2) and the first of Equationsย (3.3.3) to get
\begin{equation*} v(x,y) = \int (y^3-3x^2y)\,dy+C(x) = \frac{1}{4}y^4-\frac{3}{2}x^2y^2+C(x)\text{.} \end{equation*}
Differentiating the left and right sides of this equation with respect to \(x\) and using \(-u_y(x,y)=v_x(x,y)\) and Equationย (3.3.3) on the left side yields
\begin{equation*} -3xy^2+x^3=0-3xy^2+C\,'(x)\text{,} \end{equation*}
which implies that
\begin{equation*} C\,'(x) =x^3\text{.} \end{equation*}
Finally, if we integrate this equation we get
\begin{equation*} v(x,y) = \frac{1}{4}x^4-\frac{3}{2}x^2y^2+\frac{1}{4}y^4+C. \end{equation*}
Harmonic functions arise as solutions to many physical problems. Applications include two-dimensional models of heat flow, electrostatics, and fluid flow. We now give an example of the latter.
We assume that an incompressible and frictionless fluid flows over the complex plane and that all cross sections in planes parallel to the complex plane are the same. Situations such as this occur when fluid is flowing in a deep channel. The velocity vector at the point \((x, y)\) is
\begin{equation} \mathbf{V}(x,y) = p(x,y) +iq(x,y)\text{,}\tag{3.3.4} \end{equation}
which we illustrate in Figureย 3.3.7.
Figure 3.3.7. The vector field \(\mathbf{V}(x,y)=p(x,y)+iq(x,y)\text{,}\) which can be considered as a fluid flow
The assumption that the flow is irrotational and has no sources or sinks implies that both the curl and divergence vanish; that is, \(q_x-p_y=0\) and \(p_x+q_y=0\text{.}\) Hence \(p\) and \(q\) obey the equations
\begin{equation} p_x(x,y) = -q_y(x,y), \quad \text{and} \quad p_y(x,y) =q_x(x,y)\text{.}\tag{3.3.5} \end{equation}
Equationsย (3.3.5) are similar to the Cauchy-Riemann equations and permit us to define a special complex function:
\begin{equation} f(z) =u(x,y) + iv(x,y) = p(x,y) - iq(x,y)\text{.}\tag{3.3.6} \end{equation}
Here we have \(u_x=p_x, \, u_y=p_y, \, v_x=-q_x\text{,}\) and \(v_y=-q_y\text{.}\) We can use Equationย (3.3.5) to verify that the Cauchy-Riemann equations hold for \(f\text{:}\)
\begin{align*} u_x(x,y) \amp = p_x(x,y) = -q_y(x,y) = v_y(x,y), \quad \text{and}\\ u_y(x,y) \amp = p_y(x,y) = q_x(x,y) = -v_x(x,y)\text{.} \end{align*}
Assuming that the functions \(p\) and \(q\) have continuous partials, Theoremย 3.2.6 guarantees that function \(f\) defined in Equationย (3.3.6) is analytic and that the fluid flow of Equationย (3.3.4) is the conjugate of an analytic function; that is,
\begin{equation*} \mathbf{V}(x,y) = \overline{f(z)}\text{.} \end{equation*}
In Chapterย 6 we prove that every analytic function \(f\) has an analytic antiderivative \(F\text{.}\) Assuming this conclusion to hold for now we can write
\begin{equation} F(z) = \phi (x,y) + i\psi(x,y)\text{,}\tag{3.3.7} \end{equation}
where \(F\,'(z) = f(z)\text{.}\)
Theoremย 3.3.1 implies that \(\phi (x,y)\) is a harmonic function. Using the vector interpretation of a complex number, the gradient of \(\phi\) can be written as
\begin{equation*} \mathrm{grad} \, \phi (x,y) = \phi _x(x,y) +i\phi_y(x,y) \end{equation*}
The Cauchy-Riemann equations applied to \(F(z)\) give \(\phi_y(x,y) =-\psi_x(x,y)\text{.}\) Making this substitution in the preceding equation yields
\begin{equation*} \mathrm{grad} \, \phi(x,y) = \phi_x(x,y) - i\psi_x(x,y) = \overline{\phi_x(x,y) +i\psi _x(x,y)} \end{equation*}
Equationย (3.2.2) says that \(\phi_x(x,y) +i\psi_x(x,y) =F\,'(z)\text{,}\) which by the preceding equation and Equationย (3.3.7) implies that
\begin{equation*} \mathrm{grad} \, \phi(x,y) = \overline{F\,'(z)} = \overline{f(z)} \end{equation*}
Finally, from Equationย (3.3.4) \(\phi\) is the scalar potential function for the fluid flow, so
\begin{equation*} \mathbf{V}(x,y) = \mathrm{grad} \, \phi(x,y). \end{equation*}
The curves given by \(\{(x,y) :\phi(x,y) = \text{ constant} \}\) are called equipotentials. The curves \(\{(x,y) : \psi(x,y) = \text{ constant} \}\) are called streamlines and describe the path of fluid flow. In Sectionย 10.4 we show that the family of equipotentials is orthogonal to the family of streamlines, as depicted in Figureย 3.3.8.
Figure 3.3.8. The families of orthogonal curves \(\{(x,y):\phi (x,y) = \text{ constant} \}\) and \(\{(x,y):\psi (x,y)= \text{ constant} \}\) for the function \(F(z)=\phi (x,y)+i\psi (x,y)\)

Example 3.3.9.

Show that the harmonic function \(\phi(x,y)=x^2-y^2\) is the scalar potential function for the fluid flow expression \(\mathbf{V}(x,y) = 2x-i2y\text{.}\)
Solution.
We can write the fluid flow expression as
\begin{equation*} \mathbf{V}(x,y) = \overline{f(z)}= \overline{2x+i2y}=\overline{2z}\text{.} \end{equation*}
An antiderivative of \(f(z) =2z\) is \(F(z)=z^2\text{,}\) and the real part of \(F(z)\) is the desired harmonic function:
\begin{equation*} \phi (x,y) = \mathrm{Re}[F(z)] = \mathrm{Re}[x^2-y^2+i2xy] =x^2-y^2\text{.} \end{equation*}
Note that the hyperbolas \(\phi(x,y) =x^2-y^2=C\) are the equipotential curves and that the hyperbolas \(\psi(x,y) =2xy=C\) are the streamline curves; these curves are orthogonal, as shown in Figureย 3.3.10.
Figure 3.3.10. The equipotential curves \(x^2-y^2=C\) and streamline curves \(2xy=C\) for the function \(F(z)=z^2\)

Exercises Exercises

2.

Does an analytic function \(f(z)=u(x,y)+iv(x,y)\) exist for which \(v(x,y)=x^3+y^3\text{?}\) Why or why not?

3.

Let \(a, \, b\text{,}\) and \(c\) be real constants. Determine a relation among the coefficients that will guarantee that the function \(\phi(x,y)=ax^2+bxy+cy^2\) is harmonic.
Solution.
\(c=-a\text{.}\)

4.

Let \(v(x,y) = \arctan(\frac{y}{x})\) for \(x \ne 0\text{.}\) Compute the partial derivatives of \(v\) and verify that \(v\) satisfies Laplaceโ€™s equation.

6.

Let \(u_1(x,y)=x^2-y^2\) and \(u_2(x,y)=x^3-3xy^2\text{.}\) Show that \(u_1\) and \(u_2\) are harmonic functions but that their product \(u_1(x,y) u_2(x,y)\) is not harmonic.

7.

Let \(u(x,y)\) be harmonic on a region \(D\) that is symmetric about the line \(y=0\text{.}\) Show that \(U(x,y)=u(x,-y)\) is harmonic on \(D\text{.}\)
Hint.
Use the chain rule for differentiation of real functions and note that \(\, u(x,-y)\,\) is really the function \(\, u\big(g(x,y)\big),\, \) where \(\,g(x,y)=(x,-y)\text{.}\)
Solution.
By the chain rule, \(U_x(x,y)=u_x(x,-y), \; U_y(x,y)=-u_y(x,-y); \;U_{xx}(x,y)=u_{xx}(x,-y)\text{,}\) and \(U_{yy}(x,y)=u_{yy}(x,-y)\text{.}\) Hence, \(U_{xx}(x,y)+U_{yy}(x,y) = u_{xx}(x,-y)+u_{yy}(x,-y)=0\text{.}\)

8.

Let \(v\) be a harmonic conjugate of \(u\text{.}\) Show that \(-u\) is a harmonic conjugate of \(v\text{.}\)

9.

Let \(v\) be a harmonic conjugate of \(u\text{.}\) Show that \(h=u^2-v^2\) is a harmonic function.
Solution.
The function \(f=u+iv\) must be analytic, hence so is \(f^2=u^2-v^2+i(2uv)\text{.}\) The result then follows by Theoremย 3.3.1.

10.

Suppose that \(v\) is a harmonic conjugate of \(u\) and that \(u\) is a harmonic conjugate of \(v\text{.}\) Show that \(u\) and \(v\) must be constant functions.

11.

Let \(f(z)=f(re^{i\theta})=u(r,\theta)+iv(r,\theta)\) be analytic on a domain \(D\) that does not contain the origin. Use the polar form of the Cauchy-Riemann equations \(u_\theta = -rv_r\text{,}\) and \(v_\theta = ru_r\text{.}\) Differentiate them first with respect to \(\theta\) and then with respect to \(r\text{.}\) Use the results to establish the polar form of Laplaceโ€™s equation:
\begin{equation*} r^2u_{rr}(r,\theta ) +ru_{r}(r,\theta ) +u_{\theta \theta}(r,\theta)=0\text{.} \end{equation*}
Solution.
\(u_{\theta}=-rv_{r}\) implies \(u_{\theta \theta }=-rv_{r\theta}\text{,}\) and \(u_{\theta r}=-rv_{rr}-v_{r}\text{.}\) Also, \(v_{\theta }=ru_{r}\) implies \(v_{\theta \theta}=ru_{r\theta}\text{,}\) and \(v_{\theta r}=ru_{rr}+u_{r}\text{.}\) From these calculations we get \(r^2u_{rr} + ru_{r}+u_{\theta \theta} = (rv_{\theta r}-ru_{r}) + (ru_{r}) + (-rv_{r\theta}) = 0\text{.}\)

12.

Use the polar form of Laplaceโ€™s equation given in Exerciseย 3.3.11 to show that the following functions are harmonic:

(a)

\(u(r,\theta ) =(r+\frac{1}{r}) \cos \theta\) and \(v(r,\theta )=(r-\frac{1}{r}) \sin \theta\text{;}\)

(b)

\(u(r,\theta ) =r^n\cos n\theta\) and \(v(r,\theta) =r^n\sin n\theta\text{.}\)

13.

The function \(F(z) = \frac{1}{z}\) is used to determine a field known as a dipole.

(a)

Express \(F(z)\) in the form \(F(z) = \phi (x,y) + i\psi(x ,y)\text{.}\)
Solution.
\(f(z) = \frac{1}{x+iy} = \frac{x}{x^2+y^2} + i\frac{-y}{x^2+y^2}\text{.}\)

(b)

Sketch the equipotentials \(\phi =1,\frac{1}{2},\frac{1}{4}\) and streamlines \(\psi=1, \, \frac{1}{2},\frac{1}{4}\text{.}\)

14.

Assume that \(F(z) = \phi(x,y) + i\psi(x,y)\) is analytic on the domain \(D\) and that \(F\,'(z) \ne 0\) on \(D\text{.}\) Consider the families of level curves \(\{\phi(x,y) = \text{ constant } \}\) and \(\{\psi(x,y) = \text{ constant } \}\text{,}\) which are the equipotentials and streamlines for the fluid flow V\((x,y) = \overline{F\,'(z)}\text{.}\) Prove that the two families of curves are orthogonal.
Hint.
Suppose that \(\, (x_0,y_0)\, \) is a point common to the two curves \(\,\phi (x,y) =c_1\,\) and \(\, \psi (x,y) =c_2\text{.}\) Use the gradients of \(\, \phi\,\) and \(\, \psi\,\) to show that the normals to the curves are perpendicular.

15.

We introduce the logarithmic function in Chapterย 5. For now, let \(F(z)= \mathrm{Log}\,z= \ln |z|+i\mathrm{Arg}\,z\text{.}\) Here we have \(\phi(x,y) = \ln |z|\) and \(\psi (x,y) = \mathrm{Arg}\,z\text{.}\) Sketch the equipotentials \(\phi =0 , \, \ln 2, \, \ln 3, \, \ln 4\) and streamlines \(\psi = \frac{k\pi}{8}\) for \(k=0,1,\ldots,7\text{.}\)
Solution.
The equipotentials are concentric circles with radii 1, 2, 3, and 4. The streamlines are lines from the origin making an angle of \(\frac{k\pi}{8}\) radians for \(k=0,1,\ldots,7\text{.}\)

17.

Discuss and compare the statements โ€œ\(u(x,y)\) is harmonicโ€ and โ€œ\(u(x,y)\) is the imaginary part of an analytic function.โ€