advanced30 min studyLesson 872 in Mathematics

Finite-difference stencils and numerical dispersion

Read a stencil as a Fourier multiplier and separate phase error from amplitude error.

On this page

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.

D0eijθ=isin⁡θheijθ,D4eijθ=i(8sin⁡θ−sin⁡2θ)6heijθD_0e^{ij\theta}=\frac{i\sin\theta}{h}e^{ij\theta},\qquad D_4e^{ij\theta}=\frac{i(8\sin\theta-\sin2\theta)}{6h}e^{ij\theta}
The symbols assume a periodic or infinite uniform grid; D4 uses coefficients(1,−8,0,8,−1)/(12h) from offsets−2 through 2.↔ Scroll wide equations horizontally.

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.

ωh(k)=ahsin⁡(kh),cphase=asin⁡θθ,cgroup=acos⁡θ,θ=kh\omega_h(k)=\frac a h\sin(kh),\qquad c_{\mathrm{phase}}=a\frac{\sin\theta}{\theta},\qquad c_{\mathrm{group}}=a\cos\theta,\quad\theta=kh
The phase-speed ratio is extended by continuity at theta=0; group velocity describes sufficiently narrow packets away from aliasing ambiguities.↔ Scroll wide equations horizontally.

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.

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.

  1. At theta=pi/3, the phase-speed ratio is sin⁡(π/3)/(π/3)=33/(2π)≈0.826993\sin(\pi/3)/(\pi/3)=3\sqrt3/(2\pi)\approx0.826993. The group velocity is cos(pi/3)=1/2.

  2. At theta=2pi/3, the phase-speed ratio is sin⁡(2π/3)/(2π/3)=33/(4π)≈0.413497\sin(2\pi/3)/(2\pi/3)=3\sqrt3/(4\pi)\approx0.413497. The group velocity is cos(2pi/3)=−1/2.

  3. 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 result

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.

Explore the model

Interactive lab

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.

Phase error can alter a superposition without damping its partsTwo waves share the same frequency and wave number. Playback advances t in sin(2x − t) + a sin(2x − t + phase). Current readings: Sum at x = 0: 0.866; Resultant amplitude: 1.732; Phase difference: 60°. All parameters are adjustable with the labeled controls below.−3.14−1.5701.573.14−3.4−1.701.73.4x · radiansAmplitude
SumFirst componentSecond component
Sum at x = 0
0.866
Resultant amplitude
1.732
Phase difference
60°
t = 0 s

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.

Check your understanding

For periodic centered spatial advection integrated exactly in time, which statement is correct?

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 1/(π/2)=2/π≈0.6366201/(\pi/2)=2/\pi\approx0.636620. The fourth-order ratio is (8/6)/(π/2)=8/(3π)≈0.848826(8/6)/(\pi/2)=8/(3\pi)\approx0.848826. 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.

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.

Optional progress, saved in this browser when available. Revisit any lesson at any time.

Lesson not marked complete.