Solution (source code)

= Solution

The official notes give only “Part 1: as in textbooks” (PDF p. 13, handwritten p. 8). The requested derivation is supplied here.

Put a light source at the rod midpoint in its <rest frame> $S$ and emit two pulses simultaneously toward its ends, each a distance $\ell$ away. In $S$, the reflection events are $(t,x)=(\ell/c,\pm\ell)$. Invariance of light speed, the <Einstein's principle of relativity> and linearity give a <Lorentz transformation> $x'=A(x-vt)$, $t'=A(t-vx/c^2)$. Applying the inverse transformation with speed $-v$ gives $A^2(1-v^2/c^2)=1$, hence $A=\gamma$.

The transformed reflection events have
$$
x'_+=\gamma\ell(1-\beta),\quad t'_+=\frac{\gamma\ell}{c}(1-\beta),\qquad
x'_-=-\gamma\ell(1+\beta),\quad t'_- =\frac{\gamma\ell}{c}(1+\beta).
$$
These events are not simultaneous in $S'$. Both rod ends move at $-v$ there, so extrapolating each endpoint to $t'=0$ gives $x'_\pm(0)=x'_\pm+vt'_\pm=\pm\ell/\gamma$. Measuring simultaneous endpoints therefore yields <length contraction>:
$$
\boxed{L'=x'_+(0)-x'_-(0)=\frac{2\ell}{\gamma}=2\ell\sqrt{1-\beta^2}.}
$$