# If the electric field inside an infinitely long charged cylinder is non-zero except origin, how can be the inward flux zero?

If the electric field inside an infinitely long charged cylinder is non-zero except origin, how can be the inward flux zero?

If we look at this video, we would see that a charged ring has a non-zero E-field inside it except for the origin. A cylinder can be constructed by infinitely many rings, and their vertical components would just cancel out each other to give us back the same formula.

So if we place inside a surface S (let's say another cylinder), I can't understand how can the net flux into the S be zero.

Gaussian law tells us that the flux passing through a surface is exactly the sum of charges in it. Flux has to be zero because we have no charges inside S. But I am not so sure about it. The argument for the Gaussian law in the case of external charges is:

Here the field lines entering the sphere leave them, making the total flux zero. But in our charged cylinder, we see that field lines end in the origin, where the electric field is zero by symmetry, they don't exit the cylinder. So it doesn't seem plausible to me that we will have zero net flux. Please help me understand what is going on here. Thanks!

• One possibility is that you are ignoring the fact that you need to have a closed surface through which to calculate the flux. So, you have to imagine, for instance, a sphere centered at the origin, and the electric field will be pointing out of the surface at certain parts of the sphere. Commented May 4, 2023 at 2:23