Electric potential energy in $1+1$-dimensional space-time In $1+1$-dimensional space-time, Gauss's law implies that
$$\int\ \vec{E}\cdot{d\vec{A}}=\displaystyle{\frac{Q}{\epsilon_{0}}} \implies 2 E =\displaystyle{\frac{Q}{\epsilon_{0}}} \implies E =\displaystyle{\frac{Q}{2\epsilon_{0}}},$$
where the factor of $2$ comes from the two endpoints of the Gaussian 'surface' with the charge $Q$ at the centre.
So, $$V=-\int\ \vec{E}\cdot{d\vec{r}} \sim -Qx,$$
where $x$ is the distance from the charge $Q$ and hence is necessarily non-negative.

Now, consider the charge configuration where two massive charges $+Q$ are separated by a distance $d$ and a light charge $-q$ oscillates in between the two massive charges. The light charge $-q$ is attached to one of the massive charges $+Q$ via a spring which causes the oscillation of the light charge $-q$.
So, $$V(x) \sim x^{2} + |x|,$$
where $x$ is the displacement from the equilibrium position.
Why is the electric potential energy a function of the absolute value of the displacement of the light charge $-q$ ?
 A: In this answer we would like to clarify the formulation of E&M in 1+1D with point charges $q_1,\ldots, q_n$, at positions $x_1(t),\ldots, x_n(t)$. The charge density is
$$ \rho(x,t)~=~\sum_{i=1}^n q_i \delta(x\!-\!x_i(t)). \tag{1}$$ 
The total charge in the interval $[a,b]$ is
$$ Q([a,b]) ~=~\int_{[a,b]} \!dx ~\rho~=~\epsilon_0\Phi_E, ~\qquad \Phi_E~=~E(x\!=\!b)-E(x\!=\!a),  \tag{2} $$
which is Gauss's law in integral form. A note about sign conventions: Gauss's law measures the electric flux $\Phi_E$ out of the interval $[a,b]$. The electric field $E$ is measured positive in the positive $x$-direction. Therefore the contribution to the electric flux is $-E(x\!=\!a)$ at the lower endpoint $x\!=\!a$.
Gauss's law in differential form reads
$$ \frac{\partial E}{\partial x}~=~\frac{\rho}{\epsilon_0}. \tag{3}$$
The electric field is 
$$ E(x,t)~=~\sum_{i=1}^n \frac{q_i}{2\epsilon_0} {\rm sgn}(x\!-\!x_i(t))~=~-\frac{\partial V(x,t)}{\partial x}. \tag{4}$$
The potential field is 
$$ V(x,t)~=~-\sum_{i=1}^n \frac{q_i}{2\epsilon_0} |x\!-\!x_i(t)|. \tag{5}$$
There is no magnetic field. See also e.g. my Phys.SE answers here and here.
