A charge Q is distributed uniformly within the material of a hollow sphere of inner and outer radii r1 and r2 (figure 30-E4). Find the electric field at a point P a distance x away from the centre for r1<x<r2. Draw a rough showing the electric field as a function of x for 0<x<2r2 (figure 30-E4).
Let the arbitrary radius x.
The charge on sphere
=43π(x3−r31)q43π(r22−r21)
=(x3−r31)(r32−r31)q
According to Gauss's law
∫E.ds=q∈0
E.4πx2=(x3−r31)q(r32−r31)∈0
or E=q(x3−r31)4π∈0x2(r32−r31)