D'Alembert's Solution of the Wave Equation
The Fourier series solution of the wave equation hides a much simpler picture: two shapes travelling in opposite directions at speed . D'Alembert's formula makes this explicit and works on the whole line, without any series.
Travelling waves
For any twice-differentiable functions and ,
solves : each term contributes to both sides. is the shape moving right at speed ; moves left. Conversely, the change of variables , turns the equation into , whose general solution is exactly .
The formula
On the whole line with and :
With zero initial velocity, the initial shape splits into two half-height copies moving apart.
import numpy as np
c = 1.0
f = lambda x: np.exp(-20 * x**2) # a bump at the origin, released from rest
u = lambda x, t: 0.5 * (f(x - c * t) + f(x + c * t))
xs = np.linspace(-3, 3, 13)
for t in (0.0, 1.0, 2.0):
print(f"t = {t}:", np.round(u(xs, t), 2))t = 0.0: [0. 0. 0. 0. 0. 0.01 1. 0.01 0. 0. 0. 0. 0. ]
t = 1.0: [0. 0. 0. 0. 0.5 0. 0. 0. 0.5 0. 0. 0. 0. ]
t = 2.0: [0. 0. 0.5 0. 0. 0. 0. 0. 0. 0. 0.5 0. 0. ]
The bump splits into two bumps of height 0.5 centred at .
Domain of dependence
The formula shows that depends only on initial data in the interval . Information travels at finite speed : a disturbance far away cannot affect before the wave arrives. (The heat equation is different: a change anywhere is felt everywhere immediately, though very faintly.) This fact is the continuous version of the CFL condition that limits the time step of numerical wave solvers (The Wave Equation and the CFL Condition).
Strings with fixed ends: reflections
For a string on with fixed ends, extend and to odd, -periodic functions and use d'Alembert's formula. The odd extension makes automatically: a wave hitting a fixed end comes back upside down. This gives the same answer as the Fourier series.
import numpy as np
L, c = 1.0, 1.0
def f_ext(x): # odd, 2L-periodic extension of a plucked triangle
x = np.mod(x + L, 2 * L) - L # into [-L, L)
s = np.sign(x); x = np.abs(x)
return s * np.where(x < 0.5, 0.02 * x, 0.02 * (1 - x))
u_dalembert = lambda x, t: 0.5 * (f_ext(x - c * t) + f_ext(x + c * t))
n = np.arange(1, 2000)
A = 8 * 0.01 / (n * np.pi)**2 * np.sin(n * np.pi / 2)
u_series = lambda x, t: np.sum(A * np.cos(n * np.pi * c * t) * np.sin(n * np.pi * x))
for x, t in ((0.5, 0.3), (0.2, 0.7), (0.9, 1.4)):
print(f"u({x}, {t}): d'Alembert {u_dalembert(x, t): .6f}, series {u_series(x, t): .6f}")u(0.5, 0.3): d'Alembert 0.004000, series 0.004000
u(0.2, 0.7): d'Alembert -0.004000, series -0.003999
u(0.9, 1.4): d'Alembert -0.002000, series -0.001999
In software
- The digital waveguide method of sound synthesis stores two delay lines, one for the right-moving and one for the left-moving wave, and inverts the signal at the ends: d'Alembert's formula as a data structure.
- Ray tracing and signal-timing calculations (radar, sonar, GPS) rely on finite propagation speed.
Exercises
Exercise 1: Identify the waves
Write as . What is , and which part moves left?
Answer
; moves left.
Solution
with (moves right), with (moves left).
Exercise 2: Initial velocity only
Use d'Alembert's formula for , , .
Answer
.
Solution
.
Exercise 3: When does the signal arrive? (code)
A bump centred at is released from rest with (sound in air, metres and seconds). When does the peak of the disturbance reach , and how high is it there?
Answer
At s, with half the original height.
Solution
The right-moving half peaks when , i.e. .
import numpy as np
f = lambda x: np.exp(-x**2)
t = np.linspace(0, 0.1, 10001)
u = 0.5 * (f(17 - 340 * t) + f(17 + 340 * t))
print(round(t[np.argmax(u)], 4), round(u.max(), 3))0.05 0.5
Test yourself
describes a shape that…
- moves left at speed
- moves right at speed
- stands still
- decays
A bump released from rest on an infinite string…
- stays in place
- splits into two half-height bumps moving apart
- spreads out and flattens like heat
- moves right only
At a fixed end, a wave pulse is reflected…
- upside down
- the same way up
- not at all
- with double height