Splittings and modified Hamiltonians
A harmonic oscillator advanced by fixed Verlet steps follows an ellipse with a calculable period. This explains how its energy error can remain bounded while its phase error grows. Even that energy bound can disappear if two individually stable step sizes alternate. In dimensionless canonical coordinates use , so one physical period is .
Required background. Poisson brackets and Hamiltonian flows fixes the Hamilton equations. The initial point in the numerical comparison is .
Compose flows that can be solved exactly
Section titled “Compose flows that can be solved exactly”The potential flow over is , and the kinetic flow over is . Apply a half kick, a full drift and a half kick in that order. Each shear is canonical, hence so is the composition. The one-step matrix is
Its determinant is one and . For define and . Then . Direct multiplication shows that is invariant. The matrix rotates the scaled plane clockwise through angle per step. Thus the exact time- Hamiltonian generating this particular discrete oscillator on the branch continuous at is . The scalar matters for timing, even though has the same level curves. Hairer, lecture 2, Theorem 2, p. 2, equation (2), PDF
At small , . At the eigenvalues coalesce and the matrix is a nontrivial Jordan block. For a nonlinear Hamiltonian the modified series is generally asymptotic. If the fixed-step numerical orbit stays in a compact set on which a modified Hamiltonian exists, an order- symplectic method gives over long intervals determined by the truncation. Analyticity of the Hamiltonian and method in a neighborhood permits optimal truncation and exponentially long times for sufficiently small . Here a two-by-two matrix logarithm gives the quadratic Hamiltonian exactly. Hairer, lecture 3, §3, Theorem 3 and the analytic case, pp. 6–7, PDF
Separate energy error from phase error
Section titled “Separate energy error from phase error”With and steps, the original energy in a binary64 calculation ranges from to . This agrees with the exact interval from the elliptic orbit. The largest absolute drift of is below . Yet the accumulated phase error is radians. Decreasing while holding the physical final time fixed tests the predicted second-order phase error.
Forward Euler instead has matrix . It multiplies the true energy by at every step, giving for the same data. This growth and the Verlet phase lead are different errors. For an integrable nonlinear lattice the discrete spectrum provides a further observable; the two-particle Toda comparison shows what additional structure its exact update needs. Reproduce the oscillator range and phase (Python)
For the numerical phase measurement start with and follow the angle , unwrapping it after each step. The minus sign counts the oscillator’s clockwise motion as positive phase. On the rotation per step is below , so no integer winding is lost. Subtract from the unwrapped angle. For an anharmonic system one can compare the full trajectory to an independently computed flow, as in the three-particle open Toda calculation. For colliding pulses one can track the separated crests at specified endpoints, as in the KdV time-step calculation.
What happens when two stable steps alternate?
Section titled “What happens when two stable steps alternate?”Apply a unit step, then a step of , and repeat this pair. Repeating either step on its own would confine the oscillator to an ellipse. The quadratic coefficient is for the first ellipse and for the second. The matrix for one pair follows by multiplying in the order in which the steps act.
The displayed entries are exact terminating decimals. Each step preserves area, hence . Its two multipliers solve and are approximately and . A component along the growing eigenvector changes sign and grows by a factor of every two steps. The initial state has such a component because the first column of has nonzero momentum. A stability test for a repeating step schedule therefore needs the multipliers of an entire period. Reproduce the pair using exact rational arithmetic (Python)
The figure locates other growing pairs. For dimensionless steps , let . Multiplication gives , while
Exponential growth occurs where the two factors have opposite signs. The curves meet at , where and the orbit repeats after four steps. Elsewhere on either curve the upper right entry is nonzero. The double multiplier then has a Jordan block, giving linear growth for initial points off its eigenline.
Stability of the oscillator sampled after each pair of Verlet steps, with angular frequency one. Hatched pairs have a growing multiplier. In the unshaded interior away from the dividing curves, both multipliers have unit modulus and every orbit is bounded. The axes show dimensionless step sizes.
References
Section titled “References”- Hairer, E. (2010). Geometric Numerical Integration. TU München lecture course. Lecture 2, “Symplectic integrators,” and lecture 3, “Backward error analysis.” Lecture 2, author PDF · Lecture 3, author PDF.
Connected readings