[Physics] Electric flux in a non-uniform field

electric-fieldselectrostatics

A cube is placed in a non-uniform field, where the field is decreasing from left to right. So in this case, when you calculate flux on the left and right side of cube (of side $A$) using $E\cdot A$, the flux is not going to cancel as $E$ will be different for left and right surfaces.

So in this case, a closed surface placed in a field will not have zero net flux. Where am I making mistake? If I use the concept of line $f$ forces that net flux becomes zero as whatever line of force is coming in has to go out.

Best Answer

Imagine that your cube is just to the right of a point charge. The field lines from that charge are not parallel, they diverge. So some of them exit the cube through the top, bottom, front, and back faces. The total flux entering the left face is equal to the sum of the fluxes leaving through the other 5 faces.

Or perhaps you are thinking of field lines that are parallel, but decreasing in magnitude from left to right, say $E(r) = \hat{x}*(\textrm{some decreasing function of x})$. What your argument shows is that this is not a physically allowed field; it is not a solution of Maxwell's equations for a charge-free region of space.