4.2 Separation of Variables: Laplace’s Equation
Harmonic functions, the mean value property and the maximum principle; Fourier series; the Dirichlet problem in a rectangle and in a disc by separation of variables, Poisson's integral formula, and the compatibility condition of the Neumann problem.
Put a thin metal plate between heaters held at fixed temperatures and wait. The temperature stops changing, and what remains is a function $u(x,y)$ with $u_{xx}+u_{yy}=0$ that is completely decided by its values on the edge of the plate. The same equation describes the electrostatic potential in a charge-free region, the velocity potential of a steady ideal flow, the shape of a soap film stretched over a slightly bent wire, and the steady groundwater head under a dam. §4.1 explained why Laplace's equation, the model elliptic equation, asks for boundary values rather than Cauchy data: it has no real characteristics, and its Cauchy problem is violently unstable. This section answers the two questions that follow. Is a solution with given boundary values unique, and does it depend continuously on the data? (Yes — by the maximum principle.) And how do we actually find it? (For rectangles and discs — by separation of variables, which turns the PDE into the Sturm–Liouville problems of §2.3 and the solution into a Fourier series.)
The section is written so that each step is proved: the mean value property, the weak and strong maximum principles, the convergence theorem for Fourier series that every separation-of-variables solution depends on, the solution in a rectangle with a full convergence proof, Poisson's integral formula in a disc, and the compatibility condition without which a Neumann problem has no solution at all. In CSIR NET these ideas appear as "what is $u(0,0)$?" (mean value), "which bound must $u$ satisfy inside?" (maximum principle), "solve the Dirichlet problem for this boundary function" (Fourier coefficients in a disc or rectangle), "for which constant is this Neumann problem solvable?", and Part C statements about uniqueness on bounded and unbounded domains. Throughout, $\Delta u=u_{xx}+u_{yy}$, $\Omega$ is a bounded domain (open and connected) in $\mathbb{R}^2$ with boundary $\partial\Omega$ and closure $\overline\Omega$, $\mathbf n$ is the outward unit normal and $\partial u/\partial n=\nabla u\cdot\mathbf n$.
Harmonic Functions and the Maximum Principle
A function $u\in C^2(\Omega)$ is harmonic in $\Omega$ if it satisfies Laplace's equation $\Delta u=u_{xx}+u_{yy}=0$ at every point of $\Omega$. The non-homogeneous equation $\Delta u=F$ is Poisson's equation. A function with $\Delta u\ge0$ is called subharmonic, one with $\Delta u\le0$ superharmonic. In polar coordinates $x=r\cos\theta$, $y=r\sin\theta$ (for $r\gt0$) $$\Delta u=u_{rr}+\frac1r\,u_r+\frac1{r^2}\,u_{\theta\theta}.$$
The polar formula follows from the chain rule ($u_r=u_x\cos\theta+u_y\sin\theta$, differentiate again; Exercise I.3 checks it on examples). The supply of harmonic functions is large. If $f=u+iv$ is analytic, the Cauchy–Riemann equations $u_x=v_y$, $u_y=-v_x$ give $u_{xx}+u_{yy}=v_{yx}-v_{xy}=0$, so the real and imaginary parts of analytic functions are harmonic (Unit 2 proves the converse on simply connected domains). From $z^n=r^ne^{in\theta}$ we obtain the harmonic polynomials $$1,\quad x,\ y,\quad x^2-y^2,\ 2xy,\quad x^3-3xy^2,\ 3x^2y-y^3,\ \dots,\qquad r^n\cos n\theta,\ r^n\sin n\theta,$$ and from $e^z$ and $\log z$ the functions $e^x\cos y$, $e^x\sin y$, $\log r$ (in $\mathbb{R}^2\setminus\{0\}$) and $r^{-n}\cos n\theta$, $r^{-n}\sin n\theta$. Products are not harmonic in general: $x$ is harmonic, $x^2$ is not.
Let $G$ be a bounded domain whose boundary consists of finitely many piecewise $C^1$ closed curves, so that the divergence theorem $\iint_G\nabla\!\cdot\mathbf F\,dA=\oint_{\partial G}\mathbf F\cdot\mathbf n\,ds$ holds for $C^1$ fields on $\overline G$.
- (First identity) For $u\in C^2(\overline G)$ and $v\in C^1(\overline G)$: $\displaystyle\iint_G\big(v\,\Delta u+\nabla u\cdot\nabla v\big)\,dA=\oint_{\partial G}v\,\frac{\partial u}{\partial n}\,ds$.
- (Second identity) For $u,v\in C^2(\overline G)$: $\displaystyle\iint_G\big(v\,\Delta u-u\,\Delta v\big)\,dA=\oint_{\partial G}\Big(v\,\frac{\partial u}{\partial n}-u\,\frac{\partial v}{\partial n}\Big)ds$.
- (Zero flux) If $u$ is harmonic in an open set containing $\overline G$, then $\displaystyle\oint_{\partial G}\frac{\partial u}{\partial n}\,ds=0$.
Proof. (1) Apply the divergence theorem to the $C^1$ field $\mathbf F=v\nabla u$: $\nabla\!\cdot(v\nabla u)=\nabla v\cdot\nabla u+v\,\Delta u$ and $\mathbf F\cdot\mathbf n=v\,\partial u/\partial n$. (2) Write (1) again with $u$ and $v$ interchanged and subtract; the terms $\nabla u\cdot\nabla v$ cancel. (3) Take $v\equiv1$ in (1): $\nabla v=0$ and $\Delta u=0$. ∎
Part (3) is the mathematical form of "in a steady state, as much heat leaves any region as enters it". It is the key to the next theorem.
Let $u$ be harmonic in $\Omega$ and let the closed disc $\overline B(\mathbf x_0,\rho)$ lie in $\Omega$. Then $$u(\mathbf x_0)=\frac1{2\pi\rho}\oint_{|\mathbf x-\mathbf x_0|=\rho}u\,ds=\frac1{2\pi}\int_{-\pi}^{\pi}u(\mathbf x_0+\rho\,\mathbf e_\theta)\,d\theta,\qquad u(\mathbf x_0)=\frac1{\pi\rho^2}\iint_{B(\mathbf x_0,\rho)}u\,dA,$$ where $\mathbf e_\theta=(\cos\theta,\sin\theta)$: the value at the centre is the average over every circle and every disc centred there.
Proof. For $0\lt r\le\rho$ let $m(r)=\frac1{2\pi}\int_{-\pi}^{\pi}u(\mathbf x_0+r\mathbf e_\theta)\,d\theta$. Since $u\in C^1$ on a neighbourhood of the closed disc, we may differentiate under the integral sign: $$m'(r)=\frac1{2\pi}\int_{-\pi}^{\pi}\nabla u(\mathbf x_0+r\mathbf e_\theta)\cdot\mathbf e_\theta\,d\theta=\frac1{2\pi r}\oint_{|\mathbf x-\mathbf x_0|=r}\frac{\partial u}{\partial n}\,ds=0$$ by Theorem 4.11(3) applied to the disc of radius $r$ (on that circle $\mathbf n=\mathbf e_\theta$ and $ds=r\,d\theta$). So $m$ is constant on $(0,\rho]$. Moreover $|m(r)-u(\mathbf x_0)|$ is at most the maximum of $|u(\mathbf x)-u(\mathbf x_0)|$ over the circle $|\mathbf x-\mathbf x_0|=r$, which tends to $0$ as $r\to0$ by continuity of $u$ at $\mathbf x_0$; hence $m(r)=u(\mathbf x_0)$ for all $r\le\rho$, which is the circle formula. For the disc, use polar coordinates centred at $\mathbf x_0$: $\iint_Bu\,dA=\int_0^\rho\Big(\int_{-\pi}^{\pi}u\,d\theta\Big)r\,dr$ $=\int_0^\rho2\pi u(\mathbf x_0)\,r\,dr$ $=\pi\rho^2u(\mathbf x_0)$. ∎
The converse also holds (stated without proof): a continuous function that has the circle mean value property on all small circles is harmonic, and in particular of class $C^\infty$. We shall see this smoothness directly from Poisson's formula below.
Let $\Omega\subset\mathbb{R}^2$ be bounded and open, and $u\in C^2(\Omega)\cap C(\overline\Omega)$.
- (Weak) If $\Delta u\ge0$ in $\Omega$, then $\displaystyle\max_{\overline\Omega}u=\max_{\partial\Omega}u$. If $\Delta u\le0$, then $\min_{\overline\Omega}u=\min_{\partial\Omega}u$. In particular a harmonic $u$ satisfies $\min_{\partial\Omega}u\le u\le\max_{\partial\Omega}u$ in $\overline\Omega$.
- (Strong) If $\Omega$ is connected, $u$ is harmonic in $\Omega$ and $u$ attains its maximum (or minimum) over $\Omega$ at a point of $\Omega$, then $u$ is constant.
Proof. (1) $\overline\Omega$ is compact, so the continuous function $u$ attains a maximum on it. Fix $\varepsilon\gt0$ and put $v=u+\varepsilon(x^2+y^2)$; then $\Delta v=\Delta u+4\varepsilon\gt0$ in $\Omega$. Suppose $v$ attained its maximum over $\overline\Omega$ at an interior point $p=(p_1,p_2)$. Then $t\mapsto v(t,p_2)$ and $t\mapsto v(p_1,t)$ have interior local maxima at $t=p_1$, $t=p_2$, so $v_{xx}(p)\le0$ and $v_{yy}(p)\le0$, whence $\Delta v(p)\le0$ — a contradiction. Thus $\max_{\overline\Omega}v=\max_{\partial\Omega}v$. With $d=\max_{\overline\Omega}(x^2+y^2)$, $$\max_{\overline\Omega}u\le\max_{\overline\Omega}v=\max_{\partial\Omega}v\le\max_{\partial\Omega}u+\varepsilon d .$$ Let $\varepsilon\to0$; the reverse inequality is trivial. For $\Delta u\le0$ apply this to $-u$. A harmonic function satisfies both hypotheses.
(2) Let $M=\max_\Omega u=u(p)$ with $p\in\Omega$, and let $S=\{q\in\Omega:u(q)=M\}$. $S$ is non-empty and closed in $\Omega$ by continuity. It is also open: if $q\in S$ and $\overline B(q,\rho)\subset\Omega$, the area mean value property gives $0=M-u(q)=\frac1{\pi\rho^2}\iint_{B(q,\rho)}(M-u)\,dA$ with a continuous integrand $M-u\ge0$, so $u\equiv M$ on $B(q,\rho)$. A non-empty subset of a connected set that is both open and closed is the whole set, so $u\equiv M$. For the minimum apply this to $-u$. ∎
Let $\Omega$ be bounded, $F\in C(\Omega)$ and $g\in C(\partial\Omega)$. The Dirichlet problem $\Delta u=F$ in $\Omega$, $u=g$ on $\partial\Omega$, has at most one solution $u\in C^2(\Omega)\cap C(\overline\Omega)$. If $u_1,u_2$ are solutions with the same $F$ and boundary data $g_1,g_2$, then $$\max_{\overline\Omega}|u_1-u_2|\le\max_{\partial\Omega}|g_1-g_2|,$$ and $g_1\le g_2$ on $\partial\Omega$ implies $u_1\le u_2$ in $\overline\Omega$ (comparison principle).
Proof. $w=u_1-u_2$ is harmonic in $\Omega$, continuous on $\overline\Omega$, and equals $g_1-g_2$ on $\partial\Omega$. By Theorem 4.13(1), $w\le\max_{\partial\Omega}(g_1-g_2)\le\max_{\partial\Omega}|g_1-g_2|$ and $-w\le\max_{\partial\Omega}|g_1-g_2|$. If $g_1=g_2$ this gives $w\equiv0$ (uniqueness), and if $g_1\le g_2$ it gives $w\le0$. ∎
So the Dirichlet problem is well posed in Hadamard's sense once existence is known: at most one solution, and small changes of the boundary data change the solution by at most as much, uniformly. (A second proof of uniqueness, for solutions in $C^2(\overline\Omega)$, is the energy method: if $w$ is harmonic with $w=0$ on $\partial\Omega$, Theorem 4.11(1) with $v=u=w$ gives $\iint_\Omega|\nabla w|^2\,dA=0$, so $w$ is constant, hence $0$.) Boundedness of $\Omega$ is essential — see the pitfalls box.
Fourier Series: the Tool Behind Separation of Variables
When we separate variables in a rectangle or a disc, the boundary data must be expanded in the eigenfunctions of $X''+\lambda X=0$ — sines, cosines, or both. §2.3 proved that these eigenfunctions are orthogonal and stated that eigenfunction expansions converge. Here we collect the facts about Fourier series that every separation-of-variables solution relies on, with the proofs that matter for convergence of the solutions.
A $2L$-periodic function $f:\mathbb{R}\to\mathbb{R}$ is piecewise $C^1$ if each period contains only finitely many points at which $f$ or $f'$ fails to exist or to be continuous, and at each such point the one-sided limits of $f$ and $f'$ exist. Its Fourier coefficients and Fourier series are $$a_n=\frac1L\int_{-L}^{L}f(x)\cos\frac{n\pi x}{L}\,dx,\qquad b_n=\frac1L\int_{-L}^{L}f(x)\sin\frac{n\pi x}{L}\,dx,$$ $$f(x)\sim\frac{a_0}{2}+\sum_{n=1}^{\infty}\Big(a_n\cos\frac{n\pi x}{L}+b_n\sin\frac{n\pi x}{L}\Big),$$ with partial sums $S_Nf$. For $f$ defined on $[0,L]$ only, the Fourier sine series is the Fourier series of the odd $2L$-periodic extension, $b_n=\frac2L\int_0^Lf(x)\sin\frac{n\pi x}{L}\,dx$, and the Fourier cosine series that of the even extension, $a_n=\frac2L\int_0^Lf(x)\cos\frac{n\pi x}{L}\,dx$.
The formulas for the coefficients come from the orthogonality relations $\int_{-L}^{L}\cos\frac{m\pi x}L\cos\frac{n\pi x}L\,dx$ $=\int_{-L}^{L}\sin\frac{m\pi x}L\sin\frac{n\pi x}L\,dx$ $=L\,\delta_{mn}$ ($m,n\ge1$) and $\int_{-L}^{L}\cos\frac{m\pi x}L\sin\frac{n\pi x}L\,dx=0$ — the eigenfunctions of the periodic Sturm–Liouville problem of §2.3. The odd extension is continuous exactly when $f(0)=f(L)=0$; the even extension is continuous whenever $f$ is continuous on $[0,L]$. This single observation decides whether a sine series can converge uniformly.
Let $f$ be $2L$-periodic and piecewise $C^1$.
- (Dirichlet's theorem) For every $x$, $S_Nf(x)\to\tfrac12\big(f(x^+)+f(x^-)\big)$; in particular $S_Nf(x)\to f(x)$ wherever $f$ is continuous.
- (Uniform convergence) If $f$ is also continuous on $\mathbb{R}$, then $\sum_{n\ge1}\big(|a_n|+|b_n|\big)\lt\infty$ and $S_Nf\to f$ absolutely and uniformly on $\mathbb{R}$.
- (Parseval) For every $f$ square-integrable on a period, $\displaystyle\frac1L\int_{-L}^{L}f^2\,dx=\frac{a_0^2}2+\sum_{n=1}^{\infty}(a_n^2+b_n^2)$.
- (Smoothness and decay) If $f\in C^k(\mathbb{R})$, then $\sum n^{2k}(a_n^2+b_n^2)\lt\infty$, so $n^ka_n\to0$ and $n^kb_n\to0$. Conversely, if $f$ has a jump discontinuity, then $\sum(|a_n|+|b_n|)=\infty$.
Proof. (1), sketch. Inserting the coefficients and summing the cosines gives $S_Nf(x)=\frac1{2L}\int_{-L}^{L}f(x+s)\,D_N(s)\,ds$ with the Dirichlet kernel $D_N(s)=1+2\sum_{n=1}^N\cos\frac{n\pi s}{L}$ $=\dfrac{\sin\big((N+\frac12)\pi s/L\big)}{\sin\big(\pi s/(2L)\big)}$, which is even with $\frac1{2L}\int_0^LD_N=\frac12$. Hence $$S_Nf(x)-\tfrac12\big(f(x^+)+f(x^-)\big)=\frac1{2L}\int_0^L\Big[\frac{f(x+s)-f(x^+)}{\sin(\pi s/2L)}+\frac{f(x-s)-f(x^-)}{\sin(\pi s/2L)}\Big]\sin\Big(\big(N+\tfrac12\big)\frac{\pi s}{L}\Big)\,ds .$$ Because $f$ has one-sided derivatives at $x$, the bracket is bounded near $s=0$ and is therefore integrable on $[0,L]$; the Riemann–Lebesgue lemma ($\int h(s)\sin\lambda s\,ds\to0$ as $\lambda\to\infty$ for integrable $h$) makes the right side tend to $0$.
(2), complete. Let $f$ be continuous. On each subinterval where $f$ is $C^1$ integrate by parts; since $f$ is continuous and periodic the boundary terms cancel in pairs, and the Fourier coefficients of the piecewise continuous function $f'$ are $$a_n'=\frac{n\pi}{L}\,b_n,\qquad b_n'=-\frac{n\pi}{L}\,a_n .$$ Bessel's inequality for $f'$ (the best-approximation property of orthogonal expansions, §2.3) gives $\sum_n\big(\frac{n\pi}{L}\big)^2(a_n^2+b_n^2)\le\frac1L\int_{-L}^{L}f'^2\lt\infty$. By the Cauchy–Schwarz inequality and $(|a|+|b|)^2\le2(a^2+b^2)$, $$\sum_{n\ge1}\big(|a_n|+|b_n|\big)=\sum_{n\ge1}\frac1n\big(n|a_n|+n|b_n|\big)\le\Big(\sum_{n\ge1}\frac{2}{n^2}\Big)^{1/2}\Big(\sum_{n\ge1}n^2(a_n^2+b_n^2)\Big)^{1/2}\lt\infty .$$ Since $|a_n\cos+b_n\sin|\le|a_n|+|b_n|$, the Weierstrass M-test shows that $S_Nf$ converges uniformly to a continuous function $g$; by (1) its pointwise limit is $f$, so $g=f$.
(3) is the completeness of the trigonometric system (stated in §2.3). (4) Integrating by parts $k$ times as in (2) shows that the coefficients of $f^{(k)}$ are $\pm(n\pi/L)^k$ times $a_n$ or $b_n$; Bessel's inequality for $f^{(k)}$ gives the claim. If $\sum(|a_n|+|b_n|)\lt\infty$, the M-test makes $S_Nf$ converge uniformly to a continuous function, which by (1) agrees with $f$ at all but finitely many points per period; so $f$ cannot have a jump. ∎
Near a jump the partial sums do not converge uniformly: they overshoot on each side by about $8.95\%$ of the jump, however large $N$ is, the overshoot merely moving closer to the jump (the Gibbs phenomenon; the constant is $\frac1\pi\int_0^\pi\frac{\sin t}{t}\,dt-\frac12\approx0.0895$). Interactive 1 shows it on the edge of a plate. Continuity alone is not enough for (1): there are continuous periodic functions whose Fourier series diverge at a point (du Bois-Reymond), which is why "piecewise $C^1$" appears in every convergence statement of this chapter.
The Dirichlet Problem in a Rectangle
Separation of variables looks for solutions of the special form $u=X(x)Y(y)$ and then builds the general solution by superposition. It works when the domain is a "coordinate rectangle" for a coordinate system in which the equation separates, and when enough of the boundary conditions are homogeneous to produce a Sturm–Liouville problem.
- Split the data. If more than one side carries non-zero data, write $u=u_1+u_2+\cdots$, each $u_k$ carrying the data of one side and zero data on the others (the equation is linear, so the sum solves the full problem).
- Separate. Put $u=X(x)Y(y)$: $X''Y+XY''=0$, so $\dfrac{X''}{X}=-\dfrac{Y''}{Y}=-\lambda$, a constant, because the left side depends on $x$ only and the right on $y$ only.
- Solve the Sturm–Liouville problem in the variable with two homogeneous conditions (§2.3): $X''+\lambda X=0$ with $X(0)=X(a)=0$ gives $\lambda_n=(n\pi/a)^2$, $X_n=\sin\frac{n\pi x}a$; with $X'(0)=X'(a)=0$ it gives $\lambda_n=(n\pi/a)^2$, $n\ge0$, $X_n=\cos\frac{n\pi x}a$ — do not forget $\lambda_0=0$.
- Solve for $Y$ with the remaining homogeneous condition: $Y''=\lambda_nY$, choosing the combination of $\cosh$, $\sinh$ (or $1$, $y$ when $\lambda=0$) that satisfies it — $\sinh\frac{n\pi(b-y)}a$ vanishes at $y=b$.
- Superpose and match the non-homogeneous side with the Fourier coefficients of its data; then check the hypotheses that make the series converge (Theorem 4.16), and test the answer at a convenient point.
For the rectangle $R=(0,a)\times(0,b)$ with $u(x,0)=f(x)$ and $u=0$ on the other three sides, steps 2–5 give the separated solutions $\sin\frac{n\pi x}{a}\sinh\frac{n\pi(b-y)}{a}$ and the candidate solution in the next theorem.
Let $f$ be continuous and piecewise $C^1$ on $[0,a]$ with $f(0)=f(a)=0$, and let $b_n=\frac2a\int_0^af(x)\sin\frac{n\pi x}{a}\,dx$. Then $$u(x,y)=\sum_{n=1}^{\infty}b_n\,\frac{\sinh\big(n\pi(b-y)/a\big)}{\sinh(n\pi b/a)}\,\sin\frac{n\pi x}{a}$$ is the unique $u\in C^2(R)\cap C(\overline R)$ that is harmonic in $R$, equals $f(x)$ on the side $y=0$ and vanishes on the other three sides. Moreover $u\in C^\infty(R)$.
Proof. Write $\alpha_n=n\pi/a$ and $s_n(y)=\sinh(\alpha_n(b-y))/\sinh(\alpha_nb)$. Since $\sinh$ is increasing and positive on $(0,\infty)$, $0\le s_n(y)\le1$ for $0\le y\le b$. Its derivatives are $\pm\alpha_n^k$ times $\sinh$ or $\cosh$ of $\alpha_n(b-y)$, divided by $\sinh(\alpha_nb)$; using $\sinh t,\cosh t\le e^t$ and $\sinh(\alpha_nb)=\tfrac12e^{\alpha_nb}(1-e^{-2\alpha_nb})$ $\ge\tfrac12e^{\alpha_nb}(1-e^{-2\pi b/a})$ we get $$\big|s_n^{(k)}(y)\big|\le C\,\alpha_n^k\,e^{-\alpha_ny},\qquad C=\frac{2}{1-e^{-2\pi b/a}} .$$ Continuity on $\overline R$. The odd $2a$-periodic extension of $f$ is continuous (because $f(0)=f(a)=0$) and piecewise $C^1$, so $\sum|b_n|\lt\infty$ by Theorem 4.15(2). Each term is bounded by $|b_n|$ on $\overline R$, so the series converges uniformly there (M-test) and $u\in C(\overline R)$. On $y=0$ it is the sine series of $f$, which converges to $f$; on $x=0$, $x=a$ and $y=b$ every term vanishes.
Smoothness and harmonicity. Fix $y_0\gt0$. In $\{y\ge y_0\}$ any partial derivative of order $m$ of the $n$-th term is bounded by $|b_n|\,C\,\alpha_n^m e^{-\alpha_ny_0}$ $\le\big(\max_k|b_k|\big)C\,(n\pi/a)^me^{-n\pi y_0/a}$, and $\sum_nn^me^{-n\pi y_0/a}\lt\infty$ (ratio test). Hence the series may be differentiated term by term any number of times in $y\gt y_0$, so $u\in C^\infty$ there and $\Delta u=\sum b_n\,\Delta\big(s_n(y)\sin\alpha_nx\big)=0$, each separated term being harmonic. As $y_0$ was arbitrary, $u\in C^\infty(R)$ is harmonic. Uniqueness is Theorem 4.14. ∎
The factor $s_n(y)\approx e^{-n\pi y/a}$ is the whole story of elliptic smoothing: the $n$-th Fourier mode of the boundary data penetrates a distance of order $a/(n\pi)$ into the plate. Rough features of the data (large $n$) are felt only near the edge, and in the interior the solution is smooth even if $f$ is not. If $f(0)\ne0$ or $f(a)\ne0$ the data are discontinuous at a corner; the series still defines a bounded harmonic function in $R$ with the right values on the open sides, but it cannot be continuous at that corner, and its convergence near the corner is not uniform (Interactive 1 with $f\equiv1$). The general rectangle with data on all four sides is handled by superposition of four such problems.
The Dirichlet Problem in a Disc: Poisson's Integral Formula
In the disc $D_R=\{r\lt R\}$ we separate in polar coordinates. With $u=\mathcal R(r)\Theta(\theta)$, the polar Laplacian gives $r^2\mathcal R''\Theta+r\mathcal R'\Theta+\mathcal R\Theta''=0$, i.e. $$\frac{r^2\mathcal R''+r\mathcal R'}{\mathcal R}=-\frac{\Theta''}{\Theta}=\lambda .$$ The angular factor must be $2\pi$-periodic, so $\Theta''+\lambda\Theta=0$ is the periodic Sturm–Liouville problem of §2.3: $\lambda=n^2$ ($n=0,1,2,\dots$) with $\Theta=A\cos n\theta+B\sin n\theta$. The radial equation $r^2\mathcal R''+r\mathcal R'-n^2\mathcal R=0$ is an Euler–Cauchy equation (§2.1) with solutions $r^n,r^{-n}$ for $n\ge1$ and $1,\log r$ for $n=0$. In a disc that contains the origin, a solution must be bounded near $r=0$, which rules out $r^{-n}$ and $\log r$. So the separated solutions are exactly the harmonic polynomials $r^n\cos n\theta$, $r^n\sin n\theta$, and we expect $$u(r,\theta)=\frac{a_0}2+\sum_{n=1}^{\infty}\Big(\frac rR\Big)^n\big(a_n\cos n\theta+b_n\sin n\theta\big),$$ with $a_n,b_n$ the Fourier coefficients of the boundary data $f(\theta)=u(R,\theta)$.
Let $f$ be continuous and $2\pi$-periodic, with Fourier coefficients $a_n,b_n$. Define, for $0\le r\lt R$, $$u(r,\theta)=\frac1{2\pi}\int_{-\pi}^{\pi}P(r,\theta-\varphi)\,f(\varphi)\,d\varphi,\qquad P(r,\psi)=\frac{R^2-r^2}{R^2-2Rr\cos\psi+r^2},$$ and $u(R,\theta)=f(\theta)$. Then $u$ equals the series above in $D_R$, is harmonic there, and is continuous on $\overline{D_R}$; it is the unique such solution of the Dirichlet problem. The Poisson kernel $P$ satisfies: (a) $P(r,\psi)\gt0$; (b) $\frac1{2\pi}\int_{-\pi}^{\pi}P(r,\psi)\,d\psi=1$; (c) for every $\delta\in(0,\pi)$, $\displaystyle\max_{\delta\le|\psi|\le\pi}P(r,\psi)\to0$ as $r\to R^-$.
Proof. The series is harmonic. $|a_n|,|b_n|\le\frac1\pi\int|f|\le2\max|f|=:2M$. In Cartesian coordinates $r^n\cos n\theta=\operatorname{Re}z^n$ and $r^n\sin n\theta=\operatorname{Im}z^n$ are harmonic polynomials whose $k$-th order partial derivatives are bounded by $n^k|z|^{n-k}$. On $|z|\le\rho\lt R$ the differentiated series is therefore dominated by $\sum 4M\,n^k\rho^{n-k}R^{-n}\lt\infty$, so it may be differentiated term by term: the series is $C^\infty$ and harmonic in $D_R$.
The series equals the Poisson integral. Since $a_n\cos n\theta+b_n\sin n\theta=\frac1\pi\int_{-\pi}^{\pi}f(\varphi)\cos n(\theta-\varphi)\,d\varphi$, and for fixed $r\lt R$ the series $\sum(r/R)^nf(\varphi)\cos n(\theta-\varphi)$ converges uniformly in $\varphi$, summation and integration may be interchanged: $$u(r,\theta)=\frac1{2\pi}\int_{-\pi}^{\pi}f(\varphi)\Big[1+2\sum_{n\ge1}\rho^n\cos n(\theta-\varphi)\Big]d\varphi,\qquad \rho=\frac rR .$$ With $w=\rho e^{i\psi}$, $1+2\sum_{n\ge1}\rho^n\cos n\psi=\operatorname{Re}\dfrac{1+w}{1-w}$ $=\dfrac{1-\rho^2}{1-2\rho\cos\psi+\rho^2}$, and multiplying numerator and denominator by $R^2$ gives $P(r,\psi)$.
Kernel properties. (a) The denominator is $|R-re^{i\psi}|^2\gt0$ and $R^2-r^2\gt0$. (b) Integrate the series for $P$ term by term: only the constant $1$ survives. (c) For $\delta\le|\psi|\le\pi$ we have $\cos\psi\le\cos\delta$, so $R^2-2Rr\cos\psi+r^2\ge R^2-2Rr\cos\delta+r^2$ $=(r-R\cos\delta)^2+R^2\sin^2\delta$ $\ge R^2\sin^2\delta$, and $P\le(R^2-r^2)/(R^2\sin^2\delta)\to0$.
Boundary values. Fix $\theta_0$ and $\varepsilon\gt0$. By uniform continuity choose $\delta\in(0,\frac\pi2)$ with $|f(\varphi)-f(\theta_0)|\lt\varepsilon$ whenever $|\varphi-\theta_0|\lt2\delta$. By (b), for $|\theta-\theta_0|\lt\delta$, $$|u(r,\theta)-f(\theta_0)|=\Big|\frac1{2\pi}\int_{-\pi}^{\pi}P(r,\psi)\big(f(\theta-\psi)-f(\theta_0)\big)\,d\psi\Big|\le\varepsilon+2M\max_{\delta\le|\psi|\le\pi}P(r,\psi),$$ splitting the integral into $|\psi|\lt\delta$ (where $|\theta-\psi-\theta_0|\lt2\delta$, and (a), (b) bound that part by $\varepsilon$) and the rest. By (c) the right side is less than $2\varepsilon$ for $r$ close to $R$. Hence $u(r,\theta)\to f(\theta_0)$ as $(r,\theta)\to(R,\theta_0)$, and together with the continuity of $f$ this shows $u\in C(\overline{D_R})$. Uniqueness is Theorem 4.14. ∎
The formula has a clear meaning: $u$ at an interior point is a weighted average of the boundary values, with positive weights of total mass $1$ that concentrate at the nearest boundary point as the point approaches the circle (Interactive 2). Several facts follow at once. At $r=0$, $P\equiv1$: the mean value property again. Since $\frac{R-r}{R+r}\le P(r,\psi)\le\frac{R+r}{R-r}$, a harmonic $u\ge0$ satisfies Harnack's inequality $\frac{R-r}{R+r}u(0)\le u(r,\theta)\le\frac{R+r}{R-r}u(0)$ (Exercise IV.4). And since a harmonic function in any domain equals its own Poisson integral on every small disc (by uniqueness), every harmonic function is $C^\infty$ — indeed real-analytic, being locally the sum of a power series in $x$ and $y$. In other geometries keep the radial solutions that the boundedness argument discarded: outside a disc ($r\gt R$, $u$ bounded) the modes are $(R/r)^n$; in an annulus all of $1,\log r,r^{\pm n}$ are needed.
The Neumann Problem and the Compatibility Condition
For Poisson's equation $\Delta u=F$ in $\Omega$ the boundary condition may prescribe the value $u=g$ (Dirichlet problem: fixed temperature, grounded conductor), the normal derivative $\partial u/\partial n=g$ (Neumann problem: prescribed heat flux; $g=0$ is an insulated boundary), or a combination $\partial u/\partial n+hu=g$ with $h\gt0$ (Robin problem: Newton's law of cooling).
- Let $\Omega$ be as in Theorem 4.11. If $u\in C^2(\overline\Omega)$ solves $\Delta u=F$ in $\Omega$, $\partial u/\partial n=g$ on $\partial\Omega$, then $$\iint_\Omega F\,dA=\oint_{\partial\Omega}g\,ds\qquad\text{(compatibility condition)}.$$
- If $\Omega$ is connected, two solutions in $C^2(\overline\Omega)$ of the Neumann problem differ by a constant. The Robin problem ($h\gt0$ continuous) has at most one solution in $C^2(\overline\Omega)$.
- In the disc $D_R$ let $g$ be continuous, piecewise $C^1$ and $2\pi$-periodic, with Fourier coefficients $\alpha_n,\beta_n$. The problem $\Delta u=0$ in $D_R$, $u_r(R,\theta)=g(\theta)$ has a solution $u\in C^2(D_R)\cap C^1(\overline{D_R})$ if and only if $\int_{-\pi}^{\pi}g\,d\theta=0$, and then all solutions are $$u(r,\theta)=C+\sum_{n=1}^{\infty}\frac Rn\Big(\frac rR\Big)^n\big(\alpha_n\cos n\theta+\beta_n\sin n\theta\big).$$
Proof. (1) Theorem 4.11(1) with $v\equiv1$. (2) The difference $w$ of two solutions satisfies $\Delta w=0$, $\partial w/\partial n=0$; Theorem 4.11(1) with $v=u=w$ gives $\iint_\Omega|\nabla w|^2\,dA=\oint w\,\partial_nw\,ds=0$, so $\nabla w\equiv0$ and $w$ is constant on the connected set $\Omega$. For Robin data, $\partial_nw=-hw$ on the boundary and the same identity reads $\iint|\nabla w|^2+\oint hw^2=0$; both terms are non-negative, so $w$ is constant and $\oint hw^2=0$ forces the constant to be $0$.
(3) Necessity: apply (1) with $F=0$ on the disc of radius $\rho\lt R$ and let $\rho\to R$ (using continuity of $u_r$ up to the boundary): $0=\oint_{r=\rho}u_r\,ds\to R\int_{-\pi}^{\pi}g\,d\theta$, i.e. $\alpha_0=0$. Sufficiency: by Theorem 4.15(2), $\sum(|\alpha_n|+|\beta_n|)\lt\infty$. The series for $u$, for $u_r=\sum(r/R)^{n-1}(\alpha_n\cos n\theta+\beta_n\sin n\theta)$ and for $\frac1ru_\theta$ are then dominated by $\sum R(|\alpha_n|+|\beta_n|)$ and $\sum(|\alpha_n|+|\beta_n|)$, so they converge uniformly on $\overline{D_R}$ and $u\in C^1(\overline{D_R})$; inside, $u$ is harmonic as in Theorem 4.17. At $r=R$, $u_r=\sum(\alpha_n\cos n\theta+\beta_n\sin n\theta)=g(\theta)-\frac{\alpha_0}2=g(\theta)$. Any other solution differs from this one by a constant, by (2) applied on smaller discs. ∎
The compatibility condition is a conservation law: a plate cannot reach a steady state unless the net heat flowing in through its edge balances the heat produced inside. For the Dirichlet problem there is no such condition, because the boundary temperatures can always absorb whatever flux is needed. Note also the factor $R/n$: the Neumann solution is smoother than the data, by one derivative.
- Unbounded domains lose uniqueness. $u=y$ is harmonic in the upper half-plane, continuous up to the axis and $0$ there, yet not $0$; $u=e^x\sin y$ vanishes on both edges of the strip $0\lt y\lt\pi$. Theorem 4.13 needs a bounded domain; on unbounded ones one adds a condition such as boundedness of $u$.
- Sub- versus superharmonic. $\Delta u\ge0$ gives a maximum principle only: $u=x^2+y^2$ has $\Delta u=4$ and its minimum at the interior point $0$. Likewise $u=\frac14(1-x^2-y^2)$ solves $\Delta u=-1$ with zero boundary values and has an interior maximum.
- Products and powers. $x$ is harmonic but $x\cdot x=x^2$ is not; $x$ and $x^2-y^2$ are harmonic but $\Delta\big(x(x^2-y^2)\big)=4x$. If $u$ is harmonic, $u^2$ is subharmonic ($\Delta u^2=2|\nabla u|^2\ge0$), not harmonic unless $u$ is constant.
- Isolated boundary points can be ignored by harmonic functions. In the punctured disc $0\lt r\lt1$ there is no harmonic $u$, continuous on the closed disc, with $u=0$ on $r=1$ and $u(0)=1$ (Zaremba; Exercise IV.6). $\log r$ is harmonic there but unbounded, and fails the mean value property about $0$.
- Discarding $r^{-n}$ and $\log r$ is legitimate only in a disc containing the origin. In an annulus or outside a disc these modes are needed (Example 6, Exercise III.7–III.8).
- Neumann problems need compatibility, and lose uniqueness. $u_r=\cos^2\theta$ on the unit circle has no harmonic solution; when a solution exists, adding a constant gives another. Do not forget the mode $\lambda=0$ (constant, or $1-y$ in Example 4) with Neumann sides.
- The Cauchy problem for Laplace's equation is ill-posed. $u_n=n^{-2}\sin nx\,\sinh ny$ has $u_n(x,0)=0$ and $\partial_yu_n(x,0)=\frac{\sin nx}{n}\to0$ uniformly, yet $u_n(x,1)=n^{-2}\sinh n\sin nx$ is unbounded (Hadamard).
- Fourier series of continuous functions. Continuity does not guarantee pointwise convergence; piecewise $C^1$ does. At a jump the series converges to the average, never uniformly, with a persistent overshoot of about $9\%$ of the jump.
- Corner compatibility. In Theorem 4.16 the hypothesis $f(0)=f(a)=0$ is not cosmetic: for $f\equiv1$ the solution is discontinuous at the corners $(0,0)$ and $(a,0)$, and $\sum|b_n|=\infty$.
- Only the centre sees the plain average. For a point $P\ne0$ the boundary values must be weighted by the Poisson kernel; the plain average of $f$ over the circle gives $u(0)$ and nothing else.
Exercises
- 1 Which are harmonic (on their natural domain)? (a) $x^3-3xy^2$; (b) $x^2+y^2$; (c) $\log(x^2+y^2)$; (d) $\sin x\cosh y$; (e) $x^3y-xy^3$; (f) $e^x\sin y+x^2$.
- 2 Find all harmonic polynomials $u=ax^2+bxy+cy^2+dx+ey+f$, and the value of $a$ for which $x^3+axy^2$ is harmonic.
- 3 Verify the polar form of $\Delta$ on $u=r^n\cos n\theta$, and find all radial harmonic functions $u=u(r)$ on $\mathbb{R}^2\setminus\{0\}$.
- 4 $u$ is harmonic in the unit disc, continuous on its closure, and $u(1,\theta)=2+\cos\theta-3\sin2\theta$. Find $u(0,0)$ and $u(\tfrac12,0)$.
- 5 State and prove the minimum principle for harmonic functions, and deduce that a harmonic function on a bounded domain that is continuous on $\overline\Omega$ and vanishes on $\partial\Omega$ is identically zero.
- 6 Show that $u=\tfrac14(1-x^2-y^2)$ solves $\Delta u=-1$ in the unit disc with $u=0$ on the circle. Why is its interior maximum not a contradiction?
- 7 $u$ is harmonic in the unit disc $D$, continuous on $\overline D$, and $|u|\le1$ on $\partial D$. Prove $|u|\le1$ in $D$, and that $|u(\mathbf x_0)|=1$ at one interior point forces $u$ to be constant.
- 8 Verify the mean value property for $u=e^x\cos y$ on the circle of radius $\rho$ about the origin, i.e. show $\frac1{2\pi}\int_{-\pi}^{\pi}e^{\rho\cos\theta}\cos(\rho\sin\theta)\,d\theta=1$ for every $\rho\gt0$.
- 1 Find the Fourier series of the $2\pi$-periodic function with $f(x)=|x|$ on $[-\pi,\pi]$. Does it converge uniformly? Deduce $\sum_{n\text{ odd}}\frac1{n^2}=\frac{\pi^2}8$.
- 2 Find the sine series of $x(\pi-x)$ on $(0,\pi)$ and deduce $1-\frac1{3^3}+\frac1{5^3}-\cdots=\frac{\pi^3}{32}$.
- 3 Find the cosine series of $\sin x$ on $(0,\pi)$.
- 4 Apply Parseval's identity to II.1 and deduce $\sum_{n\ge1}\frac1{n^4}=\frac{\pi^4}{90}$.
- 5 Let $f(x)=e^x$ on $(-\pi,\pi)$, extended $2\pi$-periodically. To what does its Fourier series converge at $x=0$ and at $x=\pi$?
- 6 Find the Fourier series of $x^2$ on $[-\pi,\pi]$ and deduce both $\sum\frac1{n^2}=\frac{\pi^2}6$ and $\sum\frac{(-1)^{n+1}}{n^2}=\frac{\pi^2}{12}$.
- 7 Without computing every coefficient, predict how fast the coefficients decay for the $2\pi$-periodic extensions of (a) the square wave $\operatorname{sgn}x$; (b) $|x|$; (c) $x(\pi^2-x^2)$, all on $(-\pi,\pi)$. Then verify (c): $b_n=\frac{12(-1)^{n+1}}{n^3}$.
- 1 Solve $\Delta u=0$ in $(0,\pi)\times(0,\pi)$ with $u=0$ on $x=0$, $x=\pi$, $y=0$ and $u(x,\pi)=\sin x+2\sin3x$.
- 2 Write the series solution in $(0,a)\times(0,b)$ with $u(0,y)=g(y)$ and $u=0$ on the other three sides.
- 3 Solve $\Delta u=0$ in $(0,\pi)\times(0,1)$ with $u(x,0)=u(x,1)=0$, $u(0,y)=0$, $u(\pi,y)=y(1-y)$.
- 4 Solve $\Delta u=0$ in $(0,\pi)\times(0,1)$ with $u_x(0,y)=u_x(\pi,y)=0$, $u(x,0)=0$, $u(x,1)=\cos^2x$.
- 5 Solve the Dirichlet problem in the unit disc with $u(1,\theta)=\cos^4\theta$. What is $u(0,0)$?
- 6 Solve the Dirichlet problem in the disc $x^2+y^2\lt4$ with $u=x^2-y+1$ on the boundary; express $u$ in $x,y$.
- 7 Find the bounded harmonic function in $r\gt1$ with $u(1,\theta)=1+2\cos\theta$.
- 8 Find the harmonic function in the annulus $a\lt r\lt b$ with $u=T_1$ on $r=a$ and $u=T_2$ on $r=b$ (constants).
- 9 For the unit disc find the largest and smallest values of the Poisson kernel $P(\tfrac12,\psi)$, check that its average is $1$, and deduce: if $u\ge0$ is harmonic in $D$ and continuous on $\overline D$, then $\tfrac13u(0)\le u\le3u(0)$ on the circle $r=\tfrac12$.
- 10 Modelling. A thin circular plate of radius $10\ \text{cm}$ has its upper half-edge held at $50\,^\circ\text{C}$ and its lower half-edge at $10\,^\circ\text{C}$, with insulated faces. Find the steady temperature at the centre and at the point $5\ \text{cm}$ directly above the centre.
- 1 Solve $\Delta u=0$ in the unit disc with $u_r(1,\theta)=\sin\theta+\cos2\theta$, or show there is no solution.
- 2 For which constants $a$ does $\Delta u=0$ in the unit disc, $u_r(1,\theta)=\cos^2\theta-a$ have a solution? Find it.
- 3 Show that $\Delta u=x$ in the square $(0,1)^2$ with $\partial u/\partial n=0$ on the boundary has no solution, and find a solution of $\Delta u=x-\frac12$ with the same boundary condition.
- 4 (Harnack) Prove that if $u\ge0$ is harmonic in $D_R$ and continuous on $\overline{D_R}$, then $\frac{R-r}{R+r}u(0)\le u(r,\theta)\le\frac{R+r}{R-r}u(0)$.
- 5 (Liouville) Deduce from IV.4 that a harmonic function on all of $\mathbb{R}^2$ that is bounded below is constant.
- 6 (Zaremba) Prove that there is no $u$ harmonic in $0\lt r\lt1$, continuous on $r\le1$, with $u=0$ on $r=1$ and $u(0)=1$. Hint: compare $u$ with $\varepsilon\log r$. Explain how the same idea justifies the use of the maximum principle in Example 3.
- 7 (Hadamard) Show that $u_n=n^{-2}\sin nx\sinh ny$ solves Laplace's equation with Cauchy data on $y=0$ that tend to zero uniformly, while $\sup_x|u_n(x,1)|\to\infty$. What does this say about the Cauchy problem for elliptic equations?
E1. CSIR Part B GATE MA Let $u$ be harmonic in the unit disc, continuous on its closure, with $u(\cos\theta,\sin\theta)=\sin^2\theta+\cos\theta$. Then $u(\tfrac12,0)$ equals (A) $\tfrac12$; (B) $\tfrac78$; (C) $\tfrac98$; (D) $1$.
E2. CSIR Part B The Neumann problem $\Delta u=k$ in the unit disc, $\partial u/\partial n=1$ on the unit circle, has a solution if and only if (A) $k=1$; (B) $k=2$; (C) $k=\pi$; (D) for every real $k$.
E3. CSIR Part B Let $u$ be the bounded solution of $\Delta u=0$ in the half-strip $0\lt x\lt\pi$, $y\gt0$, with $u(0,y)=u(\pi,y)=0$ and $u(x,0)=\sin2x$. Then $u(\tfrac\pi4,\log2)$ is (A) $\tfrac14$; (B) $\tfrac12$; (C) $\tfrac1{16}$; (D) $0$.
E4. CSIR Part C Let $u$ be harmonic in the unit disc $D$, continuous on $\overline D$, with $u(\cos\theta,\sin\theta)=|\cos\theta|$. Which of the following are true? (One or more options may be correct.) (A) $u(0,0)=\frac2\pi$. (B) $0\lt u\lt1$ in $D$. (C) $u(\tfrac12,0)=u(0,\tfrac12)$. (D) $u(-x,y)=u(x,y)$ for all $(x,y)\in D$.
E5. CSIR Part C Which of the following statements are true? (A) Every bounded harmonic function on $\mathbb{R}^2$ is constant. (B) If $u$ is harmonic in the upper half-plane, continuous on its closure and $u=0$ on the real axis, then $u\equiv0$. (C) A non-constant harmonic function on a domain has no local maximum. (D) If $u$ is harmonic, so is $u^2$.
E6. CSIR Part C GATE MA Let $u$ solve $\Delta u=0$ in $R=(0,\pi)\times(0,1)$, $u(0,y)=u(\pi,y)=u(x,1)=0$, $u(x,0)=\sin2x$, with $u\in C^2(R)\cap C(\overline R)$. Which of the following are true? (A) $u(\tfrac\pi4,\tfrac12)=\dfrac{1}{2\cosh1}$. (B) The maximum of $u$ over $\overline R$ is attained at an interior point. (C) $u(\tfrac\pi2,y)=0$ for $0\le y\le1$. (D) The function $\dfrac{\sinh2y}{\sinh2}\sin2x$ satisfies the same four boundary conditions.
Suggested plan — 3 lectures × 60 min.
- Harmonic functions. Open with the steady-plate experiment and the Hadamard example (pitfall 7) to show why boundary data are the right data. Definition 4.6, the list of harmonic functions from $z^n$; Theorem 4.11 (two lines from the divergence theorem); Theorem 4.12 with the $m'(r)=0$ proof; Theorem 4.13 — do the $\varepsilon(x^2+y^2)$ trick slowly, it reappears for the heat equation in §4.3. Theorem 4.14 and Example 1 on the board. Finish with pitfall 1 ($u=y$).
- Fourier series and the rectangle. Definition 4.7 and the odd/even-extension remark; Theorem 4.15 — prove (2) fully (it is short and is the engine of every later convergence proof), sketch (1). Example 2. Then the separation strategy, Theorem 4.16 with its proof, and Examples 3 and 4. Project Interactive 1: first the smooth tent (uniform convergence, interior settles after 3–4 modes), then $f\equiv1$ (Gibbs at the edge, corners).
- Disc and Neumann. Polar separation (emphasise why $r^{-n}$, $\log r$ go), Theorem 4.17 and the approximate-identity argument; project Interactive 2 and ask the class to predict $u(P)$ before reading it off. Examples 5–6. Theorem 4.18 and Example 7. End with E2 and E4 live.
Discussion questions. (1) The maximum principle says a steady temperature cannot have a hot spot in the interior. Explain this physically, and say what changes when there is a heat source ($\Delta u=-F$, $F\gt0$). (2) Why does a Neumann problem need a compatibility condition while a Dirichlet problem does not? What is the analogue for the matrix equation $Ax=b$ with singular symmetric $A$? (3) In Example 3 the centre value $\frac14$ came from symmetry. Which other points of the square can be computed exactly by the same trick?
Misconceptions to watch for. Applying the maximum principle on unbounded domains; using the plain mean of the boundary data for a point other than the centre; forgetting $\lambda=0$ with Neumann sides; keeping $r^{-n}$ in a disc or discarding it in an annulus; assuming a Fourier series converges uniformly whenever $f$ is continuous on $[0,L]$ (the periodic extension must be continuous); writing $\sinh(n\pi y/a)$ when the zero condition is at $y=b$; ignoring compatibility in Neumann problems.
Suggested homework. I(1, 4, 5, 7), II(1, 2, 4, 7), III(1, 3, 4, 6, 7, 10), IV(1, 3, 4, 6); Exam corner E1, E4, E6.
Research question. Can a random walk solve the Dirichlet problem? Start a walker at an interior point, let it wander until it first hits the boundary, and record the boundary value there. Is the average of the recorded values the harmonic function with those boundary values — and how many walkers do we need?
Why it matters. Kakutani (1944) proved that the solution of the Dirichlet problem at $\mathbf x$ is the expected boundary value at the exit point of Brownian motion started at $\mathbf x$; the Poisson kernel is exactly the density of that exit point on a circle. Monte Carlo methods built on this idea need no mesh: the "walk on spheres" algorithm is used today in computer graphics and geometry processing to solve Laplace's equation on very complicated shapes, and random-walk models underlie groundwater and electrostatic simulations in engineering.
What to do.
- On the grid of the unit square with spacing $h=\frac1{20}$, show that a grid function satisfies the discrete mean value property $u_{i,j}=\frac14(u_{i+1,j}+u_{i-1,j}+u_{i,j+1}+u_{i,j-1})$ exactly when the five-point difference quotient approximating $\Delta u$ vanishes. Prove the discrete maximum principle.
- Solve the discrete problem of Example 3 (top edge $1$, other edges $0$) by Gauss–Seidel iteration (§5.2) and compare the centre value with $\frac14$.
- Simulate $N=10^2,10^3,10^4,10^5$ simple random walks from the centre and estimate the probability of exiting through the top edge. Plot the error against $N$ on log–log axes. What slope do you see, and why?
- Repeat from the point $(0.5,0.8)$ and compare with the series of Example 3.
Tools: Python with NumPy (or any language with a random number generator); a spreadsheet suffices for step 2.
Hand in: A two-page note with the proof of the discrete maximum principle, a table of Monte Carlo estimates with standard errors, the log–log error plot, and one paragraph comparing the cost of the three methods (series, Gauss–Seidel, random walks).
Going further. Read about the walk-on-spheres method (Muller, 1956): instead of grid steps, jump to a uniformly random point on the largest circle about the current point that fits in the domain. Why is that legitimate? (Hint: Theorem 4.12.)
🧪 Self-check quiz
Q1. Which function is harmonic in $\mathbb{R}^2$?
Q2. $u$ is harmonic in the unit disc, continuous on its closure, and $u=1+\sin^2\theta$ on the circle. Then $u(0,0)=$
Q3. A necessary condition for $\Delta u=0$ in a bounded domain $\Omega$, $\partial u/\partial n=g$ on $\partial\Omega$, to have a solution is
Q4. Separating variables for the Dirichlet problem in a disc centred at the origin, the solutions $r^{-n}\cos n\theta$ and $\log r$ are discarded because
Q5. The Fourier series of the $2\pi$-periodic square wave ($-1$ on $(-\pi,0)$, $1$ on $(0,\pi)$) at $x=0$ converges to