# Why is electric field inside a cavity of a non-conducting sphere not zero? [closed]

Consider a charged non conducting solid sphere of uniform charge density, and it as hole of some radius at the centre.

Now suppose I apply Gauss law.

As there is no charge inside the cavity, no charge is enclosed by Gaussian sphere, so electric flux is zero, hence electric field is zero.

But this is not true according to sources like this, textbook etc..

What am I missing here?

My question about how to have nonzero field in a region where the flux through the boundary of the region vanish? As mentioned by– rob

## closed as unclear what you're asking by my2cts, GiorgioP, ZeroTheHero, Jon Custer, John RennieMar 25 at 17:38

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

• So let me clarify. There is a sphere with a uniform volumetric charge density, and you cut out a cavity that has no charge in it? – noah Mar 23 at 12:07
• Yes that is correct interpretation – user72730 Mar 23 at 14:55
• closely related to physics.stackexchange.com/questions/461620/… Simply because the flux is $0$ doesn't mean the field is $0$. – ZeroTheHero Mar 23 at 20:45
• Please make this post self contained by giving an explicit formulation of the question rather than a YouTube link or reference to an unnamed textbook. – my2cts Mar 24 at 10:19
• @ruakh But OP is clearly talking about a solid ball with some cavity in it, but calls it a sphere. – noah Mar 24 at 11:01

Just to add to what Noah said, the law says that the total flux through the surface is zero. To make this point clear, imagine a region of uniform electric field $$\vec{E} = E_0\hat{x}$$ along the x axis. Consider a cube of unit area faces with two of its opposite faces normal to the field. From the RHS of Gauss law we know that the flux has to be zero as there are no charges enclosed by the cube. The LHS says

$$\sum_{n=1}^6 \vec{E}\cdot \vec{A}_{n} = E_0\hat{x}\cdot\hat{x} + E_0\hat{x}\cdot-\hat{x} = 0$$

Thus the flux is zero by explicit calculation as well. Remember that the electric field and area are vectors. So the relative directions are very important. If flux is zero all you can be sure of is that the extent of field lines entering is equal to that of exiting.

Gauss's Law only gives results for the integral over a whole, closed surface. This does not mean the electric field is zero. It simply means that all field lines entering the volume also exit it at some other point.

In the video the electric field lines are as shown in blue in the diagram below.

Let the edge of the cavity be the Gaussian surface which has no charge within it.

Consider small areas $$\Delta A$$ on either side of the cavity as shown in the diagram in red. Because of the symmetrical nature of the situation you can imagine that the electric flux entering the cavity through area $$\Delta A$$ is the same as the electric flux leaving the area $$\Delta A$$ on the right hand side.
This means that the net flux through those two surfaces is zero.

Doing the same for the whole Gaussian surface leads to the result that the net flux though the surface is zero commensurate with the fact that there is no charge within the surface.

The field of a uniformly charged shell is zero inside the shell in agreement with Gauss's law, unless there is an external field. A uniformly charged sphere with a concentric spherical cavity is a concentric sum of such shells, so the field in the cavity vanishes.