Spectral methods and aliasing
Track DFT normalization, resolvable modes and nonlinear frequency folding before claiming high-order accuracy.
On this page
The question for today
What you’ll understand
- State a normalized periodic discrete Fourier transform and its derivative multiplier.
- Compute an exact alias of an unresolved cosine and its incorrect interpolant derivative.
- Distinguish spectral truncation from nonlinear aliasing and state what padding actually prevents.
A Fourier spectral discretization represents a periodic function through global oscillatory modes. For smooth resolved functions it can approximate derivatives extremely accurately, but a finite sample cannot distinguish frequencies that differ by an integer multiple of the sample count. Aliasing is an information loss at sampling or nonlinear evaluation, not merely another name for discarding small coefficients.
Normalize the transform and choose the frequency set
Use N equispaced points x_j=2pi j/N on a periodic interval[0,2pi]. For odd N, retain the integer modes from−(N−1)/2 through(N−1)/2, avoiding an even-grid Nyquist convention. The forward transform divides by N and the inverse sum has no extra factor. Differentiating the trigonometric interpolant multiplies each coefficient by ik. Changing transform normalization without adjusting convolution or Parseval factors can introduce an incorrect N into a PDE operator or energy calculation.
The derivative is exact for a trigonometric polynomial whose frequencies lie in that retained set, up to floating-point effects. For a smooth periodic function with infinitely many modes, derivative error depends on coefficient decay, hence on regularity. Analyticity can yield exponential convergence under suitable periodic extension, whereas finite smoothness gives algebraic rates. A jump or a nonperiodic endpoint mismatch destroys the assumptions behind rapid spectral convergence and can produce global oscillatory artifacts even on a very fine grid.
Sampling identifies entire congruence classes of modes
At these grid points, exp(i(k+qN)x_j) equals exp(ikx_j) for every integer q. An unresolved continuum mode is therefore folded into a retained representative. For functions with an absolutely summable Fourier series, the sampled DFT coefficient is the sum of continuum coefficients in that congruence class. This identity explains why a derivative computed after sampling can disagree dramatically with the sampled exact derivative: multiplication by the retained k is not multiplication by the original k+qN.
Aliasing can also be created from initially resolved data. Multiplying two trigonometric polynomials adds their frequencies. If the product is evaluated on the original grid, new modes outside the representable band fold back into low modes. Thus a nonlinear PDE can generate incorrect retained coefficients even when every factor was initially resolved. Projecting an accurately resolved product and aliasing an underresolved product are different operations; one cannot repair the second simply by deleting a few high-frequency coefficients afterward.
Padding addresses nonlinear folding, not missing initial information
Zero-padding known Fourier coefficients to a sufficiently fine grid allows a nonlinear product to be evaluated with more frequency room before projection back to the retained band. For quadratic nonlinearities, the familiar three-halves padding strategy uses a consistent retained-mode and endpoint convention. Its purpose is to prevent product frequencies from wrapping into the coefficients one keeps, not to infer high-frequency initial data that were never measured. Higher-degree nonlinearities or different retained bands require their own padding calculation.
For example, on nine points, squaring the resolved cosine 3x creates a cosine 6x term that aliases back to cosine 3x. Evaluating that known polynomial on fifteen points resolves its product frequencies through six, after which projection to the original modes removes the six-frequency term instead of folding it. This specific calculation is an exact polynomial statement. It does not promise that a general nonlinear solution remains smooth, that a time integrator is stable, or that filtering preserves every conservation property of the PDE.
Work it through
An unresolved cosine reverses the computed derivative
Sample u(x)=cos(6x) on N=9 equispaced periodic points. Find its retained interpolant and compare its spectral derivative with the exact derivative at x₁=2pi/9.
The frequency 6 is congruent to−3 modulo nine, and−6 is congruent to 3. Thus the sampled cosine 6x is identical to cosine 3x, whose retained coefficients at±3 are each 1/2.
The interpolant derivative is . At x₁=2pi/9 it equals .
The actual derivative is . At the same point, sin(4pi/3)=−sqrt 3/2, so the exact derivative is . Identical sampled function values did not determine the unresolved derivative.
The grid identifies the wrong frequency representative for the continuum derivative: approximately−2.5981 instead of+5.1962 at the chosen point.
The living notebook
Explore the model
Interactive lab · spectral
Truncation is visible even without sampling aliasing
Pause and Reset, then set mode count N = 3 and coefficient decay p = 2. At zero clock, predict the sum at x=pi/2 is 1−1/9=8/9≈0.889 and the highest coefficient is 1/9. Reset and set both N = 5 and p = 2: predict sum 8/9+1/25=209/225≈0.929 and highest coefficient 1/25. The instrument evaluates an analytic finite sine sum; it has no FFT grid or product-padding control and does not generate aliasing.
- Sum at x = π/2
- 0.867
- Smallest wavelength
- 2π / 5
- Highest-mode coefficient
- 0.2
A finite sum of sin(nx − t)/nᵖ. Playback changes t; increasing the cutoff includes finer spatial scales. This is not a proof about a continuum limit or renormalization. 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 forAdding retained modes changes a truncation, whereas aliasing folds unresolved frequencies into already retained coefficients.
Pause & reason
Check your understanding
Your turn
Try it yourself
On nine points, square the resolved function cos(3x). Compare the aliased nine-point interpolant of the product with the projection obtained by evaluating the exact polynomial product on fifteen points and retaining modes−4 through 4.
Take a moment to make a prediction or work it out on paper. Open a hint when you need one.
Give me a hint
Use cos²(3x)=(1+cos 6x)/2 and reduce frequency six modulo nine before doing the first interpolation.
Compare with the solution
On nine points, cosine 6x aliases to cosine 3x, so the product interpolant is . On fifteen points the product frequencies 0 and±6 are resolved, giving the exact polynomial . Projecting to modes−4 through 4 removes±6 and leaves only the constant 1/2. The aliased original-grid computation has therefore inserted an erroneous retained cosine 3x coefficient. Padding succeeded because the factors’ Fourier coefficients were already known and the product could be reevaluated; it would not recover an unknown initial cosine 6x from the original nine samples alone.
Keep the idea
Take it with you
- DFT normalization and retained-frequency conventions belong in the operator definition.
- Sampling identifies frequencies only modulo the grid count.
- Padding can prevent nonlinear product aliasing but cannot reconstruct unmeasured continuum information.
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.