= Solution
Spherical symmetry makes the <electric field> radial and constant in magnitude on each concentric <Gaussian surface>. The enclosed charge is
$$
Q(r)=4\pi\int_0^r(as)s^2\,ds=\pi ar^4.
$$
<Gauss's law> therefore gives
$$
\boxed{\mathbf E(r)=\frac{ar^2}{4\epsilon_0}\,\widehat{\mathbf r},\qquad
|\mathbf E|=\frac{|a|r^2}{4\epsilon_0}.}
$$
The direction is outward for $a>0$ and inward for $a<0$; the field vanishes at the centre. No exterior <boundary condition> changes this spherically symmetric interior result.
Back to article page