This is a question from David J Griffith's Introduction to Electrodynamics.
A specified charge density $\sigma(\theta)=k\cos(\theta) $ is glued over the surface of a spherical shell of radius $R$. Find the resulting potential inside and outside the sphere.
The question was solved using legendre polynomials and the final answer for potential inside the sphere was : $V(r,\theta) = \frac{kr}{3\epsilon_0}cos\theta$
This final answer is confusing because The Electric field inside the sphere is coming out to be dependent on $r$ and $\theta$ whereas electric field inside a shell, no matter what the charge distribution is outside, is $zero$ from gauss's law.
my doubts:
why is the electric field inside non zero?
Can gauss's law explain this, or does it fail here?
Since solving using ordinary surface integral gave me the same result and since the. divergence inside the shell is $zero$, I concluded that legendre polynomials and gauss's law in differential form are correct. So the problem should be with the integral form of gauss's law : $\int_s{\vec E}.d\vec{s} = \frac{q}{\epsilon_0}$
The answer I got for this doubt is that "since the charges are glued to the surface, and not evenly distributed, electric field inside need not be zero. "
This is not convincing because proof of gauss's law does not expect the charges to be free to move. presence of an exrernal force that would hold the charges in place does not change the theorem. That is Say only a single charge $q_i$ is present outside
then $\int_s{\vec E_i}.d\vec{s} = \frac{q_{inside}}{\epsilon_0}=0$
Now if there are more charges, following any distribution, net electric field $\vec E = \vec E_1 + \vec E_2+\vec E_3+...$
So the net flux,
$\int_s{\vec E}.d\vec{s} = \int_s{\vec E_1}.d\vec{s}+\int_s{\vec E_2}.d\vec{s}+\int_s{\vec E_3}.d\vec{s}+. . .=0$
Or is it possible that $\int_s{\vec E}.d\vec{s}=0$ does not imply $\vec E = 0$?