Electric field inside charged non-conducting spherical shell In class we had an exercise, where for a non-conductiong spherical shell given a potential inside and out we had to find a charge distribution and E field inside and out, with a charge distribution $\sigma =Q\cos\theta$, so the sphere is kind of like a charged dipole, where positive charge is on the upper and negative charge on the lower side since $0<\theta<\pi$. And we calculated that $E_{\text{inside}}=0$, however using Gauss law, if $\rho$ inside is $0$ then the field inside should also be zero.
However the teacher said that that holds only for spherically symmetric situations, and in this situation $\bf E$ field is not zero inside, and I dont  understand that, can someone explain why is that.
Thanks.
 A: For any closed surface, Gauss's law states
$$ \oint \textbf{E} \cdot d\textbf{a} = Q_{enc} / \epsilon_0 $$
Applying the divergence theorem to the left side of the above leads to
$$ \int_{volume} ( \nabla \cdot E ) \ dV = \oint \textbf{E} \cdot d\textbf{a} $$
and rewriting the right hand term in terms of the charge density $ \rho$
$$Q_{enc} / \epsilon_0 = \frac{1}{\epsilon_0} \int \rho dV  $$
Equating both sides leads to
$$ \frac{1}{\epsilon_0} \int \rho dV  =  \int_{volume} ( \nabla \cdot E ) \  dV $$
Which then you can cancel to be:
$$ \frac{1}{\epsilon_0} \rho = \nabla \cdot E $$
In spherically symmetric situations, you can just assume that E only depends on r such that the other terms in the divergence of E drop out: $$ \nabla \cdot E = \frac{1}{r^2} \frac{d}{dr} (r^2 E_r) $$ which then leads to the typical differential equation such that $ \frac{1}{r^2} \frac{d}{dr} (r^2 E_r )= \rho \frac{1}{\epsilon_0}$ in a sphere.
In this case, you cannot assume that E solely depends on r, as your teacher implies.
Inside the sphere, it would be true that $\rho =0$, but it is no longer true that E is independent of $\theta $ or $\phi $, and thus these terms would need to be included in the differential equation as well.
PS:
I don't know what level you're at-- I don't know if your teacher wants you to work with the differential equations like this, but this at least should explain why it's more complicated than that.
