# Line integral of electric field in a metal cavity

Suppose there's a conductor with a cavity in which we introduce a positive charge $$Q$$ now the charge shall induce $$-Q$$ on the inner walls of the cavity so that By gauss law the net field in conductor body remains 0. My question is if we assume two points A and B inside the cavity and measure the line integral of Electric field from A to B inside the cavity and from B to A inside the metal body what would be the result? I know that closed line integral of electrostatic field shall be 0 and the electric field inside a metal body is also 0. Then I conclude that the electric field inside the cavity is also 0 to make the loop integral 0? I don't understand where I am going wrong. Obviously the line integral inside cavity is non 0.

Field is not 0 inside the cavity.

• I know Field is not 0 but whar I am concerned about is the line integral between A and B inside the cavity....If we assume a closed loop starting from A to B inside the cavity and back to A from B outside the cavity...will the line integral of E still be 0? Sep 30, 2021 at 9:41
• From what I understand I think you are saying a part of the loop is inside the cavity and some part is outside it,if this is what you are asking then no we can't say for sure if line integral will be 0 or not . For one particular case it can be 0 if the electric field is perpendicular to the loop at all points that is inside the cavity. Sep 30, 2021 at 10:22
• Yes that's what I am saying.........well I guessed that it may or may not be 0 as you said but isn't the line integral of Electrostatic field supposed to 0 always in a loop? Sep 30, 2021 at 12:27
• I don't think so. Sep 30, 2021 at 12:39
• Why would Maxwell's equation become invalid for this special case? And no, the integral can be zero even if the field is not perpendicular to the path
– nasu
Sep 30, 2021 at 18:18

For electrostatic fields the line integral around a closed loop is zero. In general, this integral is related to the variation of the magnetic flux through the loop but electrostatic implies no changing fields. And back to your question, your implication is not right. The fact that the line integral is zero does not mean that the field is zero. It just means that for some portion of the path the contribution to the integral is negative and for other portions is positive.

• Yes I am aware that the field is not 0 in a cavity. I meant to say the field line will not pass through the cavity into the metal body so that Field in metal body remains 0. Well So may I conclude that since the field is static it's Line Integral shall be 0? But I heard that in Feynmann's lectures is mentioned that in this special case the line integral along this closed loop may not be 0 always?? Sep 30, 2021 at 14:35
That $$\oint_{\mathcal C}\mathbf E \cdot d \ell =0$$ along any closed contour $$\mathcal C$$ is true within or without the cavity. It is also true for a contour that is still in the cavity completely but is "hugging" its surface tangentially where $$\mathbf E_{t}=0$$. Now if your contour enters the wall at point $${\mathcal W_1}$$ and leaves it at point $$\mathcal W_2$$ then the integral of the inside the cavity portion is zero, $$\int_{\mathcal W_1}^{\mathcal W_2}\mathbf E \cdot d \ell =0$$ because its in-the-wall-portion is obviously zero, just as if you had started with a contour whose portions are tangential to the surface but then deformed continuously so that they are now inside the conductor.