Solution (source code)

= Solution

The <electric field> of this <point charge> is a translated and scaled version of the radial field in part (ii). If $\mathbf a\notin V$ and $\mathbf a\notin\partial V$, its <divergence> vanishes throughout $V$, so the <divergence theorem> gives zero <flux integral>.

If $\mathbf a$ lies inside $V$, remove a small ball centered at $\mathbf a$. On the remaining volume the <divergence> is zero. Its boundary is $\partial V$ together with the small <sphere>, whose outward normal for the punctured volume points towards $\mathbf a$. That inner <sphere> contributes $-q/\epsilon_0$, by the $4\pi$ <sphere> flux computed in part (ii). Thus the exterior flux must be $q/\epsilon_0$:
$$
\boxed{\int_{\partial V}\mathbf E\cdot d\mathbf S
=\begin{cases}0,&\mathbf a\notin V,\\q/\epsilon_0,&\mathbf a\in V.\end{cases}}
$$
This is <Gauss's law> for a <point charge>. The assumption that the charge is not on the boundary is essential to these alternatives.