Skip to content

How much of mechanics survives a time discretization? Differentiating an action assigned to an edge gives a momentum at each end. When one momentum determines the next position locally, the resulting map preserves the symplectic form. A harmonic oscillator also preserves its energy under the midpoint step. A quartic oscillator makes a finite energy error under the same construction, even though its map still preserves phase-space area.

Required background. The Lyness map, its invariant and its domain explains why an equation for a step must specify where it defines a map.

For a time step h>0h\gt0, sum a differentiable discrete Lagrangian Sh(qn,qn+1)S_h(q_n,q_{n+1}) over successive edges. Hold the first and last positions fixed. Varying a single internal qnq_n gives

D2Sh(qn−1,qn)+D1Sh(qn,qn+1)=0. D_2S_h(q_{n-1},q_n)+D_1S_h(q_n,q_{n+1})=0 .

The old and new momenta on one edge (q,Q)(q,Q) are p=−D1Shp=-D_1S_h and P=D2ShP=D_2S_h. The internal stationarity equation now says that the arriving and departing definitions of momentum agree. A nonsingular mixed Hessian D1D2ShD_1D_2S_h permits a local solution for QQ from (q,p)(q,p). Along the resulting map dSh=−p dq+P dQdS_h=-p\,dq+P\,dQ. Taking a second differential gives dQ∧dP=dq∧dpdQ\wedge dP=dq\wedge dp. This proof of symplecticity uses the existence of the map and does not require quadratic forces. Marsden and West, discrete variational principle and midpoint rule, pp. 370–374 and 408, PDF

Take mass m>0m\gt0, frequency ω>0\omega\gt0 and potential V(q)=mω2q2/2V(q)=m\omega^2q^2/2. Evaluate the velocity on the edge and the potential at its midpoint:

Sh(q,Q)=m2h(Q−q)2−hmω28(Q+q)2. S_h(q,Q)=\frac{m}{2h}(Q-q)^2-\frac{hm\omega^2}{8}(Q+q)^2.

Subtracting and adding the two momentum formulas yields

P−p=−hmω22(Q+q),Q−q=h2m(P+p). \begin{aligned} P-p&=-\frac{hm\omega^2}{2}(Q+q),\\ Q-q&=\frac{h}{2m}(P+p). \end{aligned}

With η=hω/2\eta=h\omega/2 and s=p/(mω)s=p/(m\omega) the update in (q,s)(q,s) is

11+η2(1−η22η−2η1−η2). \frac{1}{1+\eta^2} \begin{pmatrix}1-\eta^2&2\eta\\-2\eta&1-\eta^2\end{pmatrix}.

Its determinant is one and q2+s2q^2+s^2 is invariant. The numerical phase advance is 2arctan⁡η2\arctan\eta per step. For m=ω=h=1m=\omega=h=1 and (q,p)=(1,0)(q,p)=(1,0) the result is (3/5,−4/5)(3/5,-4/5), still of energy 1/21/2. The exact continuous answer is (cos⁡1,−sin⁡1)(\cos1,-\sin1), so the phase already differs after one step.

Measure the energy error of a regular step

Section titled “Measure the energy error of a regular step”

Write δ=Q−q\delta=Q-q and qˉ=(Q+q)/2\bar q=(Q+q)/2. For a general potential VV the midpoint action gives P−p=−hV′(qˉ)P-p=-hV'(\bar q) and δ=h(P+p)/(2m)\delta=h(P+p)/(2m). Multiplying the first equation by the mean velocity yields the change in kinetic energy. Adding the potential change gives the energy defect for the original Hamiltonian,

H(Q,P)−H(q,p)=V(Q)−V(q)−δV′(qˉ). H(Q,P)-H(q,p) =V(Q)-V(q)-\delta V'(\bar q).

Thus the relevant test is whether the midpoint force accounts for the full potential difference across the edge. For a quadratic potential it does. For V(q)=q4/4V(q)=q^4/4 expansion about qˉ\bar q leaves qˉ δ3/4\bar q\,\delta^3/4. Marsden and West, §2.6.1, Eqs. (2.6.1a–b), pp. 408–409 (PDF)

For a step anyone can check by hand, use h=m=1h=m=1 and prescribe q=0q=0, Q=2Q=2. The endpoint momenta are p=5/2p=5/2 and P=3/2P=3/2. The energy increases from 25/825/8 to 41/841/8, exactly the predicted defect 22. Check area preservation on this very edge by differentiating the momentum equation:

p=Q−q+12qˉ3,dp=74 dQ−14 dq,dP=2(dQ−dq)−dp. \begin{aligned} p&=Q-q+\tfrac12\bar q^3,\\ dp&=\tfrac74\,dQ-\tfrac14\,dq,\qquad dP=2(dQ-dq)-dp . \end{aligned}

The Jacobian in the ordered variables (q,p)(q,p) is therefore

∂(Q,P)∂(q,p)=17(14−121). \frac{\partial(Q,P)}{\partial(q,p)} =\frac17\begin{pmatrix}1&4\\-12&1\end{pmatrix}.

Its determinant is one. This one step provides both an exact check of the symplectic calculation and a counterexample to exact conservation of the given energy.

For the same midpoint construction with general VV the mixed derivative is −m/h−(h/4)V′′((q+Q)/2)-m/h-(h/4)V''((q+Q)/2). It is always nonzero for the harmonic oscillator. For an inverted oscillator V=−mω2q2/2V=-m\omega^2q^2/2 it vanishes at h=2/ωh=2/\omega. Substitution at this step gives Sh=mω(Q2+q2)/2S_h=m\omega(Q^2+q^2)/2. The initial momentum condition now requires p=−mωqp=-m\omega q independently of QQ. Most initial data admit no solution, and on that line QQ is undetermined. This example pinpoints the failed implicit-function step even though the two-endpoint action is finite and differentiable.

  • Marsden, J. E., and West, M. (2001). Discrete mechanics and variational integrators. Acta Numerica 10, 357–514. DOI.