Boundary Values & Fourier Series

Study Sheet

Boundary Values & Fourier Series

Eigenvalue problems, sine series, the heat and wave equations

From Boundary Conditions to Fourier

Tip
Boundary conditions quantize

An initial-value problem specifies everything at one point; a BOUNDARY-value problem splits conditions between two (y(0)=y(L)=0y(0) = y(L) = 0) — and suddenly solutions exist only for special parameter values.

y+λy=0y'' + \lambda y = 0 with y(0)=y(π)=0y(0) = y(\pi) = 0: the general solution sin(λx)\sin(\sqrt\lambda\,x) meets the far boundary only when λ\sqrt\lambda is an integer — EIGENVALUES λn=n2\lambda_n = n^2 with eigenfunctions sinnx\sin nx. A guitar string of length LL can vibrate only at frequencies nπcL\tfrac{n\pi c}{L}: harmonics are a boundary-value theorem.

Tip
Fourier series: every shape from pure tones

The eigenfunctions are ORTHOGONAL (0πsinmxsinnxdx=0\int_0^\pi\sin mx\sin nx\,dx = 0 for mnm \ne n), so any reasonable ff on (0,π)(0, \pi) expands as f=bnsinnxf = \sum b_n\sin nx with each coefficient computed independently: bn=2π0πfsinnxdxb_n = \tfrac{2}{\pi}\int_0^\pi f\sin nx\,dx — a projection, exactly as in linear algebra with an orthogonal basis.

The flat function f=1f = 1 becomes the square-wave series 4π(sinx+sin3x3+sin5x5+)\tfrac{4}{\pi}\left(\sin x + \tfrac{\sin 3x}{3} + \tfrac{\sin 5x}{5} + \cdots\right).

Tip
The heat and wave equations, mode by mode

Separation of variables turns a PDE into the eigenvalue problem plus simple time behavior. HEAT (ut=kuxxu_t = ku_{xx}): each mode decays, u=bnekn2tsinnxu = \sum b_ne^{-kn^2t}\sin nx — the n2n^2 means fine detail smooths almost instantly while the broad shape lingers.

WAVE (utt=c2uxxu_{tt} = c^2u_{xx}): each mode oscillates at frequency ncnc, or equivalently d'Alembert's f(xct)+g(x+ct)f(x - ct) + g(x + ct) — disturbances travel at speed cc unchanged. Expand the initial data, evolve each mode by its own simple rule, superpose: that is the whole method.

Side note
Significance: the spectrum is everywhere

MP3 compression, noise-cancelling headphones, MRI reconstruction, and spectroscopy all rest on expanding signals in sines and cosines. The heat-equation origin story matters too: Fourier invented the series in 1807 to model heat in a metal bar, was told the idea was rigorous nonsense, and turned out to be the most useful "nonsense" in engineering history.

Try it
Try it: decay rates order themselves

A metal bar's initial temperature has modes sinx\sin x and sin5x\sin 5x with equal amplitude. After time tt, their ratio? Work: mode nn decays like en2kte^{-n^2kt}, so the ratio is e(251)kt=e24kte^{-(25-1)kt} = e^{-24kt} — the sin5x\sin 5x ripple dies 2424 times faster in the exponent. Fine structure vanishes almost immediately; the broad shape lingers. That IS why blurring smooths.

Proofs & Why It Matters

Tip
Proof: orthogonality of the sine family

Product-to-sum: sinmxsinnx=12[cos(mn)xcos(m+n)x]\sin mx\sin nx = \tfrac12\left[\cos(m-n)x - \cos(m+n)x\right]. Integrate over [0,π][0, \pi]: for mnm \ne n both cosine integrals vanish (sinkπ=0\sin k\pi = 0), giving 00; for m=nm = n the first term is 120π1dx=π2\tfrac12\int_0^\pi 1\,dx = \tfrac\pi2.

Hence 0πfsinnxdx=bnπ2\int_0^\pi f\sin nx\,dx = b_n\cdot\tfrac\pi2 when f=bmsinmxf = \sum b_m\sin mx — every other term integrates away, isolating bnb_n. \blacksquare

Tip
Proof: separation of variables for heat

Try u=X(x)T(t)u = X(x)T(t) in ut=kuxxu_t = ku_{xx}: XT=kXTXT' = kX''T, so TkT=XX\dfrac{T'}{kT} = \dfrac{X''}{X}. The left side depends only on tt, the right only on xx — a function of tt equal to a function of xx must be CONSTANT, say λ-\lambda.

This splits the PDE into X+λX=0X'' + \lambda X = 0 (the boundary-value problem, quantizing λ=n2\lambda = n^2) and T=kλTT' = -k\lambda T (exponential decay ekn2te^{-kn^2t}). Superposition assembles the general solution because the heat equation is linear. \blacksquare

Going Deeper: Worked Problems

Example
Worked: a full heat-equation solve

A bar of length π\pi with ends held at 00 starts at temperature u(x,0)=3sinxsin3xu(x, 0) = 3\sin x - \sin 3x. Find u(x,t)u(x, t) for ut=2uxxu_t = 2u_{xx}.

Step 1 — separation gives modes sinnx\sin nx (the boundary conditions quantize to integer nn), each decaying like e2n2te^{-2n^2t} (the 22 is the diffusivity).

Step 2 — the initial data is ALREADY a finite Fourier sine series: b1=3b_1 = 3, b3=1b_3 = -1, all others 00 — no coefficient integrals needed.

Step 3 — evolve each mode: u(x,t)=3e2tsinxe18tsin3xu(x,t) = 3e^{-2t}\sin x - e^{-18t}\sin 3x.

Step 4 — check: ut=6e2tsinx+18e18tsin3xu_t = -6e^{-2t}\sin x + 18e^{-18t}\sin 3x and 2uxx=2(3e2tsinx+9e18tsin3x)2u_{xx} = 2(-3e^{-2t}\sin x + 9e^{-18t}\sin 3x) — equal ✓; ends: sin0=sin3π=0\sin 0 = \sin 3\pi = 0 ✓.

Step 5 — by t=0.5t = 0.5 the sin3x\sin 3x ripple has shrunk by e90.01%e^{-9} \approx 0.01\% while the fundamental keeps e137%e^{-1} \approx 37\%: the bar forgets its fine structure almost instantly.

Example
Worked: a Fourier coefficient integral by hand

Find the Fourier sine series of f(x)=xf(x) = x on (0,π)(0, \pi).

Step 1 — bn=2π0πxsinnxdxb_n = \dfrac2\pi\displaystyle\int_0^\pi x\sin nx\,dx.

Step 2 — integrate by parts with u=xu = x, dv=sinnxdxdv = \sin nx\,dx: [xcosnxn]0π+1n0πcosnxdx=πcosnπn+0=π(1)nn\left[-\dfrac{x\cos nx}{n}\right]_0^\pi + \dfrac1n\int_0^\pi\cos nx\,dx = -\dfrac{\pi\cos n\pi}{n} + 0 = -\dfrac{\pi(-1)^n}{n}.

Step 3 — so bn=2ππ(1)n+1n=2(1)n+1nb_n = \dfrac2\pi\cdot\dfrac{\pi(-1)^{n+1}}{n} = \dfrac{2(-1)^{n+1}}{n}: x=2(sinxsin2x2+sin3x3)x = 2\left(\sin x - \dfrac{\sin 2x}{2} + \dfrac{\sin 3x}{3} - \cdots\right).

Step 4 — a famous payoff: at x=π2x = \tfrac\pi2 the series gives π2=2(113+15)\dfrac\pi2 = 2\left(1 - \dfrac13 + \dfrac15 - \cdots\right) — the Leibniz formula for π\pi, falling out of a heat-flow calculation.