Skip to content
Vamshi Jandhyala

Books · The Fiddler: Solutions

Chapter 2

Can You Catch the Longest Wave?

↓ Download PDF handout

Semicircle Island is shaped like a perfect semicircle, a semidisk of radius 11 mile, with its straight shoreline facing the open sea. A single wave, a thin straight wall of water that never changes speed or direction, makes first contact with the island at exactly 10 a.m. and last contact at 10:10 a.m. A surfer rides the wave where it meets the land. At 10:05 a.m., the midpoint of the wave’s ten-minute crossing, what is the longest possible stretch of island directly under the wave?

For extra credit: if the wave’s direction is now uniformly random, with every heading equally likely, what is the average length of land under the wave at the midpoint of its crossing?

The Fiddler, Zach Wissner-Gross, June 12, 2026(original post)

Solution

Put the island as the top half of a unit circle, with its centre OO in the middle of the straight shore, and let the wave roll in off the sea at angle α\alpha to the shore.

Because the wave moves at a steady speed, equal times are equal distances travelled. It first touches the island at 10:00 and clears it at 10:10, so at 10:05, halfway through in time, it has gone exactly halfway in distance. The 10:05 wall therefore sits midway between the line of first contact and the line of last contact, and those two lines are easy to pin down. Both rest against the island and are square-on to the wave’s travel, so the three lines are parallel. Measuring distance from OO along the direction of travel, last contact grazes the round arc, a distance 11 from OO, while first contact rests on the near corner (1,0)(-1,0), a distance cosα\cos\alpha from OO on the opposite side. The 10:05 wall is halfway between, so its distance from OO is the average of the two, d=1cosα2.d = \frac{1 - \cos\alpha}{2}.

First contact (10:00) and last contact (10:10) are parallel lines resting on the island. Along the wave’s travel, last contact is a distance 11 from OO and first contact a distance cosα\cos\alpha on the far side; the 10:05 wall is the midpoint of the two, so d=(1cosα)/2d = (1 - \cos\alpha)/2.

The wet sand is the stretch of the 10:05 wall lying on the island. Were the wall a proper chord, with both ends on the circle, it would span 21d22\sqrt{1 - d^2}, which grows as dd shrinks; so we want the wall as close to OO as we can bring it. The wet sand reaches that full length only while both ends stay on land, though: flatten the wave too much and the wall’s lower end slides off the island into the sea, leaving a wet stretch shorter than 21d22\sqrt{1 - d^2}. The wall can come no closer than the moment its lower end reaches a shore corner.

At that moment the wet wall runs from the corner (1,0)(1,0) to the arc, both ends on the circle: a full chord. Since the corner lies on the wall, its distance from OO along the travel direction, which is cosα\cos\alpha, must equal dd. With d=(1cosα)/2d = (1 - \cos\alpha)/2, cosα=1cosα2cosα=13,d=13,\cos\alpha = \frac{1 - \cos\alpha}{2} \quad\Longrightarrow\quad \cos\alpha = \frac13, \qquad d = \frac13, and the longest catchable wall is 2119  =   4231.886 miles. 2\sqrt{1 - \tfrac19} \;=\; \boxed{\ \frac{4\sqrt2}{3} \approx 1.886 \text{ miles.}\ }

The best wave, heading at arccos1370.5\arccos\tfrac13 \approx 70.5^\circ to the shore. Its 10:05 wall (copper) is a chord from the right-hand corner to the arc, 423\tfrac{4\sqrt2}{3} miles long, a distance d=13d = \tfrac13 from OO. The faint lines are the same wave at first and last contact.

Extra credit

With a random heading we average the wet length over all directions. The island is left-right symmetric, and reversing a wave’s direction leaves its 10:05 wall unmoved, so it is enough to average over α\alpha from 00 (skimming the shore) to 9090^\circ (head-on), L=2π0π/2L(α)dα.\overline{L} = \frac{2}{\pi}\int_0^{\pi/2} L(\alpha)\, d\alpha. The wall lies a distance d=(1cosα)/2d = (1 - \cos\alpha)/2 from OO, and its wet length takes one of two forms, shown below. For a steep wave the whole chord is on the island; the perpendicular from OO bisects it, so each half is 1d2\sqrt{1 - d^2} and L=21d2L = 2\sqrt{1 - d^2}. For a flat wave the lower end is in the sea, and the wet part runs from the arc down to the shore: its upper piece is again 1d2\sqrt{1 - d^2}, and its lower piece is the side dtanαd\tan\alpha of the right triangle OMSO M S, so L=1d2+dtanαL = \sqrt{1 - d^2} + d\tan\alpha. The two regimes meet at α=arccos13\alpha = \arccos\tfrac13, where the lower end sits on the corner.

The two cases. A steep wave (left) gives a full chord, L=21d2L = 2\sqrt{1 - d^2}. A flat wave (right) is clipped by the shore at SS, so L=1d2+dtanαL = \sqrt{1 - d^2} + d\tan\alpha, the foot-to-arc piece plus the foot-to-shore piece.

To integrate, write w=sinα2w = \sin\tfrac{\alpha}{2}. The half-angle identity turns dd into a square, which is what makes everything elementary: d=1cosα2=sin2α2=w2,dα=2dw1w2.d = \frac{1 - \cos\alpha}{2} = \sin^2\tfrac{\alpha}{2} = w^2, \qquad d\alpha = \frac{2\,dw}{\sqrt{1 - w^2}}. The square-root term then collapses, because 1d2=(1w2)(1+w2)\sqrt{1 - d^2} = \sqrt{(1 - w^2)(1 + w^2)} and the 1w2\sqrt{1 - w^2} cancels: 1d2dα=(1w2)(1+w2)2dw1w2=21+w2dw=w1+w2+ln ⁣(w+1+w2)=:G.\begin{aligned} \int \sqrt{1 - d^2}\, d\alpha &= \int \sqrt{(1 - w^2)(1 + w^2)}\,\frac{2\,dw}{\sqrt{1 - w^2}} \\ &= 2\int \sqrt{1 + w^2}\, dw \\ &= w\sqrt{1 + w^2} + \ln\!\big(w + \sqrt{1 + w^2}\big) =: G. \end{aligned} The tangent term is simpler still, since dtanα=12(tanαsinα)d\tan\alpha = \tfrac12(\tan\alpha - \sin\alpha): dtanαdα=12(tanαsinα)dα=12(cosαlncosα)=:H.\int d\tan\alpha\, d\alpha = \tfrac12\int(\tan\alpha - \sin\alpha)\, d\alpha = \tfrac12\big(\cos\alpha - \ln\cos\alpha\big) =: H. Split the average at the changeover α=arccos13\alpha^\star = \arccos\tfrac13 and read off the two parts: π2L=0α ⁣(1d2+dtanα)dα+απ/2 ⁣21d2dα=[G+H]0α+2[G]απ/2.\begin{aligned} \tfrac{\pi}{2}\,\overline{L} &= \int_0^{\alpha^\star}\!\big(\sqrt{1 - d^2} + d\tan\alpha\big)\, d\alpha + \int_{\alpha^\star}^{\pi/2}\! 2\sqrt{1 - d^2}\, d\alpha \\ &= \big[G + H\big]_0^{\alpha^\star} + 2\big[G\big]_{\alpha^\star}^{\pi/2}. \end{aligned} At the limits, with w=0, 13, 12w = 0,\ \tfrac{1}{\sqrt3},\ \tfrac{1}{\sqrt2} for α=0, α, π2\alpha = 0,\ \alpha^\star,\ \tfrac{\pi}{2}, G(0)=0,H(0)=12,G(α)=23+12ln3,H(α)=16+12ln3,G(π2)=32+ln1+32.\begin{aligned} G(0) &= 0, & H(0) &= \tfrac12,\\[2pt] G(\alpha^\star) &= \tfrac23 + \tfrac12\ln 3, & H(\alpha^\star) &= \tfrac16 + \tfrac12\ln 3,\\[2pt] G(\tfrac{\pi}{2}) &= \tfrac{\sqrt3}{2} + \ln\tfrac{1 + \sqrt3}{\sqrt2}. & & \end{aligned} The flat part is [G+H]0α=13+ln3[G + H]_0^{\alpha^\star} = \tfrac13 + \ln 3 and the steep part is 2[G]απ/2=343+2ln1+32ln32[G]_{\alpha^\star}^{\pi/2} = \sqrt3 - \tfrac43 + 2\ln\tfrac{1 + \sqrt3}{\sqrt2} - \ln 3. The ln3\ln 3 cancels and 2ln1+32=ln(2+3)2\ln\tfrac{1 + \sqrt3}{\sqrt2} = \ln(2 + \sqrt3), so π2L=31+ln(2+3)\tfrac{\pi}{2}\,\overline{L} = \sqrt3 - 1 + \ln(2 + \sqrt3) and L=2π(31+ln(2+3))1.304 miles.\overline{L} = \frac{2}{\pi}\Big(\sqrt3 - 1 + \ln(2 + \sqrt3)\Big) \approx \boxed{1.304 \text{ miles.}}

Catchable length against wave heading: two peaks of 423\tfrac{4\sqrt2}{3} at the best heading on each side, a dip to 3\sqrt3 head-on, and a floor of 11 mile (the radius) for a wave skimming the shore. The dashed line is the all-headings average.

The computation

The code follows the puzzle directly: for each heading it builds the 10:05 wall and measures the part lying on the island. The longest over all headings is the main answer; the average over all headings is the extra credit, and it matches the closed form.

import numpy as np
from math import sqrt, log, pi

def wet_length(alpha, n=400001):
    u = np.array([np.cos(alpha), np.sin(alpha)])    # travel direction
    t = np.array([-np.sin(alpha), np.cos(alpha)])   # along the wavefront
    reach = lambda v: 1.0 if v[1] >= 0 else abs(v[0])  # support of the half-disk
    c = 0.5 * (reach(u) - reach(-u))                 # 10:05 wall: distance c from O
    s = np.linspace(-2, 2, n)                         # march along the wall
    p = c * u + np.outer(s, t)
    land = (p[:, 0]**2 + p[:, 1]**2 <= 1) & (p[:, 1] >= 0)  # on the island?
    return 0.0 if not land.any() else s[land].max() - s[land].min()

grid = np.linspace(0, 2 * pi, 7201)
lengths = np.array([wet_length(a) for a in grid])

closed = (2 / pi) * (sqrt(3) - 1 + log(2 + sqrt(3)))
print(f"longest: {lengths.max():.4f}  (4*sqrt(2)/3 = {4 * sqrt(2) / 3:.4f})")
print(f"average: {lengths.mean():.4f}  (closed form = {closed:.4f})")
# longest: 1.8855  (4*sqrt(2)/3 = 1.8856)
# average: 1.3044  (closed form = 1.3044)
# the scan grazes, not lands on, the optimal heading, so the max reads
# a hair under the exact 4*sqrt(2)/3.