# Conservation of energy in a mechanical system with a discontinuous potential function

I've started reading Landau-Lifshitz Mechanics, and I'm having trouble with the problem at the end of section 7.

A particle of mass $$m$$ moving with velocity $$\mathbf{v}_1$$ leaves a half-space in which its potential energy is a constant $$U_1$$ and enters another in which its potential energy is a different constant $$U_2$$. Determine the change in the direction of motion of the particle.

The text's solution makes use of the conservation of energy in the system. I don't follow how the energy is conserved here for two reasons:

• The discontinuity of the potential energy function $$U = \begin{cases}U_1 & \text{in the one half-space}\\ U_2 & \text{in the other half-space}\end{cases}$$ suggests to me that the Lagrangian $$L = T - U$$ is also discontinuous.
• The derivation of the conservation of energy in a closed system seems to rely on the Lagrangian being differentiable (I assume it's well-known, but I'll reproduce it here with specific attention to this problem). The total time derivative of the Lagrangian can be expressed as $$\frac{dL}{dt} = \sum_i \frac{\partial L}{\partial q_i}\dot{q_i} + \sum_i \frac{\partial L}{\partial \dot{q_i}} \ddot{q_i}$$ everywhere except the boundary between the two half-spaces (since not all of the derivatives $$\partial L/\partial q_i$$ exist on the boundary). Making use of Lagrange's equations to replace $$\partial L/\partial q_i$$ with $$(d/dt) \partial L/\partial \dot{q_i}$$, we obtain \begin{align} \frac{dL}{dt} &= \sum_i \dot{q_i} \frac{d}{dt} \left(\frac{\partial L}{\partial \dot{q_i}}\right) + \sum_i \frac{\partial L}{\partial \dot{q_i}} \ddot{q_i} \\ &= \sum_i \frac{d}{dt} \left(\dot{q_i} \frac{\partial L}{\partial \dot{q_i}}\right). \end{align} (I won't reproduce any here, but the derivations I can find for Lagrange's equations also seem to assume that the Lagrangian is differentiable). This leads to the conclusion that $$\frac{d}{dt}\left(\sum_i \dot{q_i} \frac{\partial L}{\partial \dot{q_i}} - L\right) = 0$$ everywhere except the boundary between the two half-spaces, and hence the quantity $$E \equiv \sum_i \dot{q_i} \frac{\partial L}{\partial \dot{q_i}} - L$$ is constant over those two half spaces. I don't see why the two constant values should be the same.

What am I missing? What justifies the conservation of energy in this system?

In your case, the potential energy term has the form $$U(x,y,z)=U_1\Theta(-x)+U_2(x)\Theta(x),$$ where $$\Theta(x)$$ is the Heaviside step function. As a consequence, derivatives of $$U(x,y,z)$$ have to be regarded in the sense of distributions. Thus the equations of motion of the system under consideration are given by $$m \ddot{x}= - \frac{\partial U(x,y,z)}{\partial x}=U_1\delta(x)-U_2\delta(x), \quad m\ddot{y}=0, \quad m \ddot{z}=0,$$ where $$\delta(x)$$ denotes the Dirac delta distribution. The time derivative of the total energy $$E=T+U$$ is given by \begin{align}\frac{d E}{dt}&=\frac{d}{dt}\left( \frac{m \dot{x}^2}{2}+\frac{m \dot{y}^2}{2}+\frac{m\dot{z}^2}{2}+U(x,y,z)\right)\\[5pt] &=m \dot{x}\ddot{x}+m \dot{y}\ddot{y}+m\dot{z}\ddot{z}+\frac{\partial U(x,y,z)}{\partial x} \dot{x}+\frac{\partial U(x,y,z)}{\partial y}\dot{y}+\frac{\partial U(x,y,z)}{\partial z}\dot{z}\\[5pt]&=(U_1-U_2)\delta(x)\dot{x}+(U_2-U_1)\delta(x)\dot{x}\\[5pt]&=0,\end{align}where the equations of motion were used in the step from the second to the third line.

In conclusion, the presence of the step function in the potential energy does not cause any problems if the appropriate mathematical framework is used and the conservation of energy is a consequence of the fact that the Lagrangian has no explicit time dependence.

• Formally it is correct, however there is still some work to do. You are assuming that $\dot{x}(t)$ exists even when the particle crosses the boundary of the two regions. The differential equation determining this curve is singular there. Nothing says that your hypothesis is correct without an explicit proof. Commented Aug 10 at 14:20
• @ValterMoretti Do you know anywhere I can read about these types of proofs? Or find an example of one such proof? Commented Aug 10 at 17:14
• Sorry, I do not know, I am not even convinced that the result is correct. I do not know if it is possible to make rigorous this argument...I think that L&L simply assume the conservation of energy for physical reasons and use this fact to conclude something about the motion, not vice versa.. Commented Aug 10 at 17:57
• Indeed they ask for determining the change of direction of the particle. I think that it means that the velocity vector is discontinuous (as direction at least) when passing through the boundary between the regions... Commented Aug 10 at 18:06
1. The functional derivative $$\frac{\delta S}{\delta q(t)}$$ can be viewed as a distribution, i.e. the Euler-Lagrange (EL) equations can be written with the help of test functions $$\forall \eta~\in~C^{\infty}_c(\mathbb{R}):~~\int_{\mathbb{R}}\!dt~ \frac{\delta S}{\delta q(t)}\eta(t)~=~0.$$ However, if the EL equations are non-linear (which they are in OP's case), we're have products of distributions, which are mathematically ill-defined.

2. Alternatively, note that OP's original Lagrangian has no explicit time dependence. One can introduce a regularization with no explicit time dependence (and only in the end remove it again). See e.g. this Phys.SE post. One can argue that since the regularized model preserves energy by Noether's theorem, OP's original model does as well.

3. In OP's example both $$T$$, $$V$$ and $$L=T-V$$ are discontinuous as a function of time $$t$$, but the mechanical energy $$T+V$$ is still conserved.