I'm very new to computational Physics and am finding conflicting statements on whether the velocity Verlet algorithm, defined as:
$\begin{align} x_{n+1} &= x_n + v_n \Delta t + \frac{1}{2} a_n \Delta t^2 \tag{1}\\ v_{n+1} &= v_n + \frac{1}{2}(a_n + a_{n+1}) \Delta t \tag{2} \end{align}$
is time-reversible.
From my understanding, a method is time-reversible if it is invariant under $\Delta t \to -\Delta t$. Applying this to the velocity Verlet algorithm, equation 1 becomes:
$\begin{align} x_{n-1} &= x_n - v_n \Delta t + \frac{1}{2} a_n \Delta t^2 \\ x_n &= x_{n-1} + v_n \Delta t - \frac{1}{2} a_n \Delta t^2 \\ x_{n+1} &= x_{n} + v_{n+1} \Delta t - \frac{1}{2} a_{n+1} \Delta t^2 \tag{1'} \end{align}$
and equation 2 becomes:
$\begin{align} v_{n-1} &= v_n - \frac{1}{2}(a_n + a_{n-1}) \Delta t \\ v_n &= v_{n-1} + \frac{1}{2}(a_n + a_{n-1}) \Delta t \\ v_{n+1} &= v_{n} + \frac{1}{2}(a_{n+1} + a_{n}) \Delta t \tag{2'} \end{align}$
So far, we see equation 2' is equivalent to equation 2 (so the velocity part is time reversible for step $n$), but equation 1' has the wrong times for acceleration and velocity, as well as wrong sign for the acceleration part. However, if we substitute in equation 2 (or 2') into equation 1', this recovers back equation 1 again. Therefore, I would have thought velocity Verlet is time reversible.
On the contrary, in Basic Concepts in Computational Physics by Stickler and Schachinger, they state on page 108:
The Stormer-Verlet algorithm$^{\dagger}$ is time-reversal symmetric (invariant under the transformation $\Delta t \to - \Delta t$), hence reversible. This is a direct consequence of its relation to the symplectic Euler method. [...] The leap-frog algorithm or the velocity Verlet algorithm [methods] are not time-reversal invariant.
They repeatedly state that leapfrog and velocity verlet are not time-reversible throughout the rest of the book. They define leapfrog as:
$\begin{align} x_{n+1} &= x_{n} + v_{n+\frac{1}{2}} \Delta t \tag{3} \\ v_{n+\frac{1}{2}} &= v_{n-\frac{1}{2}} + a_n \Delta t \tag{4} \\ v_{\frac{1}{2}} &= v_0 + \frac{1}{2}a_0 \Delta t \tag{5} \end{align}$
Using the same procedure as for velocity Verlet, I found that equations 3 and 4 are invariant under time reversal, but the initialising condition does change to:
$$v_{\frac{1}{2}} = v_0 + \frac{1}{2}a_{\frac{1}{2}} \Delta t \tag{5'}$$
where 5' differs from 5 since the acceleration at $t = \frac{1}{2} \Delta t$ is used instead of at $t = 0$.
Looking at the half time step implementation of velocity Verlet, defined as:
$\begin{align} v_{n + \frac{1}{2}} &= v_n + \frac{1}{2} a_n \Delta t \tag{6} \\ x_{n+1} &= x_n + v_{n + \frac{1}{2}} \Delta t \tag{7} \\ v_{n+1} &= v_{n + \frac{1}{2}} + \frac{1}{2} a_{n+1} \Delta t \tag{8} \end{align}$
I have found under time-reversal, these transform to:
$\begin{align} v_{n + \frac{1}{2}} &= v_n + \frac{1}{2} a_{n+\frac{1}{2}} \Delta t \tag{6'} \\ x_{n+1} &= x_n + v_{n + \frac{1}{2}} \Delta t \tag{7'} \\ v_{n+1} &= v_{n + \frac{1}{2}} + \frac{1}{2} a_{n+\frac{1}{2}} \Delta t \tag{8'} \end{align}$
So equation 7 is invariant, but the times for the accelerations at equations 6 and 8 are changed. Does this suggest the substitution of 2' into 1' was invalid and velocity Verlet isn't time reversible? Actually, equation 6' is equivalent to equation 8 and equation 8' is equivalent to equation 6 (as seen by adding or subtracting $\frac{1}{2}\Delta t$ to the times the equations are evaluated at). So does this mean velocity Verlet is still time reversible?
Lastly, in Computational Physics by Thijssen, it's stated that:
There exist two alternative formulations of the Verlet algorithm$^{\dagger}$, which are exactly equivalent to it in exact arithmetic but which are less susceptible to errors resulting from finite numerical precision in the computer than the original version. The first of these [is] the leap-frog form [and the second is] the so-called velocity-Verlet algorithm which is also more stable than the original Verlet form.
To summarise, my questions are:
- Are Stickler and Schachinger incorrect in stating that the velocity Verlet and leapfrog algorithms are not time reversible?
- Is the substitution of 2' into 1' valid to show that velocity Verlet is time reversible?
- Does the fact that the initialising condition of leapfrog is not time reversible mean that the leapfrog method itself is not time reversible? Other resources, including answers on this stack exchange, state leapfrog is time reversible.
- Since Thijssen states the velocity verlet and leapfrog algorithm are "exactly equivalent" in terms of the arithmetic, does this mean they inherit the time-reversibility (and possibly even the symplectic nature) of the Stormer-Verlet algorithm?
$^{\dagger}$For reference, the Stormer-Verlet algorithm is outlined here. This Wikipedia page also entails how to obtain velocities within this framework.
https://onlinelibrary.wiley.com/doi/pdf/10.1002/nme.6496 and https://math.stackexchange.com/questions/1448005/what-does-the-time-reversibility-of-verlet-or-other-integration-mean also both state velocity Verlet is time reversible
https://www5.in.tum.de/lehre/vorlesungen/sci_compII/ss13/uebungen/blatt9solution.pdf uses the substitution outlined earlier to show velocity Verlet is time reversible