4.7.11Partial Differential Equations

Solving wave equation — D'Alembert's solution

1,573 words7 min readdifficulty · medium

WHAT are we solving?


WHY does the solution split into two travelling waves?

Key idea: factor the operator. Write the equation as (ttc2xx)u=0.\Big(\partial_{tt}-c^2\partial_{xx}\Big)u=0. Treating t,x\partial_t,\partial_x like algebra (difference of squares): ttc2xx=(tcx)(t+cx).\partial_{tt}-c^2\partial_{xx}=\big(\partial_t-c\,\partial_x\big)\big(\partial_t+c\,\partial_x\big). Why this step? Because a2b2=(ab)(a+b)a^2-b^2=(a-b)(a+b), and these operators commute (mixed partials are equal for smooth uu). So the wave equation is two first-order transport equations chained together.

A transport equation (t+cx)w=0\big(\partial_t + c\,\partial_x\big)w=0 says: ww is constant along lines xct=constx-ct=\text{const}w=w= function of xctx-ct, a wave moving right. Likewise tcx\partial_t-c\partial_x gives waves moving left. This is the seed of the change of variables below.


HOW to derive D'Alembert (change of characteristics)

Step 1 — convert derivatives. Using the chain rule with x=ξ+η2x=\frac{\xi+\eta}{2}, t=ηξ2ct=\frac{\eta-\xi}{2c}: x=ξ+η,t=cξ+cη.\partial_x = \partial_\xi+\partial_\eta,\qquad \partial_t = -c\,\partial_\xi + c\,\partial_\eta. Why? Each old variable depends on both new ones; chain rule sums the contributions.

Step 2 — plug in. uxx=(ξ+η)2u=uξξ+2uξη+uηη,u_{xx}=(\partial_\xi+\partial_\eta)^2u = u_{\xi\xi}+2u_{\xi\eta}+u_{\eta\eta}, utt=c2(ξ+η)2u=c2(uξξ2uξη+uηη).u_{tt}=c^2(-\partial_\xi+\partial_\eta)^2u = c^2\big(u_{\xi\xi}-2u_{\xi\eta}+u_{\eta\eta}\big). Then uttc2uxx=c2(uξξ2uξη+uηη)c2(uξξ+2uξη+uηη)=4c2uξη=0.u_{tt}-c^2u_{xx}=c^2\big(u_{\xi\xi}-2u_{\xi\eta}+u_{\eta\eta}\big)-c^2\big(u_{\xi\xi}+2u_{\xi\eta}+u_{\eta\eta}\big)=-4c^2\,u_{\xi\eta}=0. Why this is magic: all the messy terms cancel, leaving simply uξη=0.\boxed{u_{\xi\eta}=0.}

Step 3 — integrate twice. uξη=0u_{\xi\eta}=0 means uηu_\eta doesn't depend on η\eta... integrate in η\eta: uξu_\xi is a function of ξ\xi only; integrate in ξ\xi: u=F(ξ)+G(η)=F(xct)+G(x+ct).u=F(\xi)+G(\eta)=F(x-ct)+G(x+ct). Why two arbitrary functions? A 2nd-order PDE in two variables needs two "constants of integration" — here whole functions.


HOW to fit the initial data → the D'Alembert formula

We must pin down FF and GG from ff and gg.

At t=0t=0: u(x,0)=F(x)+G(x)=f(x).\tag{1} Differentiate ut=cF(xct)+cG(x+ct)u_t = -cF'(x-ct)+cG'(x+ct) and set t=0t=0: u_t(x,0)=-cF'(x)+cG'(x)=g(x)\ \Rightarrow\ -F'(x)+G'(x)=\frac{g(x)}{c}.\tag{2} Integrate (2) from 00 to xx: -F(x)+G(x)=\frac1c\int_0^x g(s)\,ds + K.\tag{3} Add/subtract (1) and (3):

F(x)=\tfrac12 f(x)-\tfrac1{2c}\int_0^x g\,ds-\tfrac{K}{2}.$$ Now build $u=F(x-ct)+G(x+ct)$; the constants $K$ cancel and the integral limits combine: > [!formula] **D'Alembert's solution** > $$\boxed{\,u(x,t)=\frac{1}{2}\Big[f(x-ct)+f(x+ct)\Big]+\frac{1}{2c}\int_{x-ct}^{x+ct} g(s)\,ds\,}$$ > *Term 1:* the initial shape splits in half, each half travels opposite ways. > *Term 2:* the initial velocity spreads out over the ==domain of dependence== $[x-ct,\,x+ct]$. ![[4.7.11-Solving-wave-equation-—-D'Alembert's-solution.png]] > [!intuition] Domain of dependence & influence > $u(x,t)$ depends ONLY on $f$ at the two points $x\pm ct$ and on $g$ over the interval between them. Nothing outside that interval can affect $(x,t)$ — **finite propagation speed $c$**. --- ## Worked examples > [!example] 1 — Pure displacement, zero velocity > $f(x)=e^{-x^2}$, $g=0$, $c=1$. > Since $g=0$, the integral vanishes: > $$u(x,t)=\tfrac12 e^{-(x-t)^2}+\tfrac12 e^{-(x+t)^2}.$$ > *Why this step?* With no initial velocity the bump simply splits into two half-height bumps moving apart. **Forecast-then-verify:** at $t=0$ they overlap → $u=e^{-x^2}=f$. ✓ > [!example] 2 — Zero displacement, a velocity kick > $f=0$, $g(x)=\cos x$, $c=2$. > $$u=\frac1{4}\int_{x-2t}^{x+2t}\cos s\,ds=\frac1{4}\big[\sin(x+2t)-\sin(x-2t)\big] > =\frac12\cos x\,\sin 2t.$$ > *Why?* Used $\sin A-\sin B=2\cos\frac{A+B}2\sin\frac{A-B}2$. Check $t=0$: $u=0$ ✓; $u_t|_0=\cos x\cdot\cos(2t)\cdot... \to \cos x$ ✓. > [!example] 3 — Both data present > $f(x)=\sin x$, $g(x)=1$, $c=1$. > $$u=\tfrac12[\sin(x-t)+\sin(x+t)]+\tfrac12\int_{x-t}^{x+t}1\,ds > =\sin x\cos t + t.$$ > *Why?* Sum-to-product gives $\sin x\cos t$; the integral of $1$ is the interval length $2t$, halved → $t$. The string both oscillates and drifts upward at unit speed (constant velocity input). --- ## Steel-manned mistakes > [!mistake] "$F$ and $G$ are the same function." > *Why it feels right:* the formula looks symmetric in $f$. *Reality:* they differ by the velocity integral; only when $g=0$ do the half-shapes look alike. **Fix:** always solve the (1)&(3) system; don't assume symmetry. > [!mistake] Forgetting the sign in $x-ct$ vs $x+ct$. > *Why it feels right:* both are "$x$ and $t$." *Fix:* a right-mover keeps a fixed value where $x-ct=$const, so as $t\uparrow$, $x$ must $\uparrow$ — that's $f(x-ct)$. Memorise: **minus = moves +x direction.** > [!mistake] Putting $\dfrac1{2}$ instead of $\dfrac1{2c}$ on the integral. > *Why it feels right:* mirrors the $\tfrac12$ on $f$. *Fix:* it came from dividing by $c$ in eq. (2). Dimensionally, $g$ has units of velocity; $\int g\,ds$ has (velocity·length), and dividing by $c$ (velocity) gives length = displacement. The $c$ **must** be there. --- ## #flashcards/maths What PDE does D'Alembert solve? ::: The 1D wave equation $u_{tt}=c^2u_{xx}$ on the infinite line. Factor the wave operator. ::: $(\partial_t-c\partial_x)(\partial_t+c\partial_x)$. What characteristic coordinates linearise it? ::: $\xi=x-ct,\ \eta=x+ct$, reducing it to $u_{\xi\eta}=0$. General solution of the wave equation? ::: $u=F(x-ct)+G(x+ct)$ (right- + left-moving waves). State D'Alembert's formula. ::: $u(x,t)=\tfrac12[f(x-ct)+f(x+ct)]+\tfrac1{2c}\int_{x-ct}^{x+ct}g(s)\,ds$. Why $\tfrac1{2c}$ on the integral (not $\tfrac12$)? ::: It comes from dividing the velocity condition by $c$; dimensionally restores displacement. What is the domain of dependence of $(x_0,t_0)$? ::: The interval $[x_0-ct_0,\ x_0+ct_0]$ on the initial line. Physical meaning of finite $c$? ::: Disturbances travel at speed $c$; data outside $[x-ct,x+ct]$ cannot influence $u(x,t)$. If $g=0$, what happens to the initial bump? ::: It splits into two half-height copies moving in opposite directions at speed $c$. --- > [!recall]- Feynman: explain to a 12-year-old > Imagine flicking a long skipping rope. The bump you made doesn't just sit there — it splits into **two** smaller bumps: one runs to the right, one to the left, both at the same speed. If instead you just smacked the rope to give it a push (but no starting shape), that push spreads out into a widening flat region between two travelling edges. D'Alembert's formula is just the recipe: "take your starting shape, cut it in half, send the halves opposite ways; take your starting push and smear it across the stretch the wave can reach." That's the whole song. > [!mnemonic] **"Half the shape goes both ways; the speed slices the push."** > $\tfrac12$ for the splitting shape, and $\tfrac1{2c}$ (the $c$ = "slice") for the velocity integral over $x\pm ct$. --- ## Connections - [[Method of Characteristics]] — same $\xi,\eta$ lines, generalises to other hyperbolic PDEs. - [[Transport Equation]] — the first-order factors $\partial_t\pm c\partial_x$. - [[Separation of Variables — Wave Equation]] — alternative (Fourier) route on bounded strings. - [[Domain of Dependence and Influence]] — causality / finite speed. - [[Classification of Second-Order PDEs]] — wave eqn is the hyperbolic prototype. - [[Heat Equation]] — contrast: infinite propagation speed, no characteristics. ## 🖼️ Concept Map ```mermaid flowchart TD WE[Wave equation u_tt=c2 u_xx] -->|initial data| IC[f shape and g velocity] WE -->|factor operator| FAC[Difference of squares] FAC -->|yields| TRANS[Two transport equations] TRANS -->|constant along| CHAR[Characteristic lines x-ct and x+ct] CHAR -->|define coords| XI[xi=x-ct, eta=x+ct] XI -->|chain rule| SIMP[Equation becomes u_xi_eta=0] SIMP -->|integrate twice| GEN[u=F of xi plus G of eta] GEN -->|right-mover| RIGHT[F x-ct shifts right] GEN -->|left-mover| LEFT[G x+ct shifts left] IC -->|split into| GEN ``` ## 🔊 Hinglish (regional understanding) > [!intuition]- Hinglish mein samjho > Dekho, wave equation $u_{tt}=c^2u_{xx}$ ka matlab simple hai: koi bhi disturbance — rope ka bump ya sound pulse — apni shape kept rakhte hue speed $c$ se travel karta hai. D'Alembert ka jabardast idea yeh tha ki operator ko factor kar do: $\partial_{tt}-c^2\partial_{xx}=(\partial_t-c\partial_x)(\partial_t+c\partial_x)$. Yeh do transport equations ban jaate hain — ek right-moving wave, ek left-moving wave. Isliye general solution hamesha $u=F(x-ct)+G(x+ct)$ hota hai. > > Solve karne ke liye hum characteristic coordinates lete hain: $\xi=x-ct$, $\eta=x+ct$. In coordinates me equation seedha $u_{\xi\eta}=0$ ban jaati hai (saari extra terms cancel ho jaati hain, yeh hi asli magic hai). Do baar integrate karo to $u=F(\xi)+G(\eta)$ mil jaata hai. > > Ab initial conditions $f$ (shape) aur $g$ (velocity) fit karo, to final D'Alembert formula nikalti hai: $u=\tfrac12[f(x-ct)+f(x+ct)]+\tfrac1{2c}\int_{x-ct}^{x+ct}g\,ds$. Yaad rakho — shape aadhi-aadhi dono directions me jaati hai, aur velocity ka effect $x-ct$ se $x+ct$ tak ke interval me phail jaata hai. Yeh interval hi domain of dependence hai: $(x,t)$ point sirf isi range ke data par depend karta hai — yani information speed $c$ se hi travel karti hai, usse zyada nahi. > > Important galti: integral pe $\tfrac1{2c}$ likhna, sirf $\tfrac12$ nahi — woh $c$ velocity condition divide karne se aata hai aur dimensions theek rakhta hai. Aur sign yaad rakho: $x-ct$ matlab right ki taraf jaane wali wave. Bas itna pakka kar lo, baaki sab plug-and-chug hai. ![[audio/4.7.11-Solving-wave-equation-—-D'Alembert's-solution.mp3]]

Go deeper — visual, from zero

Test yourself — Partial Differential Equations

Connections