# Why isn't electric field due to outside charges taken into account when calculating the "total" field in some Gauss law problems? In the above picture there are two point charges $$q_1$$ and $$q_2$$. $$S_1$$ and $$S_2$$ are Gaussian surfaces centred about $$q_1$$ and $$q_2$$ respectively. If I want to find the electric field at P, then I have to apply Gauss's law to both the Gaussian surfaces $$S_1$$ and $$S_2$$. In other words outside charges can cause there to be an electric field at P even though the flux because of the outside charges is zero on that surface.

But when calculating the field inside a uniformly charged sphere, we completely neglect the outside charges(outside the Gaussian surface but still inside the sphere). I know that is because of Newton's shell theorem but E&M books do not mention this. They just go with Gauss's law.

Consider the example-4 in chapter 2 in Introduction to Electrodynamics by Griffiths

The problem statement is as follows:

A long cylinder (Fig .21) carries a charge density that is proportional to the distance from the axis $$\rho = ks$$, for some constant k. Find the electric field inside the cylinder.

In the solution for the problem, he finds the field of a cylindrical gaussian surface in a larger coaxial cylinder using a gauss theorem. This field is said to be the electric field inside the cylinder but the gauss theorem doesn't really consider the field due to the charges between the gaussian cylinder and the outer cylinder. Hence, it must not be the 'total' field which we have found. So, my question is what exactly does Griffith mean when he says 'the electric field'?

Edit: Suppose I applied Gauss law on the surface $$S_1$$. If the field due to $$q_1$$ and $$q_2$$ are $$E_1$$ and $$E_2$$, then $$\oint \mathbf{E} \cdot \mathbf{da} = \frac{q_1}{\epsilon_0}$$ $$\oint \mathbf{E_1} \cdot \mathbf{da} + \oint \mathbf{E_2} \cdot \mathbf{da} = \frac{q_1}{\epsilon_0}$$ The second integral vanishes and so I get $$E_1 \oint da = \frac{q_1}{\epsilon_0}$$ What I get is the magnitude of the electric field due to the charge enclosed but that is not the total electric field at P. The total electric field at P has magnitude $$|\mathbf{E_1} + \mathbf{E_2}|$$.

I can use the same argument for the Griffith's example. If $$\mathbf{E_i}$$ and $$\mathbf{E_o}$$ are due to the inside and outside charges, then what Griffith's solved for is the magnitude of $$\mathbf{E_i}$$ because $$E_i \oint da + \oint \mathbf{E_o} \cdot \mathbf{da}\text{ ( = 0) } = \frac{\int \rho dV }{\epsilon_0}$$ would give me the same value of electric field as Griffiths got. But that is not the net electric field at that point. The magnitude of the net electric field at that point is $$|\mathbf{E_i} + \mathbf{E_o}|$$. But in problems like this, the field we get from Gauss's law is simply referred to as the electric field as if it's the net electric field. The only way it is the electric field at that point is if the contributions from the outside charges cancel out. That would be true for something with spherical symmetry because of Newton's shell theorem, but how would that be true for something with cylindrical symmetry like in the Griffiths example?

Let's start from the Maxwell equation $$\nabla \cdot {\bf E} = \frac{\rho}{\epsilon_0}$$ On the left here is the divergence of the total electric field at some point. On the right is the charge density at that point. The field on the left is owing to all the charges in the universe. Its divergence only depends on the local charge density.

Now integrate over volume and apply Gauss' divergence theorem: $$\oint {\bf E} \cdot d{\bf S} = \frac{Q}{\epsilon_0}$$ the field on the left is still the total field at each point, as produced by all the charge in the universe. On the right we have the total charge $$Q$$ inside the region of integration.

Now we can note that the total field can be expressed as the sum of field due to charge inside the region, and field due to charge outside the region: $${\bf E} = {\bf E}_i + {\bf E}_o$$ so $$\oint ({\bf E}_i + {\bf E}_o) \cdot d{\bf S} = \frac{Q}{\epsilon_0}$$ But the field $${\bf E}_o$$ is, by definition, what the total field would be if the charge inside the region were not there, and we only had all the other charges in the universe. By applying the Maxwell equation to that case we must find $$\oint {\bf E}_o \cdot d {\bf S} = 0$$ and therefore $$\oint {\bf E}_i \cdot d{\bf S} = \frac{Q}{\epsilon_0}$$ So you see we can consider the field inside the integral to be either the total field or that part of the total field which is owing to the enclosed charge.

That answers your question, but I will also add a comment to show why it is important to know this full answer. It concerns how one does the integration, and interprets the result. If we apply the method to one plate on a capacitor then we shall find that the total flux out of one surface of the plate is $$Q/\epsilon_0$$ where $$Q$$ is the charge on the plate. Then the question arises as to how this flux is divided between the two sides of the plate, and whether what we want to know is just $${\bf E}_i$$ or the total field $${\bf E}$$. Usually we want to know $${\bf E}$$. For an ordinary parallel plate capacitor the answer is zero on one side and $$Q/A\epsilon_0$$ on the other, but for a single flat surface of charge in otherwise empty space the answer is $$Q/2A\epsilon_0$$ on each side. In order to get this right, it is important to understand the starting point of all this, where it is the total field that appears in the Maxwell equation, not just the field due to any particular group of charges. In the capacitor example the total field is the net result of the charges on both plates, not just those inside the integral over one plate.

• In your capacitor example, suppose all the charges in the capacitor are held fixed so that bringing any new charge won't change their distribution. Now suppose I bring a charge $q$ just outside your Gaussian surface around the plate of the capacitor. Now the charge $q$ is not enclosed by the surface so if you calculate the E field using Gauss's law you will get $Q/A \epsilon_0$ on one side. But that is not the total field at that point. Oct 3 '20 at 9:23
• What I'm trying to say is that when we pull the $\mathbf{E}$ out of the integral when doing Gauss's law problems, it's only the field due to the inside charges, never the total field because the total field need not be constant over the surface. And what we solve for is the $\mathbf{E}$ we pull out of the integral after all, so we're solving for the field due to the inside charges. Not the total field at the boundary. Oct 3 '20 at 9:27
• How does this explain the point of what Griffith meant by the eletric field? Oct 3 '20 at 9:39
• @BrainStrokePatient The mathematical steps in my answer are all correct. The problem is that you should not pull $\bf E$ out of the integral unless you have good reason to know that ${\bf E} \cdot d{\bf S}$ over the surface in question. If it is not constant then the integral is harder to do, and indeed you cannot do it in general unless there is other information. It is the symmetry that yields that other information in the simpler cases. Oct 3 '20 at 11:13
• Yes I agree with the mathematical steps in your answer and with what you said. But I don't think they really answer my question. I edited my question a bit to make it clearer what I'm asking. Oct 3 '20 at 11:16

Gauss law (if applicable) finds the total electric field.

$$*$$ But please note that the integral form of gauss law cannot be applied for the first question asked.

The step in gauss's law $$\int \vec{E} \cdot \vec {ds} =E \int \vec{ds}$$ can only be done if the field is symmetric and has a constant value over the surface. This is true for spheres and cylinders with uniform charge distribution, but when two spheres are kept as shown, the field could be complicated. Finding a surface with same value for $$E$$ would be hard. You're right in saying that the outside charges are producing a field inside for a general (asymmetric) distribution. But in cases where the charges are symmetrically distributed, The net electric field by all external charges cancel out. Newton's shell theorem is one example of such symmetric mass distribution.

For some examples : Any charge distribution which is a function of $$r$$ alone, $$\rho(r)$$ can be imagined to be due to concentric spherical shells, each of whose electric field inside is zero. So it goes with circles and cylinders.

So for the question from Griffiths, The field is symmetric, So gauss's law can be applied, and also, No Electric field from outside is present inside due to symmetry. So the electric field obtained is the Net electric field.

For the first question asked, the charges $$q_1$$ and $$q_2$$ together produce a complicated Electric field, for which finding a Gaussian surface would be hard. But we could use superposition theorem of electric fields : The net electric Field at any point is the vector sum of fields due to all individual charges considered separately. (as if other charges were absent).

So we could find the Electric field at $$P$$ due to $$q_1$$ and $$q_2$$ alone and add them to get net electric field.

$$*$$ Please note that though gauss's law cannot find electric fields always, the law is always true. The net flux through any surface due to outside charges is zero. symmetry is necessary only when we have to find Electric Field.

• Your answer is what I also had thought but doesn't really catch at the heart of what OP is really asking Oct 3 '20 at 9:37
• "when two spheres are kept as shown". I'm sorry if my explanation wasn't clear, English isn't my first language. $S_1$ and $S_2$ aren't spheres, they're (imaginary) Gaussian surfaces around point charges $q_1$ and $q_2$ respectively. Oct 3 '20 at 9:43
• Sorry that was a misinterpretation. I've edited the answer. Oct 3 '20 at 10:03
• I'm having trouble with your statement that Gauss law always finds the net electric field. If $\mathbf{E_1}$ and $\mathbf{E_2}$ are the electric fields due to $q_1$ and $q_2$, then it is true that $\mathbf{E} = \mathbf{E_1} + \mathbf{E_2}$ is not constant over the surface of, say $S_1$. But I can always write $\int_{S_1} \mathbf{E} \dot \mathbf{da}$ as $\int\mathbf{E_1} \dot \mathbf{da} + \int_{S_1} \mathbf{E_2} \dot \mathbf{da}$ and notice that the second integral vanishes so that I can pull $\mathbf{E_1}$ out of the integral. I find $E_1$ at P but the net field is $E_1 + E_2$ at P. Oct 3 '20 at 10:47
• I get your point now. I now realise I've made a mistake... Let me think over it and I'll edit my answer. But to correct you a bit, I think in case of griffiths, it's not only $\int{E_o \cdot da}$ that is zero but $E_o$ itself is zero because of the concentric cylinder argument mentioned. Oct 3 '20 at 11:28

Everyone, thanks for trying to help me today. I think I finally understand what's going on. As I suspected, I was missing a symmetry argument. I will try to illustrate what I mean by an example.

Suppose I want to find the field inside a sphere of radius $$R$$ with charge density $$\rho (r)$$. So I take the Gaussian surface as a sphere of radius $$r_0 < R$$. Now on the surface of the Gaussian sphere I know for a fact that the total electric field must be radial. Because of the symmetry of the problem. Everything looks the same when I rotate the sphere so the field lines have to look the same too. Because the total electric field is radial and constant on the surface of the sphere, I can pull it out of the integral. So I can say $$(E_i + E_o) \oint da = \frac{q_{enc}}{\epsilon_0}$$ $$E_i + E_o = \frac{q_{enc}}{\epsilon_0 \oint da}$$ On the other hand I also know that $$\oint \mathbf{E_o} \cdot \mathbf{da} = 0$$ from which it follows $$E_i \oint da + \oint \mathbf{E_o} \cdot \mathbf{da} = \frac{q_{enc}}{\epsilon_0}$$ $$E_i = \frac{q_{enc}}{\epsilon_0 \oint da}$$ The only way both these equations are true is if (by subtracting one from the other) $$\mathbf{E_0}=0$$. In other words, when the symmetry allows us to pull the entire electric field out of the integral, the contribution from the outside charges is zero. The net electric field is the field due to the enclosed charges only, in such cases. I do not need Newton's shell theorem or anything like that to know beforehand that the contribution to the field of the outside charges cancel. The symmetry of the problem already tells me that!

Griffith's example was such a case. Under rotation about the cylindrical axis everything looked the same so the total electric field must be in the radial direction (radial to the cylindrical axis) and constant over a cylindrical Gaussian surface. My first example was not such a case because the total electric field was not constant over $$S_1$$ and hence outside charges did end up contributing to the total electric field at P.

• I didn't really find this answer convincing.... what intuitive reason doesn't that interstitial (btwn gauss srfc and cylinder) charge produce a zero field? Oct 3 '20 at 15:23
• I expanded a bit on the math. Does that make it convincing enough? Oct 3 '20 at 16:00
• No this answer is still not accurate, I can explain using the example with spheres you gave in post. You can use the same arugement for the sphere case in question you gave. The flux due to charge outside sphere is zero, hence we can still derive the field of one charge using gauss law whilst the other is present Oct 3 '20 at 22:18
• There is a gap space between the outer rim of the solid cylinder and the gaussian cylinder inside it. In this gap space, there is charge which must cause some electric field on inner cylinder. This answer is not really accurate and I think is just a bypass to actually thinking about the matter. Oct 3 '20 at 22:23
• I really am interested in getting a clarified answer to this question and I will bounty it when I am able to Oct 3 '20 at 22:24