The one-dimensional analog of the Coulomb potential,

, is the absolute value function,

. Two electrons (at locations

and

) restricted to a one-dimensional

-unit-width box repel each other with a potential proportional to

. The one-dimensional Schrödinger equation is mathematically identical to the corresponding two-dimensional Schrödinger equation for a single electron moving in a

-unit-square box experiencing the potential

with

a strength parameter. The potential has

symmetry and the wavefunctions must share this symmetry. Approximate wavefunctions are found using the variational method with appropriate linear combinations of the 49 basis functions

,

. The Demonstration shows the potential together with either the wavefunction

or its square

for various values of the potential parameter. If the display choice is for

, the one-dimensional density function
is shown in red on the

surface of the displayed cube.