Finite-difference stencils and numerical dispersion
Read a stencil as a Fourier multiplier and separate phase error from amplitude error.
On this page
The question for today
What you’ll understand
- Derive the centered first-derivative symbol on a periodic grid.
- Compare numerical phase and group velocities at resolved wave numbers.
- Explain why semidiscrete nondissipation does not guarantee stable Forward Euler evolution.
Two derivative stencils can have the same formal order and transport a wave packet differently. Fourier symbols make the difference visible: they describe what the spatial operator does to each grid frequency. For periodic constant-coefficient equations, this is an exact diagonalization. Near boundaries or with variable coefficients, it becomes a local diagnostic that must be supplemented by a full stability argument.
A stencil has both a Taylor expansion and a symbol
On a periodic uniform grid, insert the mode exp(ij theta) into a linear translation-invariant stencil. A centered first difference multiplies it by i sin(theta)/h, whereas the exact derivative on a resolved continuum mode multiplies it by ik with theta=kh. Expanding sine shows second-order consistency when k is fixed and h tends to zero. That low-frequency expansion is not uniform over modes near the grid’s highest representable frequencies, where theta remains order one.
The three-point second difference has symbol minus four sin squared(theta/2) over h squared. A fourth-order centered first derivative instead has symbol i times[8sin(theta)−sin(2theta)] divided by 6h. These formulas let one compare stencils without confusing their coefficient patterns with an error estimate. A nominally high-order stencil can still have substantial error near the resolution limit, and wide boundary closures need their own consistency and stability checks.
Phase and group velocities answer different questions
For u_t+a u_x=0 with a>0, centered spatial differencing gives a semidiscrete Fourier mode with angular frequency a sin(theta)/h. Dividing by physical wave number k gives phase speed a sin(theta)/theta, with its continuous limit a at theta zero. Differentiating angular frequency with respect to k gives group velocity a cos(theta), describing the movement of a narrow wave packet. A high-frequency packet can have a negative group velocity even though the PDE transports every profile to the right.
This behavior is numerical dispersion: different wavelengths acquire different phase shifts. It is distinct from dissipation, which changes amplitudes. The periodic centered operator is skew-adjoint in the h-weighted L2 inner product, so its exact semidiscrete flow preserves that norm. Norm preservation does not imply that a wave packet is in the correct location. A computation can have almost no amplitude loss and still produce an inaccurate signal through accumulated phase error.
The time integrator supplies another multiplier
Forward Euler applied to the centered semidiscrete advection equation has multiplier one minus i times the Courant number times sin(theta). Its squared magnitude exceeds one for every nonzero Courant number and every mode with nonzero sine. Thus decreasing the step to satisfy the geometric advection CFL condition alone does not make this scheme stable on a fixed-ratio refinement. The spatial operator’s nondissipation and the temporal method’s instability are separate facts that happen to coexist.
Other time integrators can have stable intervals on the imaginary axis, and upwind spatial differencing adds dissipation rather than preserving the centered symbol. The right choice depends on the PDE, the target accuracy and the resolved spectrum. To interpret a dispersion study, report the spatial symbol, the time integration rule and the boundary setting. Otherwise an observed phase lag may be attributed to the wrong component of the algorithm, or an unstable amplitude trend may be mistaken for a physical wave phenomenon.
Work it through
A well-resolved phase and a backward-moving packet
For a=1, compute the centered semidiscrete phase-speed ratio and group velocity at theta=pi/3 and at theta=2pi/3.
At theta=pi/3, the phase-speed ratio is . The group velocity is cos(pi/3)=1/2.
At theta=2pi/3, the phase-speed ratio is . The group velocity is cos(2pi/3)=−1/2.
Both modes keep their amplitude under exact semidiscrete centered evolution. Nevertheless their phase speeds are slower than one, and a narrow packet near the second frequency moves opposite to the physical transport direction.
The two phase-speed ratios are about 0.8270 and 0.4135, while group velocities are+0.5 and−0.5. Nondissipation does not mean correct propagation.
The living notebook
Explore the model
Interactive lab · waves
Phase error can alter a superposition without damping its parts
Pause and Reset, then set phase difference 0 degrees and amplitude ratio 1. Predict resultant amplitude two. Reset and set both phase difference 120 degrees and ratio 1: predict resultant amplitude one, although each component still has amplitude one. The instrument gives two waves with the same fixed wave number and a chosen relative phase; it does not calculate a stencil’s dispersion relation or simulate different numerical group velocities.
- Sum at x = 0
- 0.866
- Resultant amplitude
- 1.732
- Phase difference
- 60°
Two waves share the same frequency and wave number. Playback advances t in sin(2x − t) + a sin(2x − t + phase). Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.
Look forA phase mismatch can change a combined signal even when neither component loses amplitude.
Pause & reason
Check your understanding
Your turn
Try it yourself
At theta=pi/2, compare the centered second-order and fourth-order phase-speed ratios for a=1. What is the second-order group velocity there?
Take a moment to make a prediction or work it out on paper. Open a hint when you need one.
Give me a hint
Divide each derivative symbol’s real modified wave number by theta/h. For the fourth-order formula, sin(2theta)=0.
Compare with the solution
The second-order ratio is . The fourth-order ratio is . The fourth-order stencil improves this phase-speed approximation at this frequency, although it is still not exact. The centered second-order group velocity is cos(pi/2)=0, so a narrow packet near that frequency has vanishing semidiscrete group motion even though the continuum speed is one. These comparisons assume the spatial operator is evolved exactly in time; a fully discrete dispersion relation also includes the chosen time integrator.
Keep the idea
Take it with you
- Taylor order describes low-frequency consistency, not uniform accuracy at the grid limit.
- Phase velocity, group velocity and amplitude dissipation are distinct diagnostics.
- A stable semidiscrete spatial operator still needs a compatible time integrator.
Read further
Original sources and deeper explanations to follow at your own pace.
- Lloyd N. Trefethen — Finite Difference and Spectral Methods for Ordinary and Partial Differential Equations, chapter 3: Fourier symbols of stencils
- Lloyd N. Trefethen — Finite Difference and Spectral Methods for Ordinary and Partial Differential Equations, chapter 5: dissipation, dispersion and group velocity
Optional progress, saved in this browser when available. Revisit any lesson at any time.
Lesson not marked complete.