# Is Gauss's law wrong, or is it possible that $\int_s{\vec E} \cdot d\vec{s}=0$ does not imply $\vec E = 0$?

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:

1. why is the electric field inside non zero?

2. 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$$?

You need to be careful here. Gauss’ law is always true, but it is not always possible to use it to infer the electric field. The crucial step is \begin{align} \oint \vec E\cdot d\vec S=\vert\vec E\vert S \tag{1} \end{align} which only holds if the field has constant magnitude on the Gaussian surface and is perpendicular to the surface where it intersects.

Thus for instance, if you place a charge outside a box and compute $$\oint \vec E\cdot d\vec S$$ on the surface bounding the box, this integral is $$0$$ because there is no net charge enclosed, but this does NOT mean $$\vec E=0$$ inside the box as (1) does not hold: by simple geometry the field does not have the same magnitude at every point on the surface of the box.

In other words, yes it is perfectly possible to have $$0$$ net flux $$\oint \vec E\cdot d\vec S=0$$ but $$\vec E\ne 0$$.

A similar situation occurs when a charge distribution does not have a particular symmetry: it becomes very difficult to find a surface on which the magnitude of $$\vec E$$ is constant and thus use (1) to deduce the field.

In such cases one must resort to the superposition principle for practical calculations.

You are absolutely correct in inferring your conclusion that

$$\oint_S \mathbf{E} \cdot d\mathbf{A} = 0$$

does not imply that $$\mathbf{E}(P) = 0$$ at any point. A very simple counterexample to this is to consider a uniform electric field filling all of space:

$$\mathbf{E}(P) := \mathbf{E}_0$$

for a fixed, nonzero electric field vector $$\mathbf{E}_0$$. It is not hard to see that the total flux through any closed surface here must be zero, since the field lines are just the infinite straight lines in which the vectors $$\mathbf{E}_0$$ pegged to each point in space point along, and from geometry, any infinite straight line entering a closed and finite surface must exit it.

Indeed, though you may have seen Gauss's law "used" to find an electric field, if you look more closely you will find that in every case, some sort of additional assumption gets made, such as that the charge distribution has some form of symmetry and that this symmetry transfers to the field - and that last point is nontrivial: consider the sum of the field of your favorite Gauss's law problem with the field above, i.e. imagine your charge source were in some preexisting ambient electric field environment. This assumption-making ("handwaving") is necessary precisely because Gauss's law is insufficient by itself.

• Edit your answer it's supposed to be $\iint_s$
– user257151
Commented May 11, 2020 at 18:55
• @Electroelf You don't always need two integral signs for a surface integral... it gets impractical and kind of cumbersome to always do that. Would a spacetime integral then have to be $\int \int \int \int$? How about integrals over infinite-dimensional spaces, would you always write $\int \int \int \cdots \int \int \int$? Commented May 11, 2020 at 19:10
• @Electroelf the context is clear since the differential is clearly that of a surface area. Commented May 11, 2020 at 19:38
• @Electroelf : I can't because it doesn't seem MathJax supports the proper symbol here (LaTeX command "\oiint") which should be 2 integral signs in a row with a suitably-lengthened loop in their middle and I don't remember the tricks for how to fake it. Commented May 11, 2020 at 19:48
• @knzhou : I did not say it was wrong. But I'd also say that Electroelf was after that symbol because I had put down "\oiint" which was hoping would give me the two - integrals symbol so sie was trying to make it more like what I personally was aiming for. I appreciate that from hir, but really, this mathjax suxx Commented May 11, 2020 at 19:55