Solution (source code)

= Solution

Integrate the squared <partial-wave expansion of a scattering amplitude> over the solid angle. <Legendre polynomial> orthogonality eliminates terms with unequal angular-momentum indices, giving
$$
\sigma_{\rm tot}=2\pi\int_{-1}^1|f(\theta)|^2\,d(\cos\theta)
=\frac{4\pi}{k^2}\sum_{\ell=0}^{\infty}(2\ell+1)\sin^2\delta_\ell.
$$
At zero <scattering angle>, $P_\ell(1)=1$ and $\operatorname{Im}(e^{i\delta_\ell}\sin\delta_\ell)=\sin^2\delta_\ell$. Consequently
$$
\operatorname{Im}f(0)=\frac1k\sum_{\ell=0}^{\infty}(2\ell+1)\sin^2\delta_\ell,
\qquad\boxed{\sigma_{\rm tot}=\frac{4\pi}{k}\operatorname{Im}f(0).}
$$
This is the <optical theorem>. In the present elastic problem the total and elastic <cross sections> coincide. For an absorptive interaction the inclusive total still obeys the <optical theorem>, but need not equal the integral of the elastic differential <cross section>.