Chapter 4 · Second-Order Partial Differential Equations

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

📘 Definition 4.6 — Laplace's and Poisson's equations; harmonic functions

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.

📐 Theorem 4.11 — Green's identities; the flux of a harmonic function

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$.

  1. (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$.
  2. (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$.
  3. (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.

📐 Theorem 4.12 — Mean value property

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.

📐 Theorem 4.13 — Weak and strong maximum principles

Let $\Omega\subset\mathbb{R}^2$ be bounded and open, and $u\in C^2(\Omega)\cap C(\overline\Omega)$.

  1. (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$.
  2. (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$. ∎

📐 Theorem 4.14 — Uniqueness and continuous dependence for the Dirichlet problem

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.

✏️ Example 1 — Mean value and maximum principle without solving
Let $D$ be the unit disc. (a) $u$ is harmonic in $D$, continuous on $\overline D$, and $u(\cos\theta,\sin\theta)=3+\sin\theta+2\cos^2\theta$. Find $u(0,0)$ and the best constants $m,M$ with $m\lt u\lt M$ in $D$. (b) Is there a function harmonic in $D$, continuous on $\overline D$, equal to $x^2$ on $\partial D$ and with $u(0,0)=1$? (c) Show that $u=e^x\cos y$ has no local maximum or minimum anywhere in $\mathbb{R}^2$.
(a) Centre By Theorem 4.12 (letting $\rho\to1$, using continuity on $\overline D$), $u(0,0)=\frac1{2\pi}\int_{-\pi}^{\pi}(3+\sin\theta+2\cos^2\theta)\,d\theta=3+0+1=4$.
(a) Bounds With $s=\sin\theta\in[-1,1]$ the data are $3+s+2(1-s^2)=5+s-2s^2$, a downward parabola in $s$ with vertex at $s=\tfrac14$: maximum $5+\tfrac14-\tfrac18=\tfrac{41}{8}$, minimum at $s=-1$: $2$. By Theorem 4.13, $2\le u\le\tfrac{41}8$ on $\overline D$; as $u$ is not constant ($u(0,0)=4$ differs from the boundary value $2$ at $\theta=-\tfrac\pi2$), the strong principle makes both inequalities strict inside: $m=2$, $M=\tfrac{41}8$, and these cannot be improved because $u$ approaches both values at the boundary.
(b) No Any such function has $u(0,0)=\frac1{2\pi}\int\cos^2\theta\,d\theta=\tfrac12\ne1$. (The solution is $u=\tfrac12+\tfrac12(x^2-y^2)$: harmonic, and on the circle $\tfrac12+\tfrac12(x^2-y^2)=\tfrac12(x^2+y^2)+\tfrac12(x^2-y^2)=x^2$.)
(c) $u=\operatorname{Re}e^{z}$ is harmonic. If it had a local maximum at $p$, it would attain its maximum over a small disc $B(p,\rho)$ at the centre, so by Theorem 4.13(2) it would be constant on that disc — but $u_x=e^x\cos y$ and $u_y=-e^x\sin y$ never vanish together. The same argument applied to $-u$ excludes minima. (In general: a non-constant harmonic function has no local extrema at all.)

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.

📘 Definition 4.7 — Fourier series; sine and cosine series; piecewise $C^1$ functions

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.

📐 Theorem 4.15 — Convergence of Fourier series

Let $f$ be $2L$-periodic and piecewise $C^1$.

  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.
  2. (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}$.
  3. (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)$.
  4. (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.

✏️ Example 2 — One Fourier series, three classical sums
Find the Fourier series of the $2\pi$-periodic function with $f(x)=x$ on $(-\pi,\pi)$. Decide where it converges and to what, and deduce (a) $1-\tfrac13+\tfrac15-\dots=\tfrac\pi4$; (b) $\sum_{n\ge1}\frac1{n^2}=\frac{\pi^2}6$. Also find the sine series of $f\equiv1$ on $(0,\pi)$.
Coefficients $f$ is odd, so $a_n=0$. By parts, $b_n=\frac1\pi\int_{-\pi}^{\pi}x\sin nx\,dx=\frac2\pi\Big[-\frac{x\cos nx}{n}\Big]_0^\pi+\frac2{\pi n}\int_0^\pi\cos nx\,dx=\frac{2(-1)^{n+1}}{n}$. So $$f(x)\sim2\Big(\sin x-\frac{\sin2x}2+\frac{\sin3x}3-\cdots\Big).$$
Convergence The periodic extension is piecewise $C^1$ with jumps at $x=\pm\pi,\pm3\pi,\dots$. By Theorem 4.15(1) the series converges to $x$ for $|x|\lt\pi$ and to $\tfrac12(\pi+(-\pi))=0$ at $x=\pm\pi$ (every term vanishes there — consistent). The convergence is not uniform on $[-\pi,\pi]$, and indeed $\sum|b_n|=\sum\frac2n=\infty$, as Theorem 4.15(4) predicts for a function with a jump.
(a) At $x=\frac\pi2$: $\sin\frac{n\pi}2$ is $0$ for even $n$ and $(-1)^{k}$ for $n=2k+1$, so $\frac\pi2=2\big(1-\frac13+\frac15-\cdots\big)$.
(b) Parseval with $L=\pi$: $\frac1\pi\int_{-\pi}^{\pi}x^2\,dx=\frac{2\pi^2}3=\sum_n\frac{4}{n^2}$, so $\sum\frac1{n^2}=\frac{\pi^2}6$.
Sine series of 1 $b_n=\frac2\pi\int_0^\pi\sin nx\,dx=\frac{2(1-(-1)^n)}{n\pi}$, i.e. $\frac4{n\pi}$ for odd $n$ and $0$ for even $n$: $1\sim\frac4\pi\big(\sin x+\frac{\sin3x}3+\frac{\sin5x}5+\cdots\big)$ on $(0,\pi)$. The odd extension (a square wave) jumps at $0$ and $\pi$, where the series gives $0$; this is the series behind the hot-edge plate of Example 3.

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.

🧭 Problem-solving strategy — separation of variables for $\Delta u=0$
  1. 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).
  2. 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.
  3. 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$.
  4. 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$.
  5. 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.

📐 Theorem 4.16 — Dirichlet problem in a rectangle

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.

✏️ Example 3 — A plate with one hot edge
The square plate $0\le x,y\le1$ has its top edge $y=1$ at temperature $1$ and the other three edges at $0$. Find the steady temperature as a series, and prove that the temperature at the centre is exactly $\tfrac14$.
Separate The sides $x=0,1$ are homogeneous, so $X_n=\sin n\pi x$, and $Y''=n^2\pi^2Y$ with $Y(0)=0$ gives $Y_n=\sinh n\pi y$. Matching $u(x,1)=1$ with the sine series of $1$ (Example 2 with $L=1$): $$u(x,y)=\sum_{n\text{ odd}}\frac{4}{n\pi}\,\frac{\sinh n\pi y}{\sinh n\pi}\,\sin n\pi x .$$
Centre by series At $(\tfrac12,\tfrac12)$, $\sinh\frac{n\pi}2/\sinh n\pi=\frac1{2\cosh(n\pi/2)}$ and $\sin\frac{n\pi}2=(-1)^{(n-1)/2}$: $$u(\tfrac12,\tfrac12)=\frac2\pi\Big(\frac{1}{\cosh\frac\pi2}-\frac{1}{3\cosh\frac{3\pi}2}+\frac1{5\cosh\frac{5\pi}2}-\cdots\Big)=0.25372-0.00381+0.00010-\cdots .$$ The terms fall off like $e^{-n\pi/2}$; summing gives $0.250000$ to six decimals.
Exactly ¼ Let $u_1=u$ and let $u_2,u_3,u_4$ be the solutions with the hot edge on the right, bottom and left side, obtained from $u$ by rotating the square through $90^\circ$, $180^\circ$, $270^\circ$ about its centre (the Laplacian is rotation-invariant). All four take the same value at the centre. Their sum $w$ is a bounded harmonic function equal to $1$ on the boundary except at the four corners. The maximum principle still applies to bounded harmonic functions that are continuous on $\overline R$ except at finitely many boundary points (Exercise IV.6 proves this with the harmonic function $\log|\mathbf x-\mathbf p|$), so $w\equiv1$ and $4\,u(\tfrac12,\tfrac12)=1$.
Physics A plate of side $1\ \text{m}$ with one edge at $100\,^\circ\text{C}$ and three at $0\,^\circ\text{C}$ has centre temperature $25\,^\circ\text{C}$, whatever its material, once the steady state is reached.
✏️ Example 4 — Insulated sides: the eigenvalue $\lambda=0$ matters
Solve $\Delta u=0$ in $(0,\pi)\times(0,1)$ with $u_x(0,y)=u_x(\pi,y)=0$ (insulated sides), $u(x,1)=0$ and $u(x,0)=x$. Show that $u(\tfrac\pi2,\tfrac12)=\tfrac\pi4$ exactly.
SL problem $X''+\lambda X=0$, $X'(0)=X'(\pi)=0$: eigenvalues $\lambda_n=n^2$, $n=0,1,2,\dots$, eigenfunctions $\cos nx$ — including the constant $X_0=1$.
Y-factors For $n\ge1$: $Y''=n^2Y$, $Y(1)=0$: $Y_n=\sinh n(1-y)$. For $n=0$: $Y''=0$, $Y(1)=0$: $Y_0=1-y$. Forgetting this linear mode would make the problem unsolvable for any data with non-zero mean.
Match Cosine series of $x$ on $(0,\pi)$: $a_0=\frac2\pi\int_0^\pi x\,dx=\pi$, and $a_n=\frac2\pi\int_0^\pi x\cos nx\,dx=\frac{2((-1)^n-1)}{\pi n^2}$, i.e. $-\frac4{\pi n^2}$ for odd $n$, $0$ for even $n\ge2$. Hence $$u(x,y)=\frac\pi2(1-y)-\frac4\pi\sum_{n\text{ odd}}\frac{\cos nx}{n^2}\,\frac{\sinh n(1-y)}{\sinh n}.$$ The even extension of $x$ is continuous, so $\sum|a_n|\lt\infty$ and the argument of Theorem 4.16 applies verbatim (the derivative series converge uniformly on $\overline R$ away from $y=0$, so the Neumann conditions hold).
Check At $x=\frac\pi2$ every $\cos nx$ with $n$ odd vanishes, so $u(\tfrac\pi2,y)=\tfrac\pi2(1-y)$ and $u(\tfrac\pi2,\tfrac12)=\tfrac\pi4$. (A numerical sum of the series confirms $0.785398$.)
Interactive 1 — Separation of Variables in a Rectangle

The plate is $0\le x\le\pi$, $0\le y\le1$; the bottom edge carries the temperature $f(x)$ and the other three edges are kept at $0$. The upper panel shows the sum of the first $N$ terms of the series of Theorem 4.16 (warm / below 0); the lower panel compares the data $f$ (dashed) with the partial sum $S_Nf$ on the bottom edge. Press Play to add modes one by one, or use the slider. Watch how few modes the interior needs — each mode is damped by about $e^{-ny}$ — while a discontinuous edge keeps its Gibbs overshoot.

1
modes used—
u(π/2, ½) with N modes—
max |S_N f − f| on the bottom edge—
damping of mode N at y = ½—

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)$.

📐 Theorem 4.17 — Dirichlet problem in a disc; Poisson's integral formula

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.

✏️ Example 5 — Two Dirichlet problems in the unit disc
Solve $\Delta u=0$ in $r\lt1$ with (a) $u(1,\theta)=\sin^3\theta$, giving $u$ in terms of $x,y$; (b) $u(1,\theta)=1$ for $0\lt\theta\lt\pi$ and $0$ for $-\pi\lt\theta\lt0$ (upper half of the edge hot). For (b) find a closed form and $u$ at $(0,\tfrac12)$.
(a) No integrals are needed: $\sin^3\theta=\tfrac34\sin\theta-\tfrac14\sin3\theta$ is already a Fourier series, so $u=\tfrac34r\sin\theta-\tfrac14r^3\sin3\theta$. Since $r^3\sin3\theta=\operatorname{Im}z^3=3x^2y-y^3$: $$u(x,y)=\tfrac34y-\tfrac14\big(3x^2y-y^3\big).$$ Check: $\Delta(3x^2y-y^3)=6y-6y=0$, and on $r=1$ the formula returns $\sin^3\theta$.
(b) Series $a_0=\frac1\pi\int_0^\pi d\theta=1$, $a_n=0$, $b_n=\frac1\pi\int_0^\pi\sin n\theta\,d\theta=\frac{1-(-1)^n}{n\pi}$: $$u=\frac12+\frac2\pi\sum_{n\text{ odd}}\frac{r^n\sin n\theta}{n}.$$ The data are only piecewise continuous; the Poisson integral still gives a harmonic function with the right values at every point of the circle except $\theta=0,\pi$ (the proof of Theorem 4.17 is local in $\theta_0$).
(b) Closed form $\sum_{n\text{ odd}}\frac{w^n}{n}=\frac12\log\frac{1+w}{1-w}$ for $|w|\lt1$; with $w=z=re^{i\theta}$, $\operatorname{Im}\frac12\log\frac{1+z}{1-z}=\frac12\arg\frac{1+z}{1-z}=\frac12\arctan\frac{2r\sin\theta}{1-r^2}$ (the argument lies in $(-\frac\pi2,\frac\pi2)$ because $\operatorname{Re}\frac{1+z}{1-z}=\frac{1-r^2}{|1-z|^2}\gt0$). Hence $$u(r,\theta)=\frac12+\frac1\pi\arctan\frac{2r\sin\theta}{1-r^2}=\frac12+\frac1\pi\arctan\frac{2y}{1-x^2-y^2}.$$ The level curves $u=c$ are the circular arcs through $(\pm1,0)$ on which $\frac{2y}{1-x^2-y^2}$ is constant.
(b) Value At $(0,\tfrac12)$: $\frac{2\cdot\frac12}{1-\frac14}=\frac43$, so $u=\frac12+\frac1\pi\arctan\frac43\approx0.5+0.29517=0.79517$. Check: a numerical Poisson integral gives the same value, and $0\lt u\lt1$ as the maximum principle demands. (A plate whose upper half-edge is at $50\,^\circ$C and lower half-edge at $10\,^\circ$C has $u=10+40\cdot(\text{this})$: $30\,^\circ$C at the centre, $41.8\,^\circ$C halfway up — Exercise III.10.)
✏️ Example 6 — An annulus needs every radial solution
Find the function harmonic in $1\lt r\lt2$ with $u(1,\theta)=0$ and $u(2,\theta)=1+3\sin2\theta$.
Form The origin is not in the annulus, so all separated solutions are allowed: $u=A_0+B_0\log r+\sum_{n\ge1}\big[(A_nr^n+B_nr^{-n})\cos n\theta+(C_nr^n+D_nr^{-n})\sin n\theta\big]$. Only the modes present in the data survive (match coefficients of $1$ and $\sin2\theta$ on both circles; all others satisfy homogeneous $2\times2$ systems with non-zero determinant $2^n-2^{-n}$ and vanish).
n = 0 $A_0+B_0\log1=0$ and $A_0+B_0\log2=1$: $A_0=0$, $B_0=1/\log2$.
n = 2 $C_2+D_2=0$ and $4C_2+\tfrac14D_2=3$: $C_2\big(4-\tfrac14\big)=3$, so $C_2=\tfrac45$, $D_2=-\tfrac45$. Hence $$u(r,\theta)=\frac{\log r}{\log2}+\frac45\Big(r^2-\frac1{r^2}\Big)\sin2\theta .$$
Check At $r=2$: $1+\tfrac45\cdot\tfrac{15}4\sin2\theta=1+3\sin2\theta$ ✓. The flux $\oint_{r=\rho}u_r\,ds=2\pi\rho\cdot\frac1{\rho\log2}=\frac{2\pi}{\log2}$ is the same on every circle, as Theorem 4.11(3) applied to the annulus between two circles requires.
Interactive 2 — Poisson's Kernel: the Value Inside Is a Weighted Average of the Boundary

Left: the harmonic function in the unit disc with the chosen boundary values (outer ring), and around it the Poisson kernel $P(r,\theta-\varphi)$ of the moving point $P$, drawn as a purple bump. Right: the boundary data $f(\varphi)$ (top, with $u(P)$ as a dashed level) and the weights $\frac1{2\pi}P(r,\theta-\varphi)$ (bottom). Press Play to move $P$, or click the disc to place it. Near the centre the weights are almost uniform (mean value property); near the edge they concentrate at the closest boundary point, so $u(P)\to f$ there.

point P = (r, θ)—
u(P) = Poisson average—
u(0) = mean of f—
min f … max f—
kernel peak (1 + r)/(1 − r)—

The Neumann Problem and the Compatibility Condition

📘 Definition 4.8 — Dirichlet, Neumann and Robin problems

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).

📐 Theorem 4.18 — The Neumann problem: compatibility, uniqueness up to constants, solution in a disc
  1. 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)}.$$
  2. 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)$.
  3. 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.

✏️ Example 7 — Prove or disprove: Neumann problems in the unit disc
Decide whether each problem in $D=\{r\lt1\}$ has a solution, and find all solutions when it does. (a) $\Delta u=0$, $u_r(1,\theta)=\cos^2\theta$. (b) $\Delta u=0$, $u_r(1,\theta)=\sin2\theta+\cos3\theta$. (c) $\Delta u=1$, $u_r(1,\theta)=c$ (constant). (d) "If the Neumann problem has a solution, the solution is unique."
(a) No solution $\int_{-\pi}^{\pi}\cos^2\theta\,d\theta=\pi\ne0$: the compatibility condition fails. Physically, heat flows in through the whole edge and nothing removes it.
(b) Solvable The data have mean $0$. With $R=1$ the coefficient of $\sin n\theta$ in $u$ is $\beta_n/n$: $$u=C+\frac{r^2}{2}\sin2\theta+\frac{r^3}{3}\cos3\theta=C+xy+\frac{x^3-3xy^2}{3}.$$ Check: $u_r=r\sin2\theta+r^2\cos3\theta$, which is the data at $r=1$.
(c) Compatibility: $\iint_D1\,dA=\pi$ must equal $\oint c\,ds=2\pi c$, so a solution exists only for $c=\tfrac12$. Then $u=\tfrac{r^2}4+C$ works ($\Delta\frac{r^2}4=\frac14(2+2)=1$, $u_r=\frac r2$), and by Theorem 4.18(2) these are all the solutions.
(d) False Constants solve the homogeneous Neumann problem, so solutions are unique only up to an additive constant; uniqueness can be restored by prescribing, for example, $u(0)$ or the mean of $u$.
⚠️ Counterexamples and pitfalls
  1. 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$.
  2. 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.
  3. 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.
  4. 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$.
  5. 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).
  6. 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.
  7. 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).
  8. 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.
  9. 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$.
  10. 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

I
Harmonic functions, mean values and the maximum principle.
  • 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 (a) $6x-6x=0$ ✓ ($\operatorname{Re}z^3$). (b) $\Delta=4$ ✗. (c) $\log(x^2+y^2)=2\log r$ ✓ on $\mathbb{R}^2\setminus\{0\}$. (d) $u_{xx}=-u$, $u_{yy}=u$ ✓ ($\operatorname{Re}\sin z$). (e) $u_{xx}=6xy$, $u_{yy}=-6xy$ ✓ ($\tfrac14\operatorname{Im}z^4$). (f) $\Delta=0+2$ ✗.
2 $\Delta u=2a+2c=0$: all $u$ with $c=-a$, i.e. $a(x^2-y^2)+bxy+dx+ey+f$ (a 5-dimensional space). $\Delta(x^3+axy^2)=6x+2ax=0$ for all $x$ iff $a=-3$.
3 $u_{rr}=n(n-1)r^{n-2}\cos n\theta$, $\frac1ru_r=nr^{n-2}\cos n\theta$, $\frac1{r^2}u_{\theta\theta}=-n^2r^{n-2}\cos n\theta$; the sum is $(n^2-n+n-n^2)r^{n-2}\cos n\theta=0$. Radial: $u''+\frac1ru'=\frac1r(ru')'=0$, so $ru'=B$ and $u=A+B\log r$.
4 The data are a Fourier series already: $u=2+r\cos\theta-3r^2\sin2\theta$. So $u(0,0)=2$ (also the mean) and $u(\tfrac12,0)=2+\tfrac12=\tfrac52$.
5 Apply Theorem 4.13(1) to $-u$, which is harmonic: $\max(-u)=\max_{\partial\Omega}(-u)$, i.e. $\min_{\overline\Omega}u=\min_{\partial\Omega}u$. If $u=0$ on $\partial\Omega$, then $0\le u\le0$ in $\overline\Omega$.
6 $\Delta u=\tfrac14(-2-2)=-1$ and $u=0$ when $x^2+y^2=1$. $u$ is superharmonic ($\Delta u\le0$); the weak principle then controls only the minimum (which is $0$, on the boundary). The maximum $\tfrac14$ at the centre is allowed.
7 By Theorem 4.13(1), $-1\le\min_{\partial D}u\le u\le\max_{\partial D}u\le1$. If $u(\mathbf x_0)=1$ at an interior point, $u$ attains its maximum over $D$ there and is constant by the strong principle; if $u(\mathbf x_0)=-1$, apply the same to $-u$.
8 On the circle, $u=e^{\rho\cos\theta}\cos(\rho\sin\theta)=\operatorname{Re}e^{\rho e^{i\theta}}=\operatorname{Re}\sum_k\frac{\rho^ke^{ik\theta}}{k!}$. The series converges uniformly in $\theta$, and $\int_{-\pi}^{\pi}e^{ik\theta}d\theta=0$ for $k\ne0$, so the average is the $k=0$ term, $1=u(0,0)$. (Numerically, for $\rho=0.5,2,5$ the integral is $1.000000$.)
II
Fourier series.
  • 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 Even: $b_n=0$, $a_0=\frac2\pi\int_0^\pi x\,dx=\pi$, $a_n=\frac2\pi\int_0^\pi x\cos nx\,dx=\frac{2((-1)^n-1)}{\pi n^2}$. So $|x|=\frac\pi2-\frac4\pi\sum_{n\text{ odd}}\frac{\cos nx}{n^2}$. The extension is continuous and piecewise $C^1$: uniform convergence (Theorem 4.15(2)). At $x=0$: $0=\frac\pi2-\frac4\pi\sum_{\text{odd}}\frac1{n^2}$.
2 $b_n=\frac2\pi\int_0^\pi x(\pi-x)\sin nx\,dx=\frac{4(1-(-1)^n)}{\pi n^3}$, i.e. $\frac{8}{\pi n^3}$ for odd $n$: $x(\pi-x)=\frac8\pi\sum_{\text{odd}}\frac{\sin nx}{n^3}$ (uniformly). At $x=\frac\pi2$: $\frac{\pi^2}4=\frac8\pi\big(1-\frac1{27}+\frac1{125}-\cdots\big)$, giving $\frac{\pi^3}{32}\approx0.968946$.
3 $a_n=\frac2\pi\int_0^\pi\sin x\cos nx\,dx=\frac{2(1+(-1)^n)}{\pi(1-n^2)}$ for $n\ne1$, $a_1=0$. So $\sin x=\frac2\pi-\frac4\pi\sum_{m\ge1}\frac{\cos2mx}{4m^2-1}$ on $[0,\pi]$, uniformly (the even extension $|\sin x|$ is continuous).
4 $\frac1\pi\int_{-\pi}^{\pi}x^2dx=\frac{2\pi^2}3=\frac{\pi^2}2+\frac{16}{\pi^2}\sum_{\text{odd}}\frac1{n^4}$, so $\sum_{\text{odd}}n^{-4}=\frac{\pi^4}{96}$. Since $\sum_{\text{all}}=\sum_{\text{odd}}+\frac1{16}\sum_{\text{all}}$, $\sum n^{-4}=\frac{16}{15}\cdot\frac{\pi^4}{96}=\frac{\pi^4}{90}$.
5 At $x=0$, $f$ is continuous: the sum is $e^0=1$. At $x=\pi$ the extension jumps from $e^\pi$ to $e^{-\pi}$: the sum is $\frac12(e^\pi+e^{-\pi})=\cosh\pi$.
6 $a_0=\frac{2\pi^2}3$, $a_n=\frac2\pi\int_0^\pi x^2\cos nx\,dx=\frac{4(-1)^n}{n^2}$: $x^2=\frac{\pi^2}3+4\sum\frac{(-1)^n\cos nx}{n^2}$, uniformly. At $x=\pi$: $\pi^2=\frac{\pi^2}3+4\sum\frac1{n^2}$. At $x=0$: $0=\frac{\pi^2}3-4\sum\frac{(-1)^{n+1}}{n^2}$.
7 (a) Jump: exactly order $1/n$ ($b_n=\frac{4}{\pi n}$, $n$ odd). (b) Continuous with a jump in $f'$: order $1/n^2$. (c) $f$ is odd, $f(\pm\pi)=0$, and $f'(x)=\pi^2-3x^2$ has $f'(\pi)=f'(-\pi)=-2\pi^2$, so $f$ and $f'$ are continuous while $f''=-6x$ jumps at $\pm\pi$: order $1/n^3$. Indeed, by parts three times, $b_n=\frac2\pi\int_0^\pi x(\pi^2-x^2)\sin nx\,dx=\frac{12(-1)^{n+1}}{n^3}$ ($b_1=12$, $b_2=-1.5$, $b_3=\frac49$, confirmed numerically).
III
Separation of variables in rectangles, discs and annuli.
  • 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 Modes $\sin nx\,\sinh ny$ (zero at $y=0$): $u=\dfrac{\sinh y}{\sinh\pi}\sin x+2\,\dfrac{\sinh3y}{\sinh3\pi}\sin3x$.
2 Now $y$ carries the eigenfunctions: $u=\displaystyle\sum_{n\ge1}c_n\frac{\sinh\big(n\pi(a-x)/b\big)}{\sinh(n\pi a/b)}\sin\frac{n\pi y}{b}$ with $c_n=\frac2b\int_0^bg(y)\sin\frac{n\pi y}b\,dy$.
3 Modes $\sin n\pi y\,\sinh n\pi x$. Sine coefficients of $y(1-y)$ on $(0,1)$: $\frac{8}{n^3\pi^3}$ for odd $n$, $0$ for even. $u=\displaystyle\sum_{n\text{ odd}}\frac{8}{n^3\pi^3}\frac{\sinh n\pi x}{\sinh n\pi^2}\sin n\pi y$.
4 $\cos^2x=\frac12+\frac12\cos2x$. Modes: $n=0$: $Y_0=y$ (zero at $y=0$); $n=2$: $\sinh2y$. So $u=\dfrac y2+\dfrac12\dfrac{\sinh2y}{\sinh2}\cos2x$.
5 $\cos^4\theta=\frac38+\frac12\cos2\theta+\frac18\cos4\theta$, so $u=\frac38+\frac12r^2\cos2\theta+\frac18r^4\cos4\theta$ and $u(0,0)=\frac38$.
6 On $r=2$: $x^2=4\cos^2\theta=2+2\cos2\theta$, $-y=-2\sin\theta$. So $u=3+2\big(\frac r2\big)^2\cos2\theta-2\cdot\frac r2\sin\theta=3+\frac{x^2-y^2}2-y$. Check on $x^2+y^2=4$: $3+\frac{2x^2-4}{2}-y=1+x^2-y$ ✓.
7 Bounded at infinity: modes $1$, $r^{-n}\cos n\theta$, $r^{-n}\sin n\theta$ ($\log r$ and $r^n$ are excluded). $u=1+\dfrac{2\cos\theta}{r}=1+\dfrac{2x}{x^2+y^2}$.
8 Radial: $u=A+B\log r$; $A+B\log a=T_1$, $A+B\log b=T_2$: $u=T_1+(T_2-T_1)\dfrac{\log(r/a)}{\log(b/a)}$.
9 $P(\tfrac12,\psi)=\dfrac{3/4}{5/4-\cos\psi}$: largest at $\psi=0$: $\frac{3/4}{1/4}=3$; smallest at $\psi=\pi$: $\frac{3/4}{9/4}=\frac13$. Its average is $1$ (Theorem 4.17(b); numerically $1.000000$). Then $u(\tfrac12,\theta)=\frac1{2\pi}\int Pf\,d\varphi$ with $f\ge0$ lies between $\frac13\cdot\frac1{2\pi}\int f=\frac13u(0)$ and $3u(0)$.
10 The data are $10+40\chi(\theta)$ with $\chi$ the half-hot function of Example 5(b) (radius scaled to $1$). Centre: $10+40\cdot\frac12=30\,^\circ\text{C}$. At $\rho=\frac12$, $\theta=\frac\pi2$: $10+40\big(\frac12+\frac1\pi\arctan\frac43\big)\approx10+40(0.79517)=41.8\,^\circ\text{C}$.
IV
Neumann problems, proofs and challenges.
  • 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?
1 Mean of the data is $0$, so it is solvable: $u=C+r\sin\theta+\frac{r^2}2\cos2\theta=C+y+\frac{x^2-y^2}2$.
2 The mean of $\cos^2\theta-a$ is $\frac12-a$: solvable iff $a=\frac12$. Then the data are $\frac12\cos2\theta$ and $u=C+\frac{r^2}4\cos2\theta=C+\frac{x^2-y^2}4$.
3 Compatibility: $\iint_{(0,1)^2}x\,dA=\frac12\ne0=\oint0\,ds$, so no solution. For $F=x-\frac12$ the integral is $0$; try $u=u(x)$ with $u''=x-\frac12$, $u'(0)=u'(1)=0$: $u'=\frac{x^2}2-\frac x2$ (vanishes at $0$ and $1$), $u=\frac{x^3}6-\frac{x^2}4+C$. The normal derivative on $y=0,1$ is $\pm u_y=0$ ✓.
4 $P(r,\psi)=\frac{R^2-r^2}{R^2-2Rr\cos\psi+r^2}$ and $(R-r)^2\le R^2-2Rr\cos\psi+r^2\le(R+r)^2$, so $\frac{R-r}{R+r}\le P\le\frac{R+r}{R-r}$. Multiply by $f=u(R,\cdot)\ge0$, average over $\varphi$, and use $\frac1{2\pi}\int f=u(0)$ (mean value property).
5 If $u\ge m$, then $v=u-m\ge0$ is harmonic on every disc $D_R$ about $0$. For fixed $\mathbf x$ with $|\mathbf x|=r$, IV.4 gives $\frac{R-r}{R+r}v(0)\le v(\mathbf x)\le\frac{R+r}{R-r}v(0)$; letting $R\to\infty$, $v(\mathbf x)=v(0)$. So $u$ is constant. (A harmonic function bounded above is handled with $-u$.)
6 Let $M=\max_{r\le1}|u|$ and $\varepsilon\gt0$. In the annulus $\delta\lt r\lt1$ the function $w=u+\varepsilon\log r$ is harmonic, equals $0$ on $r=1$, and on $r=\delta$ is at most $M+\varepsilon\log\delta\lt0$ once $\delta$ is small. By the maximum principle $w\le0$ in the annulus; since $\delta$ can be taken arbitrarily small, $u\le-\varepsilon\log r=\varepsilon\log\frac1r$ for all $0\lt r\lt1$. Let $\varepsilon\to0$: $u\le0$; applied to $-u$, $u\ge0$. So $u\equiv0$ for $r\gt0$, and continuity gives $u(0)=0\ne1$. In Example 3, apply the same argument to $\pm(w-1)$ with the barrier $\varepsilon\sum_{k=1}^4\log\frac{2}{|\mathbf x-\mathbf p_k|}$ ($\mathbf p_k$ the corners), which is harmonic, positive on the square, and tends to $+\infty$ at each corner: $|w-1|\le$ barrier, then $\varepsilon\to0$.
7 $\Delta u_n=n^{-2}(-n^2+n^2)\sin nx\sinh ny=0$; $u_n(x,0)=0$ and $\partial_yu_n(x,0)=\frac{\sin nx}{n}$, both tending to $0$ uniformly. But $\sup_x|u_n(x,1)|=\frac{\sinh n}{n^2}\to\infty$. The solution does not depend continuously on Cauchy data: for elliptic equations the natural data are boundary values (Dirichlet, Neumann or Robin), consistent with the absence of real characteristics (§4.1).
🎯 Exam corner CSIR Part BCSIR Part CGATE MA

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$.

Idea Write the data as a Fourier series: $\sin^2\theta+\cos\theta=\tfrac12-\tfrac12\cos2\theta+\cos\theta$, so $u=\tfrac12-\tfrac12r^2\cos2\theta+r\cos\theta$.
Options At $r=\tfrac12$, $\theta=0$: $\tfrac12-\tfrac18+\tfrac12=\tfrac78$. (A) is $u(0,0)$, the mean value, not the value at $(\tfrac12,0)$. (C) comes from the sign error $\sin^2\theta=\tfrac12+\tfrac12\cos2\theta$. (D) is the boundary value at $\theta=0$ — a harmonic function is not constant along radii.
Answer (B).

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$.

Idea Compatibility (Theorem 4.18(1)): $\iint_Dk\,dA=k\pi$ must equal $\oint1\,ds=2\pi$.
Options Only $k=2$ works, and then $u=\frac{r^2}2+C$ is a solution ($\Delta\frac{r^2}2=2$, $u_r=1$ at $r=1$). (A) forgets the length $2\pi$ of the circle; (C) equates the area with the length; (D) ignores compatibility, which is what distinguishes Neumann from Dirichlet problems.
Answer (B).

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$.

Idea Separated solutions with zero side data: $\sin nx\,(Ae^{-ny}+Be^{ny})$. Boundedness removes $e^{ny}$, and matching $y=0$ leaves $u=e^{-2y}\sin2x$.
Options $u(\frac\pi4,\log2)=e^{-2\log2}\sin\frac\pi2=\frac14$. (B) uses $e^{-y}$ (wrong eigenvalue); (C) uses $e^{-4y}$ ($\lambda=n^2$ confused with $n$); (D) would need $\frac\pi4$ to be a node of $\sin2x$, which it is not.
Answer (A).

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$.

(A) True Mean value: $\frac1{2\pi}\int_{-\pi}^{\pi}|\cos\theta|\,d\theta=\frac{4}{2\pi}=\frac2\pi$.
(B) True The data lie in $[0,1]$ and are not constant, so $u$ is not constant and the strong maximum principle gives $0\lt u\lt1$ inside.
(C) False $|\cos\theta|=\frac2\pi+\frac4\pi\sum_{m\ge1}\frac{(-1)^{m+1}\cos2m\theta}{4m^2-1}$, so $u(r,0)-u(r,\frac\pi2)=\frac4\pi\sum_m\frac{(-1)^{m+1}(1-(-1)^m)r^{2m}}{4m^2-1}=\frac8\pi\sum_{m\text{ odd}}\frac{r^{2m}}{4m^2-1}\gt0$. Numerically $u(\frac12,0)\approx0.7379$ and $u(0,\frac12)\approx0.5245$. (Intuitively, $(\frac12,0)$ is closer to the hot points $\theta=0,\pi$.)
(D) True $v(x,y)=u(-x,y)$ is harmonic, continuous on $\overline D$, with boundary values $|\cos(\pi-\theta)|=|\cos\theta|$; by uniqueness (Theorem 4.14) $v=u$.
Answer (A), (B) and (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$.

(A) True Liouville's theorem (Exercise IV.5): bounded implies bounded below.
(B) False $u=y$ — the domain is unbounded and Theorem 4.13 does not apply.
(C) True A local maximum at $p$ is a maximum over a small disc about $p$; the strong principle makes $u$ constant on that disc, hence (being real-analytic on a connected domain) constant everywhere.
(D) False $\Delta(u^2)=2|\nabla u|^2+2u\Delta u=2|\nabla u|^2$; e.g. $u=x$, $u^2=x^2$, $\Delta=2$.
Answer (A) and (C).

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.

Solution One mode: $u=\dfrac{\sinh2(1-y)}{\sinh2}\sin2x$ (Theorem 4.16 with $a=\pi$, $b=1$, $b_2=1$).
(A) True $u(\frac\pi4,\frac12)=\frac{\sinh1}{\sinh2}=\frac{\sinh1}{2\sinh1\cosh1}=\frac1{2\cosh1}\approx0.3240$.
(B) False $u$ is non-constant and harmonic: its maximum, $1$, is attained only on the boundary, at $(\frac\pi4,0)$.
(C) True $\sin2x=0$ at $x=\frac\pi2$ for every $y$.
(D) False It equals $\sin2x$ on $y=1$ and $0$ on $y=0$ — the data on the top and bottom are interchanged.
Answer (A) and (C).
🧑‍🏫 For the teacher

Suggested plan — 3 lectures × 60 min.

  1. 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$).
  2. 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).
  3. 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–Teaching NexusResearch-tutored · optional, about 60 minutes

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.

  1. 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.
  2. 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$.
  3. 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?
  4. 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.)

Instructor note: by the four-fold rotation symmetry of the square the discrete centre value is exactly $\frac14$ too, for every grid with the centre as a node. Each walk is a Bernoulli trial with $p=\frac14$, so the standard error is $\sqrt{p(1-p)/N}\approx0.433/\sqrt N$ (about $0.0043$ for $N=10^4$): slope $-\frac12$ on the log–log plot. At $(0.5,0.8)$ the series gives $u\approx0.6208$; the grid value differs by $O(h^2)$.

🧪 Self-check quiz

0/5 correct

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