% Rounded-off square well potential. FWHM is 1, depth is 100.
% All of the nonzero potential is contained within -2 < x < 2,
% and the integral of the potential equals -2 (same as v1square).
function v1 = v1rounded(x)

inside = ( abs(x) < 2 );
v1(inside) = 50 * ( - 1 - cos(x(inside) * pi/2) );
v1(!inside) = 0;
