Re-derivation
So I tried working this out from scratch...starting with two particles, then taking the mass of the second to be infinite to get an immobile wall, and confirmed that only if the condition on the height of the barrier is met is energy conserved -- and in that case, the correct Newtonian equations are reproduced... So I was hoping someone might see where I went wrong.
Variables
D := diameter of particle
K := height of "wall" (nonzero; assumed by most references to be a constant, often infinite, but always greater than the maximum kinetic energy; this derivation only assumes that it is position-independent)
##m_i## := mass of particle i (for a wall, ##m_2 → ∞##)
## x_1, x_2, p_1, p_2 ## := coordinates and momenta of particles
##H = T + U##
##U(r) = Kθ(D - r)##
##T = p_1^2/2m + p_2^2/2m##
Definitions / abbreviations
##ε(x) := sign(x) ##
##θ(x) := step(x)##
##r = |x_1 - x_2|##
##∂r/∂x_1 = ε(x_1 - x_2)##
##∂r/∂x_2 = -ε(x_1 - x_2)##
##∂θ/∂x = δ(x)##
Derivation
(0) Hamilton's equations:
##∂H/∂x_1 = -dp_1/dt = ∂U/∂x_1##
##∂H/∂x_2 = -dp_2/dt = ∂U/∂x_2##
(1) Chain rule (prime means differentiation wrt appropriate x):
##∂U/∂x_1 = Kθ'(D - r)(-r') = -Kδ(D - |x_1 - x_2|)ε(x_1 - x_2)##
##∂U/∂x_2 = Kθ'(D - r)(-r') = Kδ(D - |x1_ - x_2|)ε(x_1 - x_2)##
(2) note that the derivatives are equal/opposite
##-∂U/∂x_1 = dp_1/dt = -dp_2/dt = ∂U/∂x_2##
(3) find total change in momenta ##ΔP_i ## (and final momenta ##p_i(t_2)##)
Let ##t_1## := the time where ##x_1 - x_2 = +d##; let ##t_0 := t_1 - dt, t_2 := t_1 + dt##
Let ##p_1(t_1) = P_1, p_2(t_1) = P_2##
Let ##ΔP_1 := ∫(dp_1/dt)dt ## from ## t_0...t_2 = K = -ΔP_2##
Then ##p_1(t_2) = P_1 + K; p_2(t_2) = P_2 - K##
(4) But, energy must be conserved: ##T(p_i) = T(p_i + ΔP_i)##
##(P_1 + K)^2/2m_1 + (P_2 - K)^2/2m_2 = P_1^2/2m_1 + P_2^2/2m_2##
##(P_1^2 + 2KP_1 + K^2)/2m_1 + (P_2^2 - 2KP_2 + K^2)/2m_2 = P_1^2/2m_1 + P_2^2/2m_2##
##(2KP_1 + K^2)/2m_1 + (-2KP_2 + K^2)/2m_2 = 0##
Multiply through by ##2m_1m_2##
##(2KP_1 + K^2)m_2 + (-2KP_2 + K^2)m_1 = 0##
##2K(m_2 P_1 + 1/2 K m_2 - m_1 P_2 + 1/2K m_1) = 0##
(5) By definition, |K| > 0. So,
##m_2 P_1 - m_1 P_2 + 1/2K(m_1 + m_2) = 0##
Conclusion:
##K = 2(m_1 P_2 - m_2 P_1)/(m_1 + m_2) ##
So to conserve kinetic energy, K (and hence U) must depend on the momentum.
(6)
In the special case where ##m_2 -> infinity##:
## 1/2K = (m_1 P_2)/(m_1 + m_2) - (m_2 P_1)/(m_1 + m_2)##
## 1/2K = (m_1 P_2)/(m_2) - (m_2 P_1)/(m_2)##
## 1/2K = 0 - P_1, K = -2P_1##, as expected.
(7)
However, since the potential now depends on the momenta, ## dx_i/dt## is no longer simply ##p_i/2m_i##; we have
## H = p_1^2/2m_1 + p_2^2/2m_2 + 2(m_1 P_2 - m_2 P_1)θ(D - r)/(m_1 + m_2)##
##∂H/∂p_1 = dx_1/dt = p_1/m_1 - 2m_2θ(D - r)/(m_1 + m_2)##
##∂H/∂p_2 = dx_2/dt = p_2/m_2 + 2m_1θ(D - r)/(m_1 + m_2)##
(8)
Or in the special case of the wall,
## H = p_1^2/2m_1 + p_2^2/2m_2 -2 P_1θ(D - r)##
##∂H/∂p_1 = dx_1/dt = p_1/m_1 - 2P_1 θ(D - r)##
##∂H/∂p_2 = dx_2/dt = p_2/m_2 + 2P_1θ(D - r)##
...which is zero outside of the barrier, but there is ambiguity in the definition of the step function at zero; we can retain the normal equations of motion only if θ(0) = 0.So...what's not right?