Electric Field of an Infinite Sheet Using Gauss's Law in Differential Form $\nabla\cdot\text{E}=\frac{\rho}{\epsilon_0}$ I've been trying to calculate the electric field of an infinite sheet via the differential form, i.e. using
\begin{align}
\nabla\cdot\text{E}=\frac{\rho}{\epsilon_0}.
\end{align}
I am aware the answer is
\begin{align}
\text{E}=\frac{\sigma}{2\epsilon_0}\hat{n},
\end{align}
as well as how to use Gauss's law to arrive at it, but I am having trouble matching it without Gauss's law.
The charge distribution is
\begin{align}
\rho=\sigma\delta(z).
\end{align}
Since the sheet is infinite the electric field only points in the $z$ direction,
\begin{align}
\frac{\mathrm d\text{E}_z}{\mathrm dz}=\frac{\sigma}{\epsilon_0}\delta(z).
\end{align}
Integrating gives that
\begin{align}
\text{E}_z=\frac{\sigma}{\epsilon_0}.
\end{align}
Which is missing a factor of 1/2. Perhaps I am going wrong with my integration, as the delta function must be integrated around the point in order for it to output 1,
\begin{align}
\int_{a-\varepsilon}^{a+\varepsilon}\delta(z-a)\mathrm dz=1,
\end{align}
which makes me suspicious of my indefinite integration.
Perhaps the correct methodology may lie in using Heaviside step function, as I believe H$(0)=1/2$ depending on who you ask,
\begin{align}
\rho&=\sigma\frac{\mathrm d}{\mathrm dz}\mathrm H(z)\\
\mathrm H(z)&=\int_{-\infty}^z\delta(s)\mathrm ds,
\end{align}
but when I try that I get
\begin{align}
\mathrm E_z=\frac{\sigma}{\epsilon_0}\mathrm H(z),
\end{align}
and I can't justify evaluating both sides at 0.
 A: This is basically a problem with your boundary conditions.  You are integrating from minus infinity assuming the field there is zero until you hit the sheet, then you get $\frac{\sigma}{\epsilon_0}$ from the delta function. This says the $E$ is zero for $z<0$, and $E$ is  $\frac{\sigma}{\epsilon_0}$ for $z>0$, or in other words: $E=\frac{\sigma}{\epsilon_0}H(z)$ as you found.
But remember, the electric field (by symmetry) should be nonzero on both sides of the sheet, and have the same magnitude (opposite direction).   No worries though, as we can always add a constant and still have a valid solution to the differential equation. So just subtract $\frac{\sigma}{2\epsilon_0}$  to get:
$E(z)=\frac{\sigma}{\epsilon_0}H(z) -\frac{\sigma}{2\epsilon_0}$
Now we have the same magnitude on each side , and is the answer you expect ($\frac{\sigma}{2\epsilon_0}$).
A: The change in the z-component of the electric field as you pass through the sheet is $\sigma/\epsilon_0$. But there is a constant of integration $C$ you must set. You should determine the $C$ that enforces the symmetry of the situation (think about how the fields should look above and below the sheet).
