Solution (source code)

= Solution

Specific intensity is defined by $dE=I_\nu\cos\theta\,dA\,d\Omega\,d\nu\,dt$. A ray bundle in free space expands in area while its solid angle contracts by the same factor, so
$$
\boxed{\frac{dI_\nu}{ds}=0}.
$$
Thus <specific intensity> does not obey an inverse-square law; the flux of an unresolved source does because its apparent solid angle scales as distance${}^{-2}$.

For a cold medium with coherent, isotropic, conservative scattering, the source function is the <mean intensity> $J_\nu$. With scattering optical depth increasing along the ray,
$$
\frac{dI_\nu}{d\tau_\nu}=-I_\nu+J_\nu,
$$
and
$$
\boxed{
I_\nu(\tau)=I_\nu(0)e^{-\tau}
+\int_0^\tau J_\nu(t)e^{-(\tau-t)}dt}.
$$
The unscattered pencil beam is attenuated by $e^{-\tau}$ and reappears as a diffuse halo in other directions. Coherent scattering preserves frequency, and conservative scattering preserves total luminosity when all outgoing directions are collected.