Laplace’s Equation

Laplace’s equation u_{xx} + u_{yy} = 0 describes steady-state temperature in a flat plate, where nothing changes over time. On a rectangle with three edges at 0 and the top edge at temperature f(x), separation of variables gives u(x, y) = Σ cₙ [sinh(nπy/a) / sinh(nπb/a)] sin(nπx/a), where cₙ are the sine coefficients of f.

Before this lesson: Heat Equation, Fourier Sine and Cosine Series and Partial Derivatives

What Laplace’s equation says

Picture a thin metal plate whose edges are held at fixed temperatures. After a long time the temperature stops changing. In the two-dimensional heat equation uₜ = k(u_{xx} + u_{yy}), that means uₜ = 0, which leaves Laplace’s equation:

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

The symbol ∇²u, called the Laplacian, is the sum of the second partial derivatives. A solution of Laplace’s equation is called a harmonic function. The same equation describes electric potential in a region with no charge and the velocity potential of a smooth fluid flow.

Two key properties

  • Mean value property: the value of a harmonic function at a point equals its average around any circle centered there (inside the region).
  • Maximum principle: a harmonic function on a bounded region takes its largest and smallest values on the boundary, never strictly inside. A plate is never hotter inside than its hottest edge.

Laplace’s equation has no time variable, so there are no initial conditions. A problem is set by giving u on the whole boundary, which is called a Dirichlet problem.

Solving Laplace’s equation on a rectangle

Take the rectangle 0 < x < a, 0 < y < b with u = 0 on the left, right and bottom edges and u(x, b) = f(x) on the top. Look for solutions u = X(x)Y(y). Substituting gives X″Y + XY″ = 0, and dividing by XY separates the variables:

\frac{X''}{X} = -\frac{Y''}{Y} = -\lambda
  1. X″ + λX = 0 with X(0) = X(a) = 0. As in boundary value problems, λₙ = (nπ/a)² and Xₙ = sin(nπx/a).
  2. Y″ − λₙY = 0 with Y(0) = 0. The plus sign gives exponentials, and the combination that is 0 at y = 0 is Yₙ = sinh(nπy/a).
  3. Add the products and choose the coefficients so that the sum equals f(x) on the top edge, where y = b.
u(x,y) = \sum_{n=1}^{\infty} c_n\,\frac{\sinh(n\pi y/a)}{\sinh(n\pi b/a)}\sin\frac{n\pi x}{a},\qquad c_n = \frac{2}{a}\int_0^a f(x)\sin\frac{n\pi x}{a}\,dx

Dividing by sinh(nπb/a) makes the fraction equal 1 on the top edge, so cₙ is just the Fourier sine series coefficient of f. Here sinh z = (eᶻ − e⁻ᶻ)/2 is the hyperbolic sine.

Other edges and superposition

The sine always runs along the edge that carries the data, and the sinh grows away from the opposite edge, which is held at 0.

Nonzero edgeDataTerm of the solution
Top (y = b)u(x,b) = f(x)c_n\frac{\sinh(n\pi y/a)}{\sinh(n\pi b/a)}\sin\frac{n\pi x}{a}
Bottom (y = 0)u(x,0) = f(x)c_n\frac{\sinh(n\pi (b-y)/a)}{\sinh(n\pi b/a)}\sin\frac{n\pi x}{a}
Right (x = a)u(a,y) = g(y)d_n\frac{\sinh(n\pi x/b)}{\sinh(n\pi a/b)}\sin\frac{n\pi y}{b}
Left (x = 0)u(0,y) = g(y)d_n\frac{\sinh(n\pi (a-x)/b)}{\sinh(n\pi a/b)}\sin\frac{n\pi y}{b}

If more than one edge is nonzero, solve one edge at a time with the other three at 0, then add the solutions. This works because Laplace’s equation is linear (superposition).

Laplace’s equation examples

Example 1: Checking a harmonic function

Show that u = x³ − 3xy² satisfies Laplace’s equation.

u_x = 3x^2 - 3y^2

Differentiate in x, holding y constant.

u_{xx} = 6x

Differentiate in x again.

u_y = -6xy

Differentiate in y, holding x constant.

u_{yy} = -6x

Differentiate in y again.

u_{xx} + u_{yy} = 6x - 6x = 0

Add the second partials.

Answer: u_{xx} + u_{yy} = 0 everywhere, so u is harmonic.

Example 2: One sine term on the top edge

Solve Laplace’s equation on the square 0 < x < π, 0 < y < π with u = 0 on the left, right and bottom edges and u(x, π) = 5 sin 2x. Then find u(π/4, π/2).

a = b = \pi \Rightarrow X_n = \sin nx,\quad Y_n = \sinh ny

nπ/a = n.

c_2 = 5,\quad c_n = 0 \text{ for } n \ne 2

f(x) = 5 sin 2x is already a sine series.

u(x,y) = \frac{5\sinh 2y\,\sin 2x}{\sinh 2\pi}

Top-edge term with n = 2.

u\left(\frac{\pi}{4},\frac{\pi}{2}\right) = \frac{5\sinh \pi\,\sin\frac{\pi}{2}}{\sinh 2\pi} = \frac{5\sinh\pi}{\sinh 2\pi}

Substitute x = π/4 and y = π/2; sin(π/2) = 1.

= \frac{5\sinh\pi}{2\sinh\pi\cosh\pi} = \frac{5}{2\cosh\pi}

Double-angle identity sinh 2z = 2 sinh z cosh z.

\approx \frac{5}{2(11.592)} \approx 0.2157

cosh π ≈ 11.592.

Answer: u = 5 sinh 2y sin 2x / sinh 2π, and u(π/4, π/2) ≈ 0.216. Halfway up the plate the temperature is already far below the top edge’s peak of 5.

Example 3: A plate with one hot edge

A square plate 0 < x < π, 0 < y < π has its top edge at 100° and the other three edges at 0°. Find u(x, y) and the temperature at the center.

c_n = \frac{2}{\pi}\int_0^{\pi}100\sin nx\,dx = \frac{200\left(1-(-1)^n\right)}{n\pi}

Sine coefficient of the constant 100.

c_n = \frac{400}{n\pi} \text{ (n odd)},\quad c_n = 0 \text{ (n even)}

1 − (−1)ⁿ is 2 for odd n.

u(x,y) = \frac{400}{\pi}\sum_{n \text{ odd}}\frac{\sinh ny}{n\sinh n\pi}\sin nx

Put the cₙ into the top-edge series.

\frac{\sinh(n\pi/2)}{\sinh n\pi} = \frac{1}{2\cosh(n\pi/2)}

At y = π/2, use sinh 2z = 2 sinh z cosh z.

n = 1: \frac{400}{\pi}\cdot\frac{1}{2\cosh(\pi/2)} \approx \frac{127.324}{5.0184} \approx 25.3716

cosh(π/2) ≈ 2.50918 and sin(π/2) = 1.

n = 3: -\frac{400}{3\pi}\cdot\frac{1}{2\cosh(3\pi/2)} \approx -\frac{42.441}{111.327} \approx -0.3812

sin(3π/2) = −1 and cosh(3π/2) ≈ 55.663.

n = 5: \frac{400}{5\pi}\cdot\frac{1}{2\cosh(5\pi/2)} \approx \frac{25.465}{2575.97} \approx 0.0099

sin(5π/2) = 1 and cosh(5π/2) ≈ 1287.99.

u\left(\frac{\pi}{2},\frac{\pi}{2}\right) \approx 25.3716 - 0.3812 + 0.0099 = 25.0003

Add the three terms.

Answer: the center is at 25° (three terms give 25.0003). Practice problem 10 shows why it is exactly 25: each of the four edges contributes the same amount.

Example 4: Two nonzero edges

Solve Laplace’s equation on the square 0 < x < π, 0 < y < π with u(x, π) = 3 sin x on the top, u(π, y) = 2 sin 2y on the right, and u = 0 on the left and bottom. Then find the value at the center.

u_1 = \frac{3\sinh y\,\sin x}{\sinh\pi}

Top edge alone, n = 1.

u_2 = \frac{2\sinh 2x\,\sin 2y}{\sinh 2\pi}

Right edge alone, n = 2; the roles of x and y swap.

u = u_1 + u_2

Superposition: each part is 0 on the other edges.

u_2\left(\frac{\pi}{2},\frac{\pi}{2}\right) = \frac{2\sinh\pi\,\sin\pi}{\sinh 2\pi} = 0

sin π = 0.

u_1\left(\frac{\pi}{2},\frac{\pi}{2}\right) = \frac{3\sinh(\pi/2)}{\sinh\pi} = \frac{3}{2\cosh(\pi/2)}

Double-angle identity for sinh.

\approx \frac{3}{5.0184} \approx 0.598

2 cosh(π/2) ≈ 5.0184.

Answer: u = 3 sinh y sin x / sinh π + 2 sinh 2x sin 2y / sinh 2π, and u ≈ 0.598 at the center. On the top edge u₂ = 0 because sin 2π = 0, and on the right edge u₁ = 0 because sin π = 0, so each edge gets only its own data.

Example 5: Temperature in a metal plate (word problem)

A thin rectangular plate is 20 cm wide and 10 cm tall. Its bottom edge is held at 40 sin(πx/20) °C, and the other three edges are in ice water at 0 °C. Find the steady-state temperature and its value at the center of the plate.

a = 20,\quad b = 10

Width and height in cm.

c_1 = 40,\quad c_n = 0 \text{ for } n \ge 2

The bottom data is one sine term with n = 1.

u(x,y) = \frac{40\sinh\left(\pi(10-y)/20\right)}{\sinh(\pi/2)}\sin\frac{\pi x}{20}

Bottom-edge term; nπb/a = π/2.

u(10,5) = \frac{40\sinh(\pi/4)}{\sinh(\pi/2)}\sin\frac{\pi}{2}

Substitute x = 10 and y = 5.

\approx \frac{40(0.86867)}{2.30130} \approx 15.10

sinh(π/4) ≈ 0.86867 and sinh(π/2) ≈ 2.30130.

Answer: the center of the plate is about 15.1 °C. By the maximum principle, no point inside is warmer than 40 °C, the hottest spot on the bottom edge. The graph shows lines of equal temperature (isotherms).

Rectangle 20 cm wide and 10 cm tall representing the plate. The bottom edge is held at 40 sin(πx/20) degrees Celsius and the other three edges at 0. Blue isotherm curves arch up from the bottom edge, labeled 30, 20, 10 and 5 degrees; the 30 degree curve stays close to the bottom center and the 5 degree curve reaches about 8 cm high. A dot at the center (10, 5) is labeled 15.1 degrees.
Example 5: isotherms of the steady-state temperature. The plate is hottest at the middle of the bottom edge, and the temperature falls toward the cold edges.

Common mistakes

MistakeExample of the errorFix
Using sin in both variablesWriting sin 2y sin 2x in Example 2Only the direction along the data edge gets sines; the other gets sinh.
Forgetting to divide by sinh(nπb/a)Writing u = 5 sinh 2y sin 2x in Example 2Then u(x, π) is not 5 sin 2x; divide by sinh 2π.
Using sinh(nπy/a) for a bottom edgeWriting sinh(πy/20) in Example 5That is 0 on the bottom; use sinh(nπ(b − y)/a), which is 0 on the top.
Solving several nonzero edges at onceTrying one series for both edges in Example 4Solve each edge with the others at 0, then add.
Using the wrong side length in the sineWriting sin(πy/20) for the right edge of a 20 × 10 plateFor data on a vertical edge, the sine uses the height: sin(nπy/b).
Expecting a hot spot inside the plateSaying the center in Example 3 is above 100°By the maximum principle, the extremes are on the boundary.

Related ideas

Laplace’s equation in a disk

In polar coordinates the equation becomes u_{rr} + \frac{1}{r}u_r + \frac{1}{r^2}u_{\theta\theta} = 0. Separation of variables on a disk of radius R gives u = a₀/2 + Σ (r/R)ⁿ(aₙ cos nθ + bₙ sin nθ), where the aₙ and bₙ are the Fourier series coefficients of the boundary temperature. At r = 0 only a₀/2 is left, which is the mean value property.

The Laplacian in vector calculus

The Laplacian is the divergence of the gradient, ∇²u = ∇ · ∇u, as in curl and divergence. With a source term, ∇²u = f(x, y), the equation is called Poisson’s equation.

Practice problems

  1. Show that u = e²ˣ cos 2y is harmonic.
  2. Is u = x² + y² harmonic?
  3. Find the constant k so that u = x² + ky² is harmonic.
  4. Solve Laplace’s equation on 0 < x < π, 0 < y < π with u(x, π) = 4 sin 3x and u = 0 on the other edges.
  5. Solve Laplace’s equation on 0 < x < 2, 0 < y < 1 with u(x, 1) = 6 sin πx and u = 0 on the other edges.
  6. Solve Laplace’s equation on 0 < x < π, 0 < y < π with u(x, 0) = 2 sin x and u = 0 on the other edges.
  7. Solve Laplace’s equation on 0 < x < π, 0 < y < π with u(0, y) = sin 2y and u = 0 on the other edges.
  8. A harmonic function u has values 10 + 3 cos θ on the circle of radius 2 centered at the origin. Find u(0, 0).
  9. In Example 5, find the temperature at (10, 2).
  10. Explain why the center of the plate in Example 3 is exactly 25°.
Show answers

1.

u_{xx} = 4e^{2x}\cos 2y

Differentiate twice in x.

u_{yy} = e^{2x}(-4\cos 2y) = -4e^{2x}\cos 2y

Differentiate twice in y.

u_{xx} + u_{yy} = 0

Add.

Answer: yes, u is harmonic

2.

u_{xx} + u_{yy} = 2 + 2 = 4

Each second partial is 2.

Answer: no, because the Laplacian is 4, not 0

3.

u_{xx} + u_{yy} = 2 + 2k

Second partials of x² and ky².

2 + 2k = 0

Set the Laplacian equal to 0.

k = -1

Subtract 2 from both sides, then divide by 2.

Answer: k = −1, so u = x² − y²

4.

u = \frac{4\sinh 3y\,\sin 3x}{\sinh 3\pi}

Top-edge term with n = 3 and a = b = π.

Answer: u(x, y) = 4 sinh 3y sin 3x / sinh 3π

5.

\sin\pi x = \sin\frac{2\pi x}{2} \Rightarrow n = 2

With a = 2, the data is the n = 2 mode.

\frac{n\pi y}{a} = \pi y,\quad \frac{n\pi b}{a} = \pi

Simplify with n = 2, a = 2, b = 1.

Answer: u(x, y) = 6 sinh(πy) sin(πx) / sinh π

6.

u = \frac{2\sinh(\pi - y)\,\sin x}{\sinh\pi}

Bottom-edge term with n = 1; it is 0 at y = π.

Answer: u(x, y) = 2 sinh(π − y) sin x / sinh π

7.

u = \frac{\sinh\left(2(\pi - x)\right)\sin 2y}{\sinh 2\pi}

Left-edge term with n = 2; it is 0 at x = π.

Answer: u(x, y) = sinh(2(π − x)) sin 2y / sinh 2π

8.

u(0,0) = \frac{1}{2\pi}\int_0^{2\pi}(10 + 3\cos\theta)\,d\theta

Mean value property.

= \frac{1}{2\pi}(20\pi + 0) = 10

The integral of cos θ over a full turn is 0.

Answer: 10

9.

u(10,2) = \frac{40\sinh(8\pi/20)}{\sinh(\pi/2)}

Substitute x = 10 and y = 2; sin(π/2) = 1.

\approx \frac{40(1.61449)}{2.30130} \approx 28.06

sinh(0.4π) ≈ 1.61449.

Answer: about 28.1 °C

10.

u_T + u_B + u_L + u_R = 100

Four plates, each with one edge at 100°, add up to a plate with all edges at 100°, whose solution is u = 100.

4u_T\left(\frac{\pi}{2},\frac{\pi}{2}\right) = 100

By symmetry, the four rotated problems have the same center value.

u_T\left(\frac{\pi}{2},\frac{\pi}{2}\right) = 25

Divide both sides by 4.

Answer: the center value is exactly 25°

Laplace’s equation FAQ

What is Laplace’s equation?

It is the partial differential equation u_{xx} + u_{yy} = 0, written ∇²u = 0. It describes steady states, such as the temperature in a plate after it stops changing, and electric potential in a region with no charge.

What is a harmonic function?

A harmonic function is a solution of Laplace’s equation, such as x² − y² or eˣ sin y. Harmonic functions have the mean value property and take their largest and smallest values on the boundary.

How do you solve Laplace’s equation on a rectangle?

Solve one nonzero edge at a time. Separate variables to get sines along that edge and a sinh that is 0 on the opposite edge, match the edge data with a Fourier sine series, then add the solutions for all edges.

How is Laplace’s equation related to the heat equation?

Laplace’s equation is the heat equation with uₜ = 0. Its solution is the steady-state temperature that a two-dimensional heat problem settles to as time goes on.

Summary

  • Laplace’s equation u_{xx} + u_{yy} = 0 describes steady states; its solutions are harmonic functions.
  • Harmonic functions satisfy the mean value property and the maximum principle.
  • On a rectangle, solve one nonzero edge at a time: sines along the data edge, sinh in the other direction.
  • The coefficients are the Fourier sine coefficients of the edge data, divided by sinh of the plate’s aspect factor.
  • Add the one-edge solutions to handle several nonzero edges.

Previous lesson: Wave Equation

Next course: Discrete Math Index

Back to the Differential Equations Index