Flow Lab

Syllabus / Module 9: Classical PDEs: Heat, Waves & Potentials

Lesson 9.5

d'Alembert's Solution & Characteristics

Traveling waves, d'Alembert's formula, domains of dependence and influence, reflections at boundaries.

Written byClaude Sonnet

🌊
Why this matters for simulation: Information in compressible flow travels along characteristics — the basis of shock-capturing schemes.

By the end of this lesson you can…

  • Factor the wave operator, use $\xi = x - ct$, $\eta = x + ct$, and derive $u = F(x - ct) + G(x + ct)$.
  • Derive d'Alembert's formula and evaluate it for a released bump, a one-way pulse and a struck string.
  • Find the domain of dependence of a point and the domain of influence of an interval.
  • Use the method of images (odd or even extension, period $2L$) for half-line and interval problems.
  • Solve $u_{tt} = c^2u_{xx} + S$ by Duhamel's principle as an integral of $S$ over the dependence triangle.
  • Explain CFL as 'the numerical domain of dependence must contain the physical one', and split acoustics into two Riemann invariants carried at $\pm c$.
On this page
·
  1. Factoring the operator
  2. d’Alembert’s formula
  3. Where information comes from and where it goes
  4. Walls: the method of images
  5. Forcing: Duhamel’s principle
  6. The numerical link: CFL as dependence
  7. First-order systems: acoustics and Riemann invariants
  8. Check your understanding
  9. Problems
  10. Computation
  11. Key Takeaways
  12. What comes next

9.4 The Wave Equation & Vibrating Strings used d’Alembert’s formula and the method of images as tools: it split a pulse in two, bounced the halves off the ends, and warned that a leapfrog scheme with c Δt/Δx>1c\,\Delta t/\Delta x \gt 1 blows up. This lesson earns those claims. The result is an exact picture of the one-dimensional wave equation: every value u(x,t)u(x,t) is built from initial values found by following two straight lines backward in time, the template for how compressible-flow codes treat information.

▶ Video Two characteristic families in the x-t plane, d'Alembert's formula assembled from two feet, the light cone, a pulse bouncing off a wall and a pulse of pressure splitting into two Riemann invariantscaptions only
Transcript
  1. The wave operator factors just like a squared minus b squared, into d t minus c d x times d t plus c d x. Change variables to xi equals x minus c t and eta equals x plus c t, and the equation becomes u xi eta equals zero. So every solution is one shape moving right plus one moving left, F of x minus c t plus G of x plus c t, running along two families of straight characteristics.
  2. Now match the data at time zero. F plus G must equal the starting shape f, and the slope condition fixes G minus F by the integral of the velocity g. Solving gives d'Alembert's formula: walk back from the point along both characteristics to the two feet, average the shape there, and add the velocity accumulated between them.
  3. Release a bump from rest, and at x equals 0.2, time 0.3, the feet are at minus 0.1 and 0.5, so u is 0.5. At the old centre, x equals 0.5, both feet miss the bump and u is 0. Choose the velocity as minus c times f prime, and you get a one-way pulse that keeps its full height: u is 1 at x equals 1.3, time 0.8. Strike the string with a hammer instead, and the point lifts and stays lifted, on a plateau of 0.2.
  4. Each point depends only on the interval between its two feet, and nothing outside it: its domain of dependence. Turn the picture over, and an interval of data influences a wedge, bounded by the two outer characteristics, with u exactly zero outside. That is the light cone, and it is why waves have a finite speed c, while heat does not.
  5. A wall has no characteristic coming from the left, so extend the data past it. A fixed end uses an odd extension, with a mirror bump upside down, and a free end uses an even one. For the bump at 0.5, at x equals 0.2 and time 0.7, the answer is minus 0.5 with a fixed end and plus 0.5 with a free end. At the wall at time 0.5, the fixed end reads 0, and the free end reads 1, twice the height of each half.
  6. On an interval with both ends fixed, the extension must be odd about both ends, which makes it odd and periodic with period 2 L. Characteristics fold back at the walls like a billiard ball. For length 1.5, after one period the shape returns exactly: u at 0.5, time 3 is 1, and again at time 6.
  7. Add a source and treat it as a sequence of kicks. Each kick spreads by d'Alembert's formula, and summing them gives Duhamel's principle: integrate the source over the dependence triangle. A uniform load S 0 gives S 0 t squared over 2. A Gaussian source gives 0.41186 at x equals 1, time 2, just under the bound of 0.4431. On a half-line at x equals 0.5, the images give 0.2215 with a fixed end and 0.4431 with a free end.
  8. Now the numerics. After n steps a grid scheme sees only data within n cells, so its numerical dependence has half-width c t over nu. If nu exceeds 1, the physical dependence is larger, and the scheme never sees data the true answer needs. At x equals 1.4, time 0.8, the exact value is 0.25. Leapfrog gives 0.2474 at nu 0.5, 0.2488 at 0.8, exactly 0.25 at 1, about minus 2.4 times 10 to the 4 at 1.05, and exactly 0 at 1.25, where it misses the bump entirely.
  9. Fluid codes use first-order systems. For sound, p plus Z u moves right at speed c, and p minus Z u moves left: two Riemann invariants, with Z equal to rho c. For air, Z is 408. A 100 Pa pulse at rest splits into two 50 Pa halves, with air speed plus or minus 0.1225 metres per second. At a rigid wall the images are even, and the pressure there reaches 100 Pa with u equal to 0.
  10. To recap. Factoring the operator gives two families of characteristics and d'Alembert's formula. Dependence and influence give the light cone, images handle walls, Duhamel handles forcing, and CFL says the scheme must see what the physics sees. Next: forced and nonhomogeneous problems, where sources oscillate and boundaries move.

Factoring the operator

The wave operator factors exactly like a2−b2a^2 - b^2:

utt−c2uxx=(∂t−c ∂x)(∂t+c ∂x)u=0.u_{tt} - c^2u_{xx} = \bigl(\partial_t - c\,\partial_x\bigr)\bigl(\partial_t + c\,\partial_x\bigr)u = 0 .

Let v=ut+c uxv = u_t + c\,u_x. The equation says vt−c vx=0v_t - c\,v_x = 0, which is the transport equation of 9.10 First-Order PDEs: Advection & Characteristics with speed −c-c: vv is constant along the lines x+ct=constx + ct = \text{const}, so v=2c G′(x+ct)v = 2c\,G'(x + ct) for some function GG. Then ut+c ux=2c G′(x+ct)u_t + c\,u_x = 2c\,G'(x+ct) is transport with a known source along x−ct=constx - ct = \text{const}, and it is solved by G(x+ct)G(x+ct) plus an arbitrary function of x−ctx - ct. The result is

u(x,t)=F(x−ct)+G(x+ct).u(x,t) = F(x - ct) + G(x + ct).

The same answer comes from a change of variables. Put ξ=x−ct\xi = x - ct and η=x+ct\eta = x + ct. By the chain rule ∂t=−c ∂ξ+c ∂η\partial_t = -c\,\partial_\xi + c\,\partial_\eta and ∂x=∂ξ+∂η\partial_x = \partial_\xi + \partial_\eta, so

utt−c2uxx=−4c2 uξη.u_{tt} - c^2u_{xx} = -4c^2\,u_{\xi\eta}.

The equation is uξη=0u_{\xi\eta} = 0: uξu_\xi does not depend on η\eta, so u=F(ξ)+G(η)u = F(\xi) + G(\eta). The lines ξ=const\xi = \text{const} and η=const\eta = \text{const} are the characteristics of the equation, two families of straight lines of slopes dx/dt=+cdx/dt = +c and −c-c in the xx-tt plane.

Unlike the nonlinear case of 9.11 Nonlinear Waves: Burgers' Equation & Shocks, the speed here is the constant cc: the lines of a family are parallel and never meet.

d’Alembert’s formula

Now impose initial data u(x,0)=f(x)u(x,0) = f(x) and ut(x,0)=g(x)u_t(x,0) = g(x) on the whole line. At t=0t = 0:

F(x)+G(x)=f(x),−c F′(x)+c G′(x)=g(x).F(x) + G(x) = f(x),\qquad -c\,F'(x) + c\,G'(x) = g(x).

Integrate the second equation from 00 to xx and write Γ(x)=∫0xg(s) ds\Gamma(x) = \int_0^x g(s)\,ds, so G−F=Γ/c+constG - F = \Gamma/c + \text{const}. Solve the pair for FF and GG:

F=f2−Γ2c+k,G=f2+Γ2c−k.F = \frac{f}{2} - \frac{\Gamma}{2c} + k,\qquad G = \frac{f}{2} + \frac{\Gamma}{2c} - k .

The constant kk cancels in F(x−ct)+G(x+ct)F(x-ct) + G(x+ct), and what remains is d’Alembert’s formula:

u(x,t)=f(x−ct)+f(x+ct)2+12c∫x−ctx+ctg(s) ds.u(x,t) = \frac{f(x - ct) + f(x + ct)}{2} + \frac{1}{2c}\int_{x-ct}^{x+ct}g(s)\,ds .

Read it as a recipe: walk back from (x,t)(x,t) along the two characteristics to the feet x∓ctx \mp ct on the xx-axis, average the shape there, and add the velocity accumulated between them.

Example 1: released from rest. Take g=0g = 0, c=1c = 1, and the cosine-squared bump f(y)=cos⁡2 ⁣(π(y−0.5)/0.4)f(y) = \cos^2\!\bigl(\pi(y - 0.5)/0.4\bigr) for ∣y−0.5∣<0.2\lvert y - 0.5\rvert \lt 0.2 (zero elsewhere), the same shape as in the previous lesson. At (x,t)=(0.2,0.3)(x,t) = (0.2, 0.3) the feet are −0.1-0.1 and 0.50.5, so u=12(0+1)=0.5u = \tfrac12(0 + 1) = 0.5. At (0.5,0.3)(0.5, 0.3), the centre of the original bump, the feet are 0.20.2 and 0.80.8, both outside the bump, so u=0u = 0: the bump has left its starting point and the string there is flat.

Example 2: a one-way pulse. Choose g=−c f′g = -c\,f'. Then Γ=−c f\Gamma = -c\,f (the bump vanishes at −∞-\infty), and the formula collapses to u=f(x−ct)u = f(x - ct): a pulse that only moves right. At (1.3,0.8)(1.3, 0.8) the feet are 0.50.5 and 2.12.1, so u=12(f(0.5)+f(2.1))+12(Γ(2.1)−Γ(0.5))=12(1+0)+12(0+1)=1u = \tfrac12\bigl(f(0.5) + f(2.1)\bigr) + \tfrac12\bigl(\Gamma(2.1) - \Gamma(0.5)\bigr) = \tfrac12(1 + 0) + \tfrac12(0 + 1) = 1: the bump has simply travelled 0.80.8 to the right and kept its full height. At (−0.3,0.8)(-0.3, 0.8) the answer is 00. The two-halves split of the last lesson (g=0g = 0) has both halves present.

Example 3: a struck string. Take f=0f = 0 and g=1g = 1 on [0.3,0.7][0.3, 0.7] (a hammer). At the middle x=0.5x = 0.5 the integral covers [0.5−t,0.5+t]∩[0.3,0.7][0.5 - t, 0.5 + t]\cap[0.3, 0.7], so u=12⋅2t=tu = \tfrac12\cdot 2t = t for t≤0.2t \le 0.2, giving u(0.5,0.1)=0.1u(0.5,0.1) = 0.1, and then u=12(0.4)=0.2u = \tfrac12(0.4) = 0.2 for all later times: the point is lifted by the hammer and stays lifted. On an infinite line a velocity impulse leaves a permanent plateau of height 12c∫g\tfrac1{2c}\int g. (From memory: in three dimensions there is no such wake, Huygens’ principle.)

Where information comes from and where it goes

Every point (x∗,t∗)(x_*,t_*) with t∗>0t_* \gt 0 has a domain of dependence: the interval [x∗−ct∗, x∗+ct∗][x_* - ct_*,\ x_* + ct_*] of the initial line. The value u(x∗,t∗)u(x_*,t_*) uses ff at the two endpoints and gg on the whole interval, and nothing outside. Turn the picture upside down: an interval [a,b][a,b] of initial data affects the points (x,t)(x,t) whose dependence interval overlaps [a,b][a,b], namely a−ct<x<b+cta - ct \lt x \lt b + ct. This is its domain of influence, a wedge of the plane bounded by the two outer characteristics. Outside the wedge uu is exactly zero. Together they form the light cone, with cc the signal speed.

Unlike the heat equation of 9.3 Solving the Heat Equation: Separation of Variables, where a point source warms the whole rod at once, waves have a finite propagation speed cc. In the sim the dashed lines are the edges of the bump’s influence wedge.

Inside the dependence interval, for g=0g = 0 only the two endpoints matter: the interior can change and uu will not notice, which is why the centre of the bump is quiet at t=0.3t = 0.3 in Example 1.

◆ Interactive The x-t plane: characteristics, dependence, walls, a Duhamel source, the leapfrog cone and acoustic invariants

Loading simulation…

What to try. Drag the dot; switch the data to one-way and struck; change the domain; tick the Duhamel and CFL boxes.

Walls: the method of images

A half-line x≥0x \ge 0 with a fixed end u(0,t)=0u(0,t) = 0 has no characteristic coming from the left of the wall, so d’Alembert’s formula has nothing to evaluate. The trick is to extend the data to the whole line so that the wall condition holds automatically. Put x=0x = 0 in the formula:

u(0,t)=12[f(−ct)+f(ct)]+12c∫−ctctg ds.u(0,t) = \tfrac12\bigl[f(-ct) + f(ct)\bigr] + \tfrac1{2c}\int_{-ct}^{ct}g\,ds .

This vanishes for every tt if ff is odd and gg is odd (an odd gg integrates to zero over a symmetric interval). So for a fixed end extend ff and gg as odd functions. For a free end ux(0,t)=0u_x(0,t) = 0, the same computation says that the extensions should be even. A shape at x0>0x_0 \gt 0 then has a mirror image at −x0-x_0 with the sign flipped (fixed) or kept (free), and the image’s wave running in from the left is what the reflection looks like. This is the method of images, the trick behind the series of 8.4 Even & Odd Extensions: Sine and Cosine Series.

Numbers from the sim (bump at x0=0.5x_0 = 0.5, released from rest, c=1c = 1). At (x,t)=(0.2,0.7)(x,t) = (0.2, 0.7) the feet are −0.5-0.5 and 0.90.9. The bump itself sits at 0.50.5, and its mirror at −0.5-0.5 is the one the foot hits: u=−0.5u = -0.5 for a fixed end (inverted reflection) and u=+0.5u = +0.5 for a free end. At the wall itself at t=0.5t = 0.5, the two halves meet: u(0,0.5)=0u(0, 0.5) = 0 for a fixed end and u(0,0.5)=1u(0, 0.5) = 1 for a free end, twice the height of each half.

An interval [0,L][0, L] with both ends fixed has two walls, so the extension must be odd about both: odd about 00 and odd about LL, which makes it odd and periodic with period 2L2L. The xx-tt picture is a strip, and a characteristic that reaches a wall is folded back, like a billiard ball. The formula is unchanged: u=12[F(x−ct)+F(x+ct)]+…u = \tfrac12[F(x-ct) + F(x+ct)] + \ldots with FF the periodic extension. After one period 2L/c2L/c the shape returns exactly: for L=1.5L = 1.5 the bump has u(0.5,3)=1u(0.5, 3) = 1, and again at t=6t = 6. The sine modes of 9.4 The Wave Equation & Vibrating Strings are exactly such odd periodic functions, each carried by two characteristics.

Forcing: Duhamel’s principle

Add a source: utt=c2uxx+S(x,t)u_{tt} = c^2u_{xx} + S(x,t) with u=ut=0u = u_t = 0 at t=0t = 0. Here is an idea you have met for ODEs in 5.5 Variation of Parameters: treat the source as a sequence of kicks. During (s,s+ds)(s, s + ds) the source gives the string an extra velocity S(x,s) dsS(x,s)\,ds and then lets it go. By d’Alembert’s formula (zero shape, velocity S(⋅,s)S(\cdot,s), starting at time ss) that kick evolves into

w(x,t;s)=12c∫x−c(t−s)x+c(t−s)S(y,s) dy,w(x,t;s) = \frac{1}{2c}\int_{x - c(t-s)}^{x + c(t-s)} S(y,s)\,dy,

and by linearity the solution is the sum of all the kicks, Duhamel’s principle:

u(x,t)=12c∫0t ⁣ ⁣∫x−c(t−s)x+c(t−s)S(y,s) dy ds.u(x,t) = \frac{1}{2c}\int_0^{t}\!\!\int_{x - c(t-s)}^{x + c(t-s)} S(y,s)\,dy\,ds .

The region of integration is exactly the dependence triangle of (x,t)(x,t): apex at (x,t)(x,t), base [x−ct,x+ct][x - ct, x + ct]. Check: ut=∫wt dsu_t = \int w_t\,ds since w(⋅,t;t)=0w(\cdot,t;t) = 0, and utt=wt(x,t;t)+∫wtt ds=S+c2uxxu_{tt} = w_t(x,t;t) + \int w_{tt}\,ds = S + c^2u_{xx}.

Example 4: uniform load. If S=S0S = S_0 everywhere, the triangle has area c t2c\,t^2, so u=S0t2/2u = S_0t^2/2: every point simply falls under the constant force, independent of xx.

A smooth source in the sim. Take c=1c = 1 and the steady Gaussian source S(y)=e−((y−1)/0.25)2S(y) = e^{-((y - 1)/0.25)^2}, switched on at t=0t = 0, on the whole line. The sim’s double midpoint integral gives u(1,2)=0.41186u(1, 2) = 0.41186 and u(1.4,0.8)=0.08846u(1.4, 0.8) = 0.08846. As a bound, u≤12c t∫S=0.4431u \le \tfrac1{2c}\,t\int S = 0.4431 at t=2t = 2, and the result sits below it because early triangles do not yet cover the whole Gaussian. With the same source on a half-line the images matter: at (0.5,2)(0.5, 2) the sim gives 0.22150.2215 for a fixed end and 0.44310.4431 for a free end. The next lesson, 9.7 Nonhomogeneous Problems & Eigenfunction Expansions, treats time-dependent sources and boundary values by modes.

A grid scheme advances ujn+1u_j^{n+1} from a few nearby values at the previous steps. After nn steps ujnu_j^n depends only on initial data within n Δxn\,\Delta x of xjx_j: the numerical domain of dependence is the interval [xj−nΔx, xj+nΔx][x_j - n\Delta x,\ x_j + n\Delta x]. With t=n Δtt = n\,\Delta t its half-width is t Δx/Δt=ct/νt\,\Delta x/\Delta t = ct/\nu where ν=c Δt/Δx\nu = c\,\Delta t/\Delta x is the Courant number. The physical dependence interval has half-width ctct. If ν>1\nu \gt 1, the physical interval is larger, so a datum the true solution needs is never seen by the scheme. Changing that datum changes the exact answer but not the numerical one, so the scheme cannot converge. This is the Courant-Friedrichs-Lewy (CFL) condition:

numerical domain of dependence⊇physical domain of dependence  ⟺  ν≤1.\text{numerical domain of dependence} \supseteq \text{physical domain of dependence}\iff \nu \le 1 .

It is necessary, not sufficient (from memory; 10.3 Von Neumann Stability Analysis gives the sufficiency tool).

Use the leapfrog scheme of the previous lesson on [−3,3][-3, 3] with Δx=0.01\Delta x = 0.01, the bump at x0=0.5x_0 = 0.5, and watch the value at (x∗,t∗)=(1.4,0.8)(x_*,t_*) = (1.4, 0.8), where the exact value is 12f(0.6)=0.25\tfrac12 f(0.6) = 0.25:

ν\nustepsscheme’s dependence reachuu at (1.4,0.8)(1.4, 0.8)
0.51601.600.2474
0.81001.000.2488
1.0800.800.2500 (exact)
1.05760.76about −2.4×104-2.4\times10^{4}
1.25640.64exactly 0

At ν=1\nu = 1 the numerical and physical characteristics coincide and the scheme is exact. At ν=1.25\nu = 1.25 the scheme looks only to 0.640.64 on either side of 1.41.4, so it sees [0.76,2.04][0.76, 2.04], which misses the bump (support [0.3,0.7][0.3, 0.7]) entirely: the value is exactly zero where the true value is 0.250.25. At ν=1.05\nu = 1.05 the scheme does see part of the bump, but an instability destroys the answer. For ν<1\nu \lt 1 the scheme sees more than it needs, and the small deficit (0.24880.2488 against 0.250.25) is numerical dispersion: short waves lag behind cc (from memory; the deficit does shrink with the grid, to 0.24990.2499 at ν=0.8\nu = 0.8 with Δx=0.0025\Delta x = 0.0025), made quantitative in 10.5 Wave Equation Numerics & the CFL Condition.

First-order systems: acoustics and Riemann invariants

Fluid solvers do not use utt=c2uxxu_{tt} = c^2u_{xx} but first-order systems for several unknowns. Linearize 1D compressible flow about still air of density ρ\rho and sound speed cc (11.12 Compressible Flow & Shocks). For the pressure disturbance pp and the velocity uu:

pt+ρc2 ux=0,ρ ut+px=0.p_t + \rho c^2\,u_x = 0,\qquad \rho\,u_t + p_x = 0 .

Eliminating uu gives back ptt=c2pxxp_{tt} = c^2p_{xx}, but there is a more useful move. Let Z=ρcZ = \rho c (the acoustic impedance), and look at the two combinations w±=p±Zuw_\pm = p \pm Zu. Add ZZ times the second equation to the first:

(p+Zu)t+c (p+Zu)x=0,(p + Zu)_t + c\,(p + Zu)_x = 0 ,

and subtracting gives (p−Zu)t−c (p−Zu)x=0(p - Zu)_t - c\,(p - Zu)_x = 0. Each combination is a Riemann invariant, transported by a plain advection equation, w+w_+ to the right at speed cc and w−w_- to the left. These are the two combinations that do not mix: the eigenvectors of the coefficient matrix, with eigenvalues ±c\pm c (1.6 Change of Basis & Diagonalization). A pressure pulse released at rest has u=0u = 0, so w+=w−=pw_+ = w_- = p: half of it goes each way.

Numbers. Take sea-level air, ρ=1.2\rho = 1.2 kg/m3^3, c=340c = 340 m/s, so Z=408Z = 408 Pa s/m. A 100100 Pa pulse at rest splits into two 5050 Pa halves. The right-moving half has u=p/Z=50/408=0.1225u = p/Z = 50/408 = 0.1225 m/s (the air moves with the wave), and the left-moving half has u=−0.1225u = -0.1225 m/s. Next to a rigid wall (u=0u = 0) the images are even: pressure reflects upright, and at t=x0t = x_0 the pressure at the wall is 100100 Pa, the sum of the halves, with u=0u = 0. A closed end acts like the free end of the string.

Check your understanding

✅ Concept check

Using d'Alembert's formula with $g = 0$ and $c = 2$, which initial values determine $u(3, 1)$?

✅ Concept check

A bump is released next to the end of a half-line string. How should $f$ be extended to the left of the end so that the end is FREE ($u_x = 0$)?

✅ Concept check

With $c = 1$ and a uniform source $S = 3$ on the whole line (zero initial data), what is $u(x, 2)$?

✅ Concept check

A scheme uses $\nu = c\,\Delta t/\Delta x = 1.25$. Which statement is correct?

Problems

✏️ Pen & paperA standing wave through d'Alembert●○○

Let c=2c = 2, f(x)=sin⁡xf(x) = \sin x, g=0g = 0 on the whole line. (a) Find u(x,t)u(x,t). (b) Evaluate u(π/2,π/6)u(\pi/2, \pi/6) and give the domain of dependence of the point (π/2,π/6)(\pi/2, \pi/6).

Show worked solution

(a) u=12[sin⁡(x−2t)+sin⁡(x+2t)]=sin⁡x cos⁡2tu = \tfrac12[\sin(x - 2t) + \sin(x + 2t)] = \sin x\,\cos 2t, a standing wave: a pair of traveling waves. (b) u(π/2,π/6)=1⋅cos⁡(π/3)=12u(\pi/2, \pi/6) = 1\cdot\cos(\pi/3) = \tfrac12. The feet are x∓ct=π/2∓π/3x \mp ct = \pi/2 \mp \pi/3, so the domain of dependence is [π/6, 5π/6][\pi/6,\ 5\pi/6].

✏️ Pen & paperA velocity-only start●●○

For c=1c = 1, f=0f = 0 and g(x)=cos⁡xg(x) = \cos x on the whole line, find uu by d’Alembert’s formula and check that it satisfies utt=uxxu_{tt} = u_{xx} and the initial conditions.

Show worked solution

u=12∫x−tx+tcos⁡s ds=12[sin⁡(x+t)−sin⁡(x−t)]=cos⁡x sin⁡tu = \tfrac12\int_{x-t}^{x+t}\cos s\,ds = \tfrac12[\sin(x+t) - \sin(x-t)] = \cos x\,\sin t. Then utt=−cos⁡xsin⁡t=uxxu_{tt} = -\cos x\sin t = u_{xx}, u(x,0)=0u(x,0) = 0 and ut(x,0)=cos⁡xu_t(x,0) = \cos x. It is a standing wave with a shape cos⁡x\cos x and a time factor sin⁡t\sin t.

✏️ Pen & paperConstant force against a fixed end●●●

A half-line string x≥0x \ge 0 with u(0,t)=0u(0,t) = 0 starts at rest and feels the constant force S0S_0. Using Duhamel and the odd extension, show u(x,t)=S0x(2ct−x)/(2c2)u(x,t) = S_0x(2ct - x)/(2c^2) for 0<x<ct0 \lt x \lt ct and u=S0t2/2u = S_0t^2/2 for x≥ctx \ge ct.

Show worked solution

For x≥ctx \ge ct the dependence triangle stays in y≥0y \ge 0 and u=12cS0⋅ct2=S0t2/2u = \tfrac1{2c}S_0\cdot ct^2 = S_0t^2/2. For 0<x<ct0 \lt x \lt ct the part of the triangle with y<0y \lt 0 meets the odd source −S0-S_0. Let T0=t−x/cT_0 = t - x/c, the time at which the left side of the triangle crosses the wall. For s<T0s \lt T_0 the inner integral is S0[(r+x)−(r−x)]=2xS0S_0[(r + x) - (r - x)] = 2xS_0 with r=c(t−s)r = c(t-s); for s>T0s \gt T_0 it is 2rS02rS_0. Then

u=S02c[2x T0+∫T0t2c(t−s) ds]=S02c[2x(t−xc)+x2c]=S0 x (2ct−x)2c2.u = \frac{S_0}{2c}\Bigl[2x\,T_0 + \int_{T_0}^t 2c(t-s)\,ds\Bigr] = \frac{S_0}{2c}\Bigl[2x\Bigl(t - \frac xc\Bigr) + \frac{x^2}{c}\Bigr] = \frac{S_0\,x\,(2ct - x)}{2c^2}.

At x=ctx = ct both formulas give S0t2/2S_0t^2/2.

✏️ Pen & paperRiemann invariants of a measured state●●○

In air with Z=408Z = 408 Pa s/m a probe reads p=300p = 300 Pa and u=0.5u = 0.5 m/s at one instant. Find the invariants w±w_\pm and the pressure carried by the right-moving and left-moving parts.

Show worked solution

w+=p+Zu=300+204=504w_+ = p + Zu = 300 + 204 = 504 Pa and w−=p−Zu=300−204=96w_- = p - Zu = 300 - 204 = 96 Pa. Each part carries half of its invariant: 504/2=252504/2 = 252 Pa moving right (with u=252/408=0.618u = 252/408 = 0.618 m/s) and 96/2=4896/2 = 48 Pa moving left (with u=−48/408=−0.118u = -48/408 = -0.118 m/s). Their sum gives p=300p = 300 Pa and u=0.5u = 0.5 m/s as measured.

Computation

A bump on the interval [0,1.5][0, 1.5] with fixed ends, evolved with nothing but the odd periodic extension and d’Alembert’s formula.

🐍 PythonLab: images on an interval
⌘/Ctrl + Enter

Now implement the two formulas of this lesson yourself.

🧪 Coding exerciseExercise: d'Alembert and Duhamel
⌘/Ctrl + Enter

Try the Gaussian source with n=50n = 50 and n=400n = 400 and see how quickly the midpoint rule converges.

Key Takeaways

  • Factoring the wave operator and using ξ=x−ct\xi = x - ct, η=x+ct\eta = x + ct gives uξη=0u_{\xi\eta} = 0, so u=F(x−ct)+G(x+ct)u = F(x - ct) + G(x + ct) along two families of straight characteristics.
  • d’Alembert’s formula u=12[f(x−ct)+f(x+ct)]+12c∫x−ctx+ctgu = \tfrac12[f(x-ct) + f(x+ct)] + \tfrac1{2c}\int_{x-ct}^{x+ct}g comes from matching F+G=fF + G = f and −cF′+cG′=g-cF' + cG' = g; the released bump has u(0.5,0.3)=0u(0.5, 0.3) = 0 and u(0.2,0.3)=0.5u(0.2, 0.3) = 0.5.
  • A struck string leaves a plateau 12c∫g\tfrac1{2c}\int g on the infinite line (0.20.2 for the unit hammer of width 0.40.4).
  • The domain of dependence of (x,t)(x,t) is [x−ct,x+ct][x - ct, x + ct], the domain of influence of an interval is a wedge, and uu is exactly zero outside it.
  • Fixed ends mean odd images, free ends even images (u(0,0.5)=0u(0, 0.5) = 0 or 11 for the bump at 0.50.5); an interval of length LL has period 2L2L.
  • Duhamel: u=12c∬Su = \tfrac1{2c}\iint S over the dependence triangle, S0t2/2S_0t^2/2 for a uniform load and 0.411860.41186 at (1,2)(1, 2) for the sim’s Gaussian source.
  • CFL means the numerical dependence (half-width ct/νct/\nu) must contain the physical one: at (1.4,0.8)(1.4, 0.8) leapfrog gives 0.250.25 at ν=1\nu = 1, exactly 00 at 1.251.25 and about −2.4×104-2.4\times10^4 at 1.051.05.
  • In acoustics w±=p±Zuw_\pm = p \pm Zu move at ±c\pm c (Riemann invariants); a 100100 Pa pulse splits into 5050 Pa halves with u=±0.1225u = \pm 0.1225 m/s, the idea behind upwind fluxes.

What comes next

The forced problems here were easy: an infinite string or one wall, and a steady source. Real sources oscillate, boundaries move, and heat has no characteristics to draw. 9.7 Nonhomogeneous Problems & Eigenfunction Expansions expands the solution in the eigenfunctions of the earlier lessons, handles time-dependent boundary values, and meets resonance: forcing a bounded string at one of its normal frequencies makes the amplitude grow without limit, the bounded cousin of the linear growth under a steady source here. Leapfrog dispersion and absorbing boundaries wait in 10.5 Wave Equation Numerics & the CFL Condition.

Finished this lesson?

Mark it complete to track your progress (saved in this browser). Reading every section does this for you.

Where this leads

These later lessons build directly on this one: