= Solution
Translational and reflection symmetry parallel to the slabs imply $\mathbf E=E_x(x)\hat{\mathbf x}$. The differential <Gauss's law> is $dE_x/dx=\rho/\epsilon_0$. Starting at the left boundary with $E_x(-a)=0$ gives
$$
E_x(x)=-\frac{C}{\epsilon_0a}(x+a),\qquad -a\le x\le0.
$$
There is no singular <surface charge> at $x=0$, so the normal <electric field> is continuous there: $E_x(0)=-C/\epsilon_0$. Integrating through the positive slab gives
$$
\boxed{\mathbf E(x)=\begin{cases}
-\dfrac{C(x+a)}{\epsilon_0a}\hat{\mathbf x},&-a\le x\le0,\\
-\dfrac{C(b-x)}{\epsilon_0b}\hat{\mathbf x},&0\le x\le b,\\
0,&x<-a\text{ or }x>b.
\end{cases}}
$$
The second expression indeed returns to zero at $x=b$, because the two total charges per unit area are $-C$ and $+C$. For $C>0$, the <electric field> throughout the interior points from the positive slab towards the negative slab, along $-x$; reversing $C$ reverses the directions. The piecewise linear profile is a useful consequence of the uniform volume <charge density>.
Back to article page