If the change in or is deemed to be ``internal'', that is, involving no external interactions, the appropriate accompanying change in the internal state variables is that which conserves energy. For the mass and its velocity, for example, we must have
where denote the mass values before and after the change, respectively, and denote the corresponding velocities. The velocity must therefore be scaled according to
since this holds the kinetic energy of the mass constant. Note that the momentum of the mass is changed, however, since
If the spring constant is to change from to , the instantaneous spring displacement must satisfy
In a velocity-wave simulation, displacement is the integral of velocity. Therefore, the energy-conserving velocity correction is impulsive in this case.