4.7.14Partial Differential Equations

Laplace on rectangle — separation of variables

1,862 words8 min readdifficulty · medium

WHAT is the problem?

WHY only one nonzero side at a time? Laplace's equation is linear and homogeneous, so sums of solutions are solutions. If all four sides are nonzero, split into four sub-problems each with three zero edges, solve each, and add. So mastering the one-side case masters everything.


HOW: derive it from scratch

Step 1 — Separate

Assume u(x,y)=X(x)Y(y)u(x,y)=X(x)Y(y). Plug in: X(x)Y(y)+X(x)Y(y)=0.X''(x)Y(y)+X(x)Y''(y)=0. Divide by X(x)Y(y)X(x)Y(y) (legal where neither is zero): XX+YY=0XX=YY.\frac{X''}{X}+\frac{Y''}{Y}=0 \quad\Longrightarrow\quad \frac{X''}{X}=-\frac{Y''}{Y}.

XX=λ,YY=λ.\frac{X''}{X}=-\lambda,\qquad \frac{Y''}{Y}=\lambda.

Step 2 — Choose the sign using the homogeneous direction

We have u(0,y)=u(a,y)=0u(0,y)=u(a,y)=0, i.e. X(0)=X(a)=0X(0)=X(a)=0. Two zero boundary conditions in xx ⇒ we need an oscillating XX (a sine), which forces λ>0\lambda>0. Write λ=k2\lambda=k^2.

Step 3 — Solve the XX eigenvalue problem

X+k2X=0X=Acoskx+Bsinkx.X''+k^2X=0 \Rightarrow X=A\cos kx + B\sin kx. X(0)=0A=0X(0)=0 \Rightarrow A=0. So X=BsinkxX=B\sin kx. X(a)=0sinka=0ka=nπX(a)=0 \Rightarrow \sin ka=0 \Rightarrow ka=n\pi, n=1,2,3,n=1,2,3,\dots

kn=nπa,Xn(x)=sinnπxa\boxed{k_n=\frac{n\pi}{a},\qquad X_n(x)=\sin\frac{n\pi x}{a}}

These are the eigenfunctions; λn=(nπ/a)2\lambda_n=(n\pi/a)^2 the eigenvalues.

Step 4 — Solve YY with the matching λ\lambda

Ykn2Y=0Y=Ccoshnπya+Dsinhnπya.Y''-k_n^2 Y=0 \Rightarrow Y=C\cosh\frac{n\pi y}{a}+D\sinh\frac{n\pi y}{a}. Apply u(x,0)=0Y(0)=0C=0u(x,0)=0 \Rightarrow Y(0)=0 \Rightarrow C=0. So Yn(y)=sinhnπya.Y_n(y)=\sinh\frac{n\pi y}{a}.

Step 5 — Superpose and match the last edge

Each un=sinnπxasinhnπyau_n=\sin\frac{n\pi x}{a}\sinh\frac{n\pi y}{a} solves Laplace with three zero edges. Sum them: u(x,y)=n=1Bnsinnπxasinhnπya.u(x,y)=\sum_{n=1}^\infty B_n\,\sin\frac{n\pi x}{a}\,\sinh\frac{n\pi y}{a}. Impose the final condition u(x,b)=f(x)u(x,b)=f(x): f(x)=n=1(Bnsinhnπba)sinnπxa.f(x)=\sum_{n=1}^\infty \Big(B_n\sinh\frac{n\pi b}{a}\Big)\sin\frac{n\pi x}{a}. This is just the Fourier sine series of ff. The bracket is the coefficient: Bnsinhnπba=2a0af(x)sinnπxadx.B_n\sinh\frac{n\pi b}{a}=\frac{2}{a}\int_0^a f(x)\sin\frac{n\pi x}{a}\,dx.

Figure — Laplace on rectangle — separation of variables

Worked examples



Recall Feynman: explain to a 12-year-old

Imagine a metal plate that's cold (0°) on three sides and hot on the top. After a while the heat spreads out and settles. We want to know how warm each inside point is. The smart trick: pretend the temperature is "a left-right pattern" times "an up-down pattern." The left-right pattern must be 00 at both side-walls, so it's a wave that fits exactly (like a guitar string: 1 hump, 2 humps, 3 humps...). The up-down pattern must die away as you go down toward the cold bottom — that's the sinh\sinh, which is 00 at the bottom and grows toward the hot top. Add up all the guitar-string waves with the right loudness to match the top edge — done!


Recall — Active flashcards

#flashcards/maths

Why does the separation constant have to be a constant?
One side depends only on xx, the other only on yy; equal for all x,yx,y ⇒ both equal a common constant.
Which direction gets sine eigenfunctions and why?
The direction with TWO homogeneous (zero) boundaries; two zero endpoints force oscillation, only sines vanish at both.
What are the eigenvalues/eigenfunctions for X(0)=X(a)=0X(0)=X(a)=0?
λn=(nπ/a)2\lambda_n=(n\pi/a)^2, Xn=sin(nπx/a)X_n=\sin(n\pi x/a), n=1,2,n=1,2,\dots
Why sinh\sinh (not cosh\cosh or sine) in the yy-direction here?
Sign of λ\lambda is fixed positive by xx, giving Y=k2YY''=k^2Y ⇒ hyperbolic; need Y(0)=0Y(0)=0 so pick sinh\sinh since sinh0=0\sinh 0=0.
Final form of u(x,y)u(x,y) for top edge f(x)f(x)?
nBnsinnπxasinhnπya\sum_n B_n\sin\frac{n\pi x}{a}\sinh\frac{n\pi y}{a}.
Formula for BnB_n?
Bn=2asinh(nπb/a)0af(x)sinnπxadxB_n=\dfrac{2}{a\sinh(n\pi b/a)}\int_0^a f(x)\sin\frac{n\pi x}{a}\,dx.
How do you handle all four edges nonzero?
Split into four problems (each one nonzero edge), solve separately, superpose (linearity).
If f(x)=5sin(3πx/a)f(x)=5\sin(3\pi x/a), what is uu?
5sinh(3πy/a)sinh(3πb/a)sin3πxa5\,\dfrac{\sinh(3\pi y/a)}{\sinh(3\pi b/a)}\sin\frac{3\pi x}{a} (single mode, no integral).
What goes wrong if you use cosh\cosh for YY?
cosh0=10\cosh 0=1\ne0, violates u(x,0)=0u(x,0)=0.
Physical meaning of Laplace's equation?
Steady state; each point's value is the average of its neighbours (no sources, no time change).

Connections

  • Fourier sine series — the engine that computes BnB_n.
  • Separation of variables — the general method (also used for Heat equation 1D, Wave equation 1D).
  • Sturm–Liouville eigenvalue problems — why sin(nπx/a)\sin(n\pi x/a) are orthogonal eigenfunctions.
  • Hyperbolic functions sinh cosh — the decaying/growing yy-profiles.
  • Superposition principle — splitting the four-edge problem.
  • Harmonic functions and mean value property — the "average of neighbours" picture.
  • Heat equation 1D — same eigenfunctions, but eλte^{-\lambda t} instead of sinh\sinh.

Concept Map

models

posed as

is

allows

split into

guess product

gives

gives

force oscillation

applies to

solved for

summed via

Laplace eqn uxx+uyy=0

Steady state solution

Dirichlet problem on rectangle

Linear homogeneous PDE

Separate u=X x Y y

X ODE X''/X=-lambda

Y ODE Y''/Y=lambda

BCs X 0 =X a =0

lambda=k^2 greater than 0

Eigenfunctions sin nPix/a

Fourier series superposition

Hinglish (regional understanding)

Intuition Hinglish mein samjho

Dekho, Laplace equation uxx+uyy=0u_{xx}+u_{yy}=0 ka matlab hai ek steady state — jaise ek metal plate jiska temperature ab settle ho gaya, ya electric potential. Har andar ke point ki value uske aas-paas ke points ka average hoti hai. Humein chaaron edges pe values di jaati hain (boundary conditions) aur andar ka pattern nikaalna hota hai.

Trick simple hai: maan lo u(x,y)=X(x)Y(y)u(x,y)=X(x)\cdot Y(y) — yaani ek "left-right pattern" times ek "up-down pattern". Isse ek mushkil PDE do aasaan ODE ban jaati hain. Jis direction mein do zero edges hain, wahan solution ek sine wave hota hai (jaise guitar ki string — 1 hump, 2 hump...), kyunki sirf sine hi dono ends pe zero ho sakta hai. Doosri direction mein, jahan ek hi zero edge hai, solution sinh hota hai — kyunki sinh0=0\sinh 0=0 aur woh exponentially grow/decay karta hai, oscillate nahi. Yaad rakho: "do zero sing, ek zero swing".

Last step: nonzero edge f(x)f(x) ko match karne ke liye sabhi sine modes ko jod do — yeh bilkul Fourier sine series hai. Coefficient BnB_n nikaalte waqt yaad rakho ki usmein sinh(nπb/a)\sinh(n\pi b/a) ka factor divide karna hai, warna galat answer aayega. Agar f(x)f(x) already ek single sine ho (jaise 5sin3πx5\sin 3\pi x), toh integral karne ki zaroorat hi nahi — seedha ek hi mode! Yeh 80/20 wala point exam mein bahut kaam aata hai. Agar chaaron edges nonzero hain, toh linearity se chaar alag problems mein tod do, har ek solve karo, phir add kar do.

Test yourself — Partial Differential Equations

Connections