Solution (source code)

= Solution

A <wave packet> is a localized <superposition> of nearby <wavenumbers>. Its rapid carrier crests have <phase velocity> $v_p=\omega/k$; the slowly varying envelope translates at the <group velocity>. Dispersion means that $\omega(k)$ is not simply a constant times $k$, so different carrier components have different <phase velocities>. Expand around $k_0$:
$$
u(x,t)=\operatorname{Re}\!\int A(k)e^{i[kx-\omega(k)t]}\,dk
\simeq\operatorname{Re}\!\left\{e^{i(k_0x-\omega_0t)}\int A(k_0+\kappa)e^{i\kappa[x-\omega'(k_0)t]}\,d\kappa\right\}.
$$
The integral is an envelope depending on $x-\omega'(k_0)t$, so \b[$v_g=d\omega/dk$] at the central <frequency>. Neglected curvature causes packet spreading. For a <deep-water gravity wave>, $\omega=\sqrt{gk}$, hence $v_p=\sqrt{g/k}$ and
$$
\boxed{v_g=\tfrac12\sqrt{g/k}=v_p/2=\frac{gT}{4\pi}.}
$$
For <crest crossings through a dispersive wave packet>, an instantaneous group containing six crests has length approximately $L=6\lambda$. A stationary ship takes $L/v_g$ to encounter the group; its crest-arrival <frequency> is $v_p/\lambda$. Consequently
$$
\boxed{N=\frac{v_p}{\lambda}\frac L{v_g}=12.}
$$
In the envelope frame the ship moves backwards at $v_g$ while crests move forwards at $v_p-v_g=v_g$. Their relative speed is $2v_g$, explaining why counting a snapshot and counting crossings differ.

\Image[/past-exam-of-the-physics-a-course-of-the-university-of-cambridge/2011/paper-1-wave-group.png]
{title=Six crests in a packet and twelve ship crossings}
{description=Original narrow-band deep-water model. The right panel is in the envelope frame; only crest trajectories intersecting the ship while it is inside the packet are drawn.}

To estimate <deep-water swell distance from period-dependent arrival times>, assume a localized storm emits both periods at the same time and place, propagation is in deep water, and currents and refraction can be neglected. If its distance is $D$, the arrival lag obeys
$$
86400=D\left(\frac1{v_g(15\,\mathrm s)}-\frac1{v_g(20\,\mathrm s)}\right)
=\frac{4\pi D}{g}\left(\frac1{15}-\frac1{20}\right).
$$
With $g=9.81\,\mathrm{m\,s^{-2}}$, \b[$D=15g(86400)/\pi\simeq4.05\times10^6\,\mathrm m$], about \b[4050 km]. The corresponding travel times are three and four days. A moving or long-lived storm with frequency-dependent emission times would invalidate the unique distance inference.