Predict before you plot

Goal: explain an alias without blaming the derivative formula. On \([0,2\pi)\), sample our field at \(x_j=2\pi j/N\), \(j=0,\ldots,N-1\):

\[u(x)=1+0.1\cos(mx),\qquad u_j=1+0.1\cos(2\pi mj/N).\]

There are \(N/m\) points per wavelength. Do not repeat the endpoint: \(x_N\) is the same periodic point as \(x_0\). Increasing \(m\) adds oscillations; increasing \(N\) adds information about the same function.

At a grid node,

\[e^{i(m+qN)x_j}=e^{imx_j}e^{i2\pi qj}=e^{imx_j},\qquad q\in\mathbb Z.\]

The samples cannot distinguish modes separated by \(N\). With \(N=16\), mode 13 aliases to \(13-16=-3\). Cosine is even, so its samples also match mode \(+3\). A fine line drawn between the nodes cannot tell us which function supplied them.

Find the hidden oscillations

First choose Resolved. Predict the number of points per wavelength. Then choose Aliased. Explain why the curves separate between the dots but pass through the same dots. Increase \(N\) to 32 while keeping \(m=13\): which part of your explanation changes?

Interactive experiment / samples and aliases

Mode 3 is resolved below Nyquist (N/2 = 8). There are 5.33 grid points per wavelength. Interactive controls appear when the experiment is ready.

Continuous cosine waves and their coincident grid samples
Default settings. Download the default data (CSV). The equations and worked example below explain the result.

Mathematical reference calculation in the browser. Coincident curves are expected for a resolved mode.

For \(N=16\):

Node \(j\) \(x_j\) Mode 3 sample Mode 13 sample
0 0 1.100000 1.100000
1 \(\pi/8\) 1.038268 1.038268
2 \(\pi/4\) 0.929289 0.929289
4 \(\pi/2\) 1.000000 1.000000

The grid limit needs care

For even \(N\), the Nyquist cosine has mode \(N/2\) and alternates between \(+1\) and \(-1\). Its sine is zero at every node. We require \(m<N/2\) for the single cosine in the resolved experiments. Two points per wavelength at Nyquist do not encode arbitrary phase: a sine at that same frequency disappears. Even below Nyquist, a low-order stencil may be inaccurate with only a few points per wavelength. Resolution and derivative accuracy are separate questions.

Checkpoint: can identical samples have different derivatives?

At N = 16, compare modes 3 and 13. Predict their derivatives at x = π/2, then reveal the answer.

The two cosine fields have identical samples. Their continuous derivatives are \(-0.1m\sin(mx)\). At \(x=\pi/2\), mode 3 has derivative \(+0.3\); mode 13 has derivative \(-1.3\). The difference is \(1.6\). A method that sees only the samples must return the same result for both inputs. It cannot recover both original derivatives. More accurate arithmetic or a higher-order stencil cannot restore missing information.

Before continuing, explain why increasing \(N\) differs from interpolating more points onto the existing data. The next chapter compares derivative formulas only after we have asked what their inputs represent.