Solution (source code)

= Solution
{c}

Write the incident and scattered <photon> <energies> as $\varepsilon=hc/\lambda$ and $\varepsilon'=hc/\lambda'$. <Conservation of relativistic energy> gives the recoiling <electron> <energy> $E_e=mc^2+\varepsilon-\varepsilon'$. By <momentum conservation>, its <momentum> is the difference of the two <photon> <momenta>; hence
$$
p_e^2c^2=\varepsilon^2+\varepsilon'^2-2\varepsilon\varepsilon'\cos\theta.
$$
Insert these into the <relativistic energy-momentum relation> for the <electron>:
$$
(mc^2+\varepsilon-\varepsilon')^2
=m^2c^4+\varepsilon^2+\varepsilon'^2-2\varepsilon\varepsilon'\cos\theta.
$$
Expanding and cancelling terms gives
$$
mc^2(\varepsilon-\varepsilon')=\varepsilon\varepsilon'(1-\cos\theta),\qquad
\frac1{\varepsilon'}-\frac1\varepsilon=\frac{1-\cos\theta}{mc^2}.
$$
Since $1/\varepsilon=\lambda/(hc)$, the <Compton scattering> formula follows:
$$
\boxed{\lambda'=\lambda+\frac{h}{mc}(1-\cos\theta).}
$$
The scale $h/(mc)$ is the <electron> <Compton wavelength>. At $\theta=0$, $\lambda'=\lambda$: there is no <energy> or <momentum> transfer in this ideal forward limit, so the <electron> remains at rest. At $\theta=\pi$, the <wavelength> shift is maximal:
$$
\boxed{\Delta\lambda_{\max}=\frac{2h}{mc},\qquad
\varepsilon'_{\min}=\frac{\varepsilon}{1+2\varepsilon/(mc^2)}.}
$$
The <electron> gains its largest <kinetic energy>, $\varepsilon-\varepsilon'_{\min}$, and recoils forward while the <photon> reverses direction.