Radial power-law flux through a spherical shell (source code)

= Radial power-law flux through a spherical shell
{title2=$\int_{\partial V}\mathbf F\cdot d\mathbf A=4\pi(R^{2-\gamma}-\epsilon^{2-\gamma})$}

Let $V=\{\epsilon<r<R\}$ with $\epsilon>0$ and $\mathbf F=\widehat{\mathbf r}/r^\gamma$. Direct differentiation gives $\nabla\cdot\mathbf F=(2-\gamma)r^{-\gamma-1}$. For $\gamma\ne2$, integration against $4\pi r^2dr$ gives the displayed expression. Independently, the two boundary spheres contribute $4\pi R^{2-\gamma}$ and $-4\pi\epsilon^{2-\gamma}$, since the outward normal of the shell at its inner boundary points toward the origin. For $\gamma=2$, the divergence is zero in the shell and the surface contributions cancel exactly. The excluded origin must not be silently added to this regular-domain calculation.