Diff. EquationsFourier Series and PDEs

Laplace's Equation

Find steady-state temperatures in a rectangle.

Not started Jump to practice

Wait long enough and the temperature in a plate stops changing. Setting $u_t = 0$ in the two-dimensional heat equation $u_t = k(u_{xx} + u_{yy})$ leaves Laplace's equation, which also describes electrostatic potentials and the shape of a soap film. Its building blocks pair sines with the hyperbolic functions $\sinh$ and $\cosh$.

Key idea

$u_{xx} + u_{yy} = 0$ in the rectangle $0 < x < a$, $0 < y < b$, with $u = 0$ on three sides and $u(x, b) = f(x)$ on the top: $$u = \sum_{n=1}^{\infty} c_n\sin\frac{n\pi x}{a}\sinh\frac{n\pi y}{a},$$ $$c_n\sinh\frac{n\pi b}{a} = b_n,$$ the sine coefficients of $f$. Data on several sides: solve one problem per side and add. Maximum principle: $u$ takes its largest and smallest values on the boundary.

Why it works

Separate $u = X(x)Y(y)$: $X''Y + XY'' = 0$, so $\frac{X''}{X} = -\frac{Y''}{Y} = -\lambda$. The zero conditions at $x = 0$ and $x = a$ make $X'' + \lambda X = 0$ the familiar eigenvalue problem: $X = \sin\frac{n\pi x}{a}$, $\lambda = \left(\frac{n\pi}{a}\right)^{2}$. Then $Y'' - \lambda Y = 0$, with exponential solutions; $Y(0) = 0$ selects $\sinh\frac{n\pi y}{a}$. At the top, $\sum c_n\sinh\frac{n\pi b}{a}\sin\frac{n\pi x}{a} = f(x)$ is a sine series. Why the maximum principle? At an interior maximum, $u_{xx} \le 0$ and $u_{yy} \le 0$; in fact a solution's value at any point equals its average around any circle centered there, so it cannot exceed all its neighbors.

Worked example: Two modes on top

Solve $u_{xx} + u_{yy} = 0$ in $0 < x < \pi$, $0 < y < 3$, with $u = 0$ on $x = 0$, $x = \pi$, $y = 0$ and $u(x, 3) = 2\sin x - 2\sin 2x$.
  1. $a = \pi$: modes $\sin nx\sinh ny$.
  2. Matching at $y = 3$: $c_1\sinh 3 = 2$ and $c_2\sinh 6 = -2$.

Answer: $u$ $= \frac{2\sin x\sinh y}{\sinh 3}$ $- \frac{2\sin 2x\sinh 2y}{\sinh 6}$

Worked example: The temperature at the center

With $u(x, 3) = \sin x$ instead, find $u\left(\frac{\pi}{2}, 1.5\right)$.
  1. $u = \frac{\sin x\sinh y}{\sinh 3}$.
  2. At the center: $\frac{\sinh 1.5}{\sinh 3} \approx \frac{2.129}{10.018}$.

Answer: about 0.213, much less than the top's maximum 1, as the maximum principle requires

Worked example: Heat on a different side

Set up the solution when $u = 0$ on $y = 0$, $y = \pi$, $x = 0$, and $u(2, y) = g(y)$ on the right side $x = 2$.
  1. Now the zero conditions are at $y = 0, \pi$, so $Y = \sin ny$ and $X'' - n^{2}X = 0$ with $X(0) = 0$: $X = \sinh nx$.
  2. Match at $x = 2$: $c_n\sinh 2n$ equals the sine coefficients of $g$ on $(0, \pi)$.

Answer: $u = \sum c_n\sinh nx\sin ny$ with $c_n\sinh 2n$ $= \frac{2}{\pi}\int_0^{\pi} g(y)\sin ny\,dy$

Common mistake

Using $\sin$ in both directions. Only the direction with two zero conditions gets the eigenfunctions $\sin\frac{n\pi x}{a}$; the other direction solves $Y'' - \lambda Y = 0$, with $\sinh$ (or $\cosh$), not $\sin$. A quick check: $\sin x\sin y$ gives $u_{xx} + u_{yy} = -2\sin x\sin y \ne 0$.
The steady temperature $u = \frac{\sin x\sinh y}{\sinh 3}$: zero on three edges and a sine arch along the top edge $y = 3$. The surface is as smooth and flat as it can be; its highest point is on the boundary. Switch to the map view to see the level curves.

Practice

Pass with 3 right answers, the last 2 in a row. Each right answer earns 3 XP.

Loading practice…

Builds on

Leads to

This is one of the top rungs of Differential Equations.

Sources and further reading

  • Paul's Online Math Notes, Differential Equations: Laplace's Equation
  • Paul's Online Math Notes, Differential Equations: Separation of Variables
@teddyrookbook GitHub