# Gauss' law problem -- Should the field due to both the inside and outside charges be taken into account?

• tellmesomething
tellmesomething
Homework Statement
None
Relevant Equations
None
My teacher said that gauss law may not accounts for the field due to the outside charges in the LHS in this expression
##\int E.ds## = ##\frac{q}{\epsilon}## as field lines coming in the surface leave it as well. Hence the total flux is 0

However i dont think thats very consistent with the official definition of gauss law which states that the field due to both the inside and outside charges should be taken into account.

But his argument makes sense. Please explain why Its taken into account (if it is) and why not (if not)
One fallacy I found in his argument was the fact that equal number of field lines enter and leave the closed surface.. Isnt that wrong? If ive got an isolated point charge outside isnt the field changing with distance therefore at a distance x from the charge when its entering The closed surface its strength is different compared to a distance x+y where its leaving the closed surface..
Is my reasoning wrong?

tellmesomething said:
My teacher said that gauss law may not accounts for the field due to the outside charges in the LHS in this expression
##\int E.ds## = ##\frac{q}{\epsilon}## as field lines coming in the surface leave it as well. Hence the total flux is 0
The net flux-contribution from any charge(s) outside the (closed) surface of interest is indeed zero.

tellmesomething said:
However i dont think thats very consistent with the official definition of gauss law which states that the field due to both the inside and outside charges should be taken into account.
Can you give a link, or cite a reference, to this official definition? Maybe you have misinterpreted something.

tellmesomething said:
But his argument makes sense. Please explain why Its taken into account (if it is) and why not (if not)
One fallacy I found in his argument was the fact that equal number of field lines enter and leave the closed surface.. Isnt that wrong? If ive got an isolated point charge outside isnt the field changing with distance therefore at a distance x from the charge when its entering The closed surface its strength is different compared to a distance x+y where its leaving the closed surface..
Is my reasoning wrong?

Make a drawing showing a charge and some field lines from it.

Draw a region which does not enclose the chagre.

You will see that every field line entering the region also leaves it.

If you can devise a situation where this is not true, please post your diagram.

Steve4Physics said:
The net flux-contribution from any charge(s) outside the (closed) surface of interest is indeed zero.

Can you give a link, or cite a reference, to this official definition? Maybe you have misinterpreted something.

Make a drawing showing a charge and some field lines from it.

Draw a region which does not enclose the chagre.

You will see that every field line entering the region also leaves it.

If you can devise a situation where this is not true, please post your diagram.

Im possibly misinterpreting something. This is the statement I was referring to. Its from HC verma class 12 concept of physics.

Also I drew a diagram like you said

I can see that field lines entering the sphere are equal to field lines leaving it.
I believe that in the ##\int E.da## expression the E1 and E2 difference is balanced out by the area somehow? Making the flux equal and opposite in magnitude?

(Sorry I know gauss law is considered easy but I have lots of gaps in my understanding )

Also @Steve4Physics can you explain situations like these

This isnt even a closed surface yet ive seen gauss law questions like find the flux passing through this surface..

tellmesomething said:
View attachment 348041
Im possibly misinterpreting something. This is the statement I was referring to. Its from HC verma class 12 concept of physics.

Also I drew a diagram like you saidView attachment 348042
I can see that field lines entering the sphere are equal to field lines leaving it.
I believe that in the ##\int E.da## expression the E1 and E2 difference is balanced out by the area somehow? Making the flux equal and opposite in magnitude?

(Sorry I know gauss law is considered easy but I have lots of gaps in my understanding )
“Internal” (i) refers to the inside of some 3D region ##R##, bounded by the closed surface ##S##.

“External” (e), refers to outside ##R## and on the surface ##S##.

##\vec {dS}## is an oriented area-element.

##\vec E## is the total field . Electric fields obey the principle of linear superposition. That means at any point, the net electric field ##\vec E## is given by the sum of the fields from internal and external charges:
##\vec E = \vec {E_i} + \vec {E_e}##.

Consequently ##\int_S \vec E \cdot \vec {dS}## can be expressed as:
##\int_S \vec E \cdot \vec {dS} = \int_S \vec {E_i} \cdot \vec dS + \int_S \vec {E_e} \cdot \vec {dS}##.

As your drawing in Post #4 illustrates, ##\int_S \vec {E_e} \cdot \vec {dS} = 0##.

Does that resolve the problem for you?

By the way, Gauss deserves an upper-case 'G'!

SammyS and tellmesomething
tellmesomething said:
Also I drew a diagram like you said
I can see that field lines entering the sphere are equal to field lines leaving it.
I believe that in the ##\int E.da## expression the E1 and E2 difference is balanced out by the area somehow? Making the flux equal and opposite in magnitude?
I think you need to acquire better understanding of what Gauss's law says. I write it in the form
$$\int_S\mathbf E \cdot\mathbf{\hat n}~dA=\frac{q_{enc}}{\epsilon_0}.$$Here, ##~\mathbf{\hat n}~## is a unit vector, locally perpendicular to the surface, and pointing outwards. You see then that if the electric field is coming out of the surface, ##E \cdot\mathbf{\hat n}## is positive and if the electric field is entering the surface, ##E \cdot\mathbf{\hat n}## is negative. The integral is the sum of all such positive and negative contributions multiplied by a local area element.

Now Gauss's law can be taken one more step farther and divide by the total area of the volume enclosing the charge, $$\frac{\int_S\mathbf E \cdot\mathbf{\hat n}~dA}{\int_S dS}=\frac{q_{enc}}{\epsilon_0 S}.$$ The left-hand side is the normal component of the electric field averaged over the surface. The right-hand side is the enclosed charge divided by the total surface ##S## and ##\epsilon_0##.

This is an interesting expression. It says that if you enclose a given charge with a spherical shell of surface area ##S##, the electric field everywhere on the surface of the shell has the same normal component in which case the average is the same as this normal component. Now here comes the interesting part. If you distort the shape into something irregular, like an Idaho potato, but having the same area ##S##, the normal component will be stronger at some points on the surface and weaker at others. Nevertheless, the average normal component will be the same as with the spherical shell.

MatinSAR and tellmesomething
tellmesomething said:
Also @Steve4Physics can you explain situations like these

View attachment 348043

This isnt even a closed surface yet ive seen gauss law questions like find the flux passing through this surface..
I don't understand the diagram or question. If you are still unclear, maybe you can explain them.

Steve4Physics said:
“Internal” (i) refers to the inside of some 3D region ##R##, bounded by the closed surface ##S##.

“External” (e), refers to outside ##R## and on the surface ##S##.

##\vec {dS}## is an oriented area-element.

##\vec E## is the total field . Electric fields obey the principle of linear superposition. That means at any point, the net electric field ##\vec E## is given by the sum of the fields from internal and external charges:
##\vec E = \vec {E_i} + \vec {E_e}##.

Consequently ##\int_S \vec E \cdot \vec {dS}## can be expressed as:
##\int_S \vec E \cdot \vec {dS} = \int_S \vec {E_i} \cdot \vec dS + \int_S \vec {E_e} \cdot \vec {dS}##.

As your drawing in Post #4 illustrates, ##\int_S \vec {E_e} \cdot \vec {dS} = 0##.

Does that resolve the problem for you?

By the way, Gauss deserves an upper-case 'G'!
Thats my problem why use it in the first place?
If ths flux due to the external charges would eventually equal to 0 why does the statement say to account for the net Electric field..

kuruman said:
I think you need to acquire better understanding of what Gauss's law says. I write it in the form
$$\int_S\mathbf E \cdot\mathbf{\hat n}~dA=\frac{q_{enc}}{\epsilon_0}.$$Here, ##~\mathbf{\hat n}~## is a unit vector, locally perpendicular to the surface, and pointing outwards. You see then that if the electric field is coming out of the surface, ##E \cdot\mathbf{\hat n}## is positive and if the electric field is entering the surface, ##E \cdot\mathbf{\hat n}## is negative. The integral is the sum of all such positive and negative contributions multiplied by a local area element.

Now Gauss's law can be taken one more step farther and divide by the total area of the volume enclosing the charge, $$\frac{\int_S\mathbf E \cdot\mathbf{\hat n}~dA}{\int_S dS}=\frac{q_{enc}}{\epsilon_0 S}.$$ The left-hand side is the normal component of the electric field averaged over the surface. The right-hand side is the enclosed charge divided by the total surface ##S## and ##\epsilon_0##.

This is an interesting expression. It says that if you enclose a given charge with a spherical shell of surface area ##S##, the electric field everywhere on the surface of the shell has the same normal component in which case the average is the same as this normal component. Now here comes the interesting part. If you distort the shape into something irregular, like an Idaho potato, but having the same area ##S##, the normal component will be stronger at some points on the surface and weaker at others. Nevertheless, the average normal component will be the same as with the spherical shell.
I think I dont understand what "total are of volume means".. Isnt it same as ##\int dA##?

tellmesomething said:
I think I dont understand what "total are of volume means".. Isnt it same as ##\int dA##?
Yes, it is the same. ##S=\int_S dA.##

kuruman said:
I think you need to acquire better understanding of what Gauss's law says. I write it in the form
$$\int_S\mathbf E \cdot\mathbf{\hat n}~dA=\frac{q_{enc}}{\epsilon_0}.$$Here, ##~\mathbf{\hat n}~## is a unit vector, locally perpendicular to the surface, and pointing outwards. You see then that if the electric field is coming out of the surface, ##E \cdot\mathbf{\hat n}## is positive and if the electric field is entering the surface, ##E \cdot\mathbf{\hat n}## is negative. The integral is the sum of all such positive and negative contributions multiplied by a local area element.

Now Gauss's law can be taken one more step farther and divide by the total area of the volume enclosing the charge, $$\frac{\int_S\mathbf E \cdot\mathbf{\hat n}~dA}{\int_S dS}=\frac{q_{enc}}{\epsilon_0 S}.$$ The left-hand side is the normal component of the electric field averaged over the surface. The right-hand side is the enclosed charge divided by the total surface ##S## and ##\epsilon_0##.

This is an interesting expression. It says that if you enclose a given charge with a spherical shell of surface area ##S##, the electric field everywhere on the surface of the shell has the same normal component in which case the average is the same as this normal component. Now here comes the interesting part. If you distort the shape into something irregular, like an Idaho potato, but having the same area ##S##, the normal component will be stronger at some points on the surface and weaker at others. Nevertheless, the average normal component will be the same as with the spherical shell.
This gives me some clarity. Thankyou so much!

Steve4Physics said:
I don't understand the diagram or question. If you are still unclear, maybe you can explain them.
The question is " What is the flux through a surface of dimensions x and y when kept in an external uniform electric field... But isnt flux related to closed surfaces?

tellmesomething said:
Thats my problem why use it in the first place?
If ths flux due to the external charges would eventually equal to 0 why does the statement say to account for the net Electric field..
Because it's a useful way to express it.

For example, suppose you have a problem in which you know the total electric field everyehere and you are asked to find the charge inside a particular region bounded by the closed surface ##S##. You can solve it with Gauss's law.

tellmesomething
tellmesomething said:
The question is " What is the flux through a surface of dimensions x and y when kept in an external uniform electric field... But isnt flux related to closed surfaces?
Gauss's law is not relevant. You are being asked to caculate electric flux through a particular area, A, given the field. The area is not the surface of a 3D region.

The electric flux through the area is (by definition) give by ##\phi = \int_A \vec E \cdot \vec {dA}##. You don't use Gauss's law or even need the charge.

Edit - wording slightly changed.

MatinSAR and tellmesomething
Steve4Physics said:
Gauss's law is not relevant. You are being asked to caculate electric flux through a particular area, A, given the field. The area is not the surface of a 3D region.

The electric flux through the area is (by definition) give by ##\phi = \int_A \vec E \cdot \vec {dA}##. You don't use Gauss's law or even need the charge.

Edit - wording slightly changed.
Ok. Thankyou so much:-)

Steve4Physics
To the question whether the ##\vec E## in the integral of Gauss’ law is the field generated by all charges or only those within the Gaussian surface: It does not matter as the net contribution from charges outside the surface is zero. The integral is therefore the same regardless of which of the options you choose.

However, you always have to be careful with Gauss law if you actually want to deduce something from it, such as the full magnitude of the electric field on a Gaussian surface. See this PF insight I wrote some time ago: https://www.physicsforums.com/insights/a-physics-misconception-with-gauss-law/

MatinSAR and tellmesomething
Steve4Physics said:
You don't use Gauss's law
It should be mentioned though: If you have the electric field in an extended region as well as the charge (which you have automatically by the differential form of Gauss’ law if you have the field), you can relate the flux integral over different surfaces sharing their boundary curve. Sometimes (although not in this case) this can help in making an integral easier to compute.

Orodruin said:
To the question whether the ##\vec E## in the integral of Gauss’ law is the field generated by all charges or only those within the Gaussian surface: It does not matter as the net contribution from charges outside the surface is zero. The integral is therefore the same regardless of which of the options you choose.

However, you always have to be careful with Gauss law if you actually want to deduce something from it, such as the full magnitude of the electric field on a Gaussian surface. See this PF insight I wrote some time ago: https://www.physicsforums.com/insights/a-physics-misconception-with-gauss-law/
If I have a solid non conducting uniformly charged sphere with a cavity placed off-centrically I know by superposition principle thag electric field inside it would a constant of some magnitude. However by gauss law I get that the ##\int E.dA##=0

Doesnt this imply that the net field through the surface is 0?
Or just this implies that the integral is 0 somehow I.e number of incoming field lines=number of outgoing field lines?

Last edited:
tellmesomething said:
If I have a solid non conducting uniformly charged sphere with a cavity placed off-centrically I know by superposition principle thag electric field inside it would a constant of some magnitude. However by gauss law I get that the ##\int E.dA##=0

Doesnt this imply that the net field through the surface is 0?
Or just this implies that the integral is 0 somehow I.e number of incoming field lines=number of outgoing field lines?
If there is no charge in the vacuum of the cavity, the electric field in the cavity and the conductor will be zero no matter how much charge is outside the conductor.

If there is charge inside the cavity, there will be an electric field inside the cavity and it will be non-uniform. The electric field lines inside will stop at induced charges on the inner surface of the cavity. The electric field in the conducting material will, of cure be zero.

tellmesomething
kuruman said:
If there is no charge in the vacuum of the cavity, the electric field in the cavity and the conductor will be zero no matter how much charge is outside the conductor.

If there is charge inside the cavity, there will be an electric field inside the cavity and it will be non-uniform. The electric field lines inside will stop at induced charges on the inner surface of the cavity. The electric field in the conducting material will, of cure be zero.
But I was talking about a non conducting uniformly charged sphere..

tellmesomething said:
But I was talking about a non conducting uniformly charged sphere..
Sorry I missed that. If there is no charge inside the cavity, then the average normal component of the electric field over a Gaussian surface completely inside the cavity will be zero. This doesn't mean that the field everywhere on the surface is zero. Gauss's law, although always valid, is not very useful in the case you described.

tellmesomething
kuruman said:
Sorry I missed that. If there is no charge inside the cavity, then the average normal component of the electric field over a Gaussian surface completely inside the cavity will be zero. This doesn't mean that the field everywhere on the surface is zero. Gauss's law, although always valid, is not very useful in the case you described.
Okay I didnt understand the application of average normal component until now.
It makes sense for it to be zero mathematically but intutively why is it zero? I get that the flux is 0 so anything divided by 0 is zero.
But we have electric field inside so shouldnt the normal component be some value..does this have direction as well I.e normal component in some directions would cancel out...?

tellmesomething said:
It makes sense for it to be zero mathematically but intutively why is it zero?
It is zero because all the electric field lines that enter any Gaussian surface that you draw inside the cavity have to come out. Charges generate electric field lines, that's Gauss's law. So if there is no charge inside the cavity, no electric field lines are generated inside. Whatever lines come in somewhere must come out somewhere else.

tellmesomething said:
. . . so anything divided by 0 is zero.
You got it backwards. Zero divided by anything non-zero is zero.

tellmesomething
tellmesomething said:
If I have a solid non conducting uniformly charged sphere with a cavity placed off-centrically I know by superposition principle thag electric field inside it would a constant of some magnitude. However by gauss law I get that the ##\int E.dA##=0
I suggest you go back to read the Insight article I linked earlier. Many of your misconceptions are similar to what is mentioned there.

Furthermore, the flux of a constant field over any closed surface is always zero. This is simply by virtue of the divergence theorem.

tellmesomething said:
Doesnt this imply that the net field through the surface is 0?
It means the average normal component of the field is zero. The surface integral will tell you nothing about the tangential components.

tellmesomething said:
It makes sense for it to be zero mathematically but intutively why is it zero?
Because of the divergence theorem. The flux of a divergence free vector field through any closed surface is zero.

tellmesomething said:
But we have electric field inside so shouldnt the normal component be some value..does this have direction as well I.e normal component in some directions would cancel out...?
Yes, the if the field is divergence free, there is no source of field lines inside the volume. Any field line going into the volume will go out as well.

More importantly, the scenario you describe does not have spherical symmetry. This means that you will not be able to easily get a Gaussian surface on which the field has constant magnitude and is normal to the surface - ie, the conditions necessary to directly compute the field using Gauss’ law are not satisfied.

However, that does not mean Gauss’ law is useless for your scenario. You can split your scenario into the superposition of two scenarios:

1. A homogeneously charged sphere without a hole and with charge density ##\rho##.
2. A smaller homogeneously charged sphere without a hole and charge density ##-\rho## inside the first one, but offset from the center.

Both of these cases are spherically symmetric (about different centers!) so the standard Gauss’ law argument applies to each. The superposition of the charge distributions is your original distribution so the superposition of the fields is the solution for the field in the original problem.

MatinSAR and tellmesomething
kuruman said:
You got it backwards. Zero divided by anything non-zero is zero.
Yes of course. Sorry, my bad.
kuruman said:
It is zero because all the electric field lines that enter any Gaussian surface that you draw inside the cavity have to come out. Charges generate electric field lines, that's Gauss's law. So if there is no charge inside the cavity, no electric field lines are generated inside. Whatever lines come in somewhere must come out somewhere else.
I see. Thankyou so much.

Orodruin said:
I suggest you go back to read the Insight article I linked earlier. Many of your misconceptions are similar to what is mentioned there.

Furthermore, the flux of a constant field over any closed surface is always zero. This is simply by virtue of the divergence theorem.

It means the average normal component of the field is zero. The surface integral will tell you nothing about the tangential components.

Because of the divergence theorem. The flux of a divergence free vector field through any closed surface is zero.

Yes, the if the field is divergence free, there is no source of field lines inside the volume. Any field line going into the volume will go out as well.

More importantly, the scenario you describe does not have spherical symmetry. This means that you will not be able to easily get a Gaussian surface on which the field has constant magnitude and is normal to the surface - ie, the conditions necessary to directly compute the field using Gauss’ law are not satisfied.

However, that does not mean Gauss’ law is useless for your scenario. You can split your scenario into the superposition of two scenarios:

1. A homogeneously charged sphere without a hole and with charge density ##\rho##.
2. A smaller homogeneously charged sphere without a hole and charge density ##-\rho## inside the first one, but offset from the center.

Both of these cases are spherically symmetric (about different centers!) so the standard Gauss’ law argument applies to each. The superposition of the charge distributions is your original distribution so the superposition of the fields is the solution for the field in the original problem.
I read the article you linked. I think most of my doubts got cleared from that. Thanks a ton.

Yes the superposition way is what I used initially, just that I got the results of the fields of the solid charged sphere and the negatively charged little sphere using integration and it was tedious.

Gauss law would have been simpler

tellmesomething said:
Gauss law would have been simpler
Didn't you use Gauss's law to find that the electric field inside a uniform spherical charge distribution of radius ##R## and total charge ##Q## is given by $$\mathbf E=\frac{Q~\mathbf r}{4\pi\epsilon_0R^3}~?$$If not, you should have.

kuruman said:
Didn't you use Gauss's law to find that the electric field inside a uniform spherical charge distribution of radius ##R## and total charge ##Q## is given by $$\mathbf E=\frac{Q~\mathbf r}{4\pi\epsilon_0R^3}~?$$If not, you should have.
No I divided the sphere into many spherical shells and integrated it. Got the same result but it took a lot of trial and error..

kuruman
OK, I see now. Thanks for the clarification.

tellmesomething

• Introductory Physics Homework Help
Replies
10
Views
979
• Introductory Physics Homework Help
Replies
23
Views
859
• Introductory Physics Homework Help
Replies
26
Views
851
• Introductory Physics Homework Help
Replies
6
Views
289
• Introductory Physics Homework Help
Replies
4
Views
977
• Introductory Physics Homework Help
Replies
5
Views
4K
• Introductory Physics Homework Help
Replies
4
Views
3K
• Introductory Physics Homework Help
Replies
3
Views
1K
• Introductory Physics Homework Help
Replies
3
Views
1K
• Introductory Physics Homework Help
Replies
5
Views
1K