There are many similar questions on here but most seem to deal conceptually with electric field, not the mathematics behind it.
The setup is this: there is some sphere of radius b which has a volume charge density of ρv. However, there is a cavity inside the sphere, centered at the origin, of radius a, inside which ρv = 0. Also, ρv = 0 outside of the sphere of radius b. What we want to determine is the flux density D at r < a, a < r < b, and b < r.
Conceptually, it makes sense to me that the electric field inside the cavity is 0 since all charges on the inner surface are symmetrically distributed. However, there should be some D because flux would be transmitted along unit vector -ar. Same goes for outside the sphere: there should be flux radiating out along ar.
I know I have an error in thinking somewhere because when I use the divergence theorem to relate the forms of Gauss' Law (i.e. the surface integral of flux density is the volume integral of charge density), and I have charge density = 0 inside r < a, I get D = 0. The same happens for when I look at r > b; the integral equates to 0 so, regardless of limits of integration, D = 0.
Between a and b the integrals are obvious and straightforward, so I get a D = 4πρv( $\frac{b^3 - a^3}{3}$). What is not obvious about the cavity and outside the sphere?