# Justifying Gauss Law in 1D

From Maxwell equations, Gauss Law read:

$$\nabla\cdot\vec{E} = \rho/\epsilon_0$$

Integrating this divergence over some volume and applying the Divergence theorem leads to:

$$\int \vec{E}\cdot d\vec{S} = Q/\epsilon_0$$

One could think that going into a 2D world (flatland) would change Gauss Law by:

$$\int \vec{E}\cdot d\vec{l} = Q/\epsilon_0$$,

but this is not a result we would get from applying this dimension reduction to the differential form of Gauss Law, is it? The same problem applies to a 1D world

For what its worth, Gauss's law in 1+1D reads $$\frac{dE}{dx}~=~\frac{\rho}{\epsilon_0}\qquad\Leftrightarrow\qquad E(b)-E(a)~=~\frac{\int_a^b \!dx ~\rho}{\epsilon_0}.$$ (The boundary terms live on a zero-sphere $$\mathbb{S}^0\cong\{a,b\}$$.) For EM theory in various spacetime dimensions, see e.g. my Phys.SE answers here and here.
The fundamental idea of the Gauss law is the connection between charge density $$\rho$$ and the electric field $$E$$: the charge content is always specified by the electric field at its boundary. This is the heart of the Gauss law and holds in any dimension. Actually current experiments, called quantum simulators, try to implement the quantum version of electrodynamics (QED) in low dimensions, because higher dimensions are too complicated for now.
The integral and differential versions of the Gauss law in different dimensions are connected by the divergence theorem, a special case of Stoke's theorem. In two dimensions it also has the name Green's theorem. Removing one dimension from the differential form of Gauss's law is $$\partial_x E_x + \partial_y E_y = \rho/\epsilon_0$$ or $$\int_{\partial A} \vec E \mathrm\, d \vec l = Q = \int_A \frac{\rho(x)}{\epsilon_0}\, \mathrm d A.$$ for an area $$A$$ (and you have to take care of unpacking the line element correctly: $$\mathrm d \vec l = \vec n \mathrm d l$$, where $$\vec n$$ is an outward-pointing unit normal vector and not pointing not along the line).
In one dimension, Stoke's theorem / the divergence theorem boils down to just the fundamental theorem of calculus and the Gauss law is really just $$\partial_x E = \rho(x)/\epsilon_0$$ or $$E(x_2) - E(x_1) = \frac{Q}{\epsilon_0} = \int_{x_1}^{x_2} \frac{\rho(x)}{\epsilon_0} \mathrm d x.$$