5
$\begingroup$

Even though this method is more widely used than the simple Verlet method mentioned above, it unfortunately has an error term of O(Δt^2) , which is two orders of magnitude worse. That said, if you want to have a simulation with many objects that depend on one another --- like a gravity simulation --- the Velocity Verlet algorithm is a handy choice;

I found that here and the site doesn't offer any explanation on why this would be the case. Apparently the advantage over the Verlet, that the velocity Verlet, has to offer is that it can calculate the velocity and the position but I don't see how that helps. I haven't found any other sources that help either.

$\endgroup$

1 Answer 1

10
$\begingroup$

That is a common misconception. Verlet in whatever form is a second-order method.

The misconception results from the fact that the truncation error of the Verlet formula is of 4th order. The naive association is that then the method has a global 3rd-order error. But the formula is not a simple difference formula of order 1, but of order 2. The implied double summation reduces the order twice from truncation to global.

So if you compute the sequence $x_k$ with the Verlet formula with a good value for $x_1$, and compare with an exact solution $x(t)$, setting $e_k=x_k-x(t_k)$, then $$ e_{k+1}-2e_k+e_{k-1}=U(\Delta t^4),\\ e_{k+1}-e_k=O(Δt^3),\\ e_k=O(Δt^2). $$ So if you compute $v_k=\dfrac{x_{k+1}-x_{k-1}}{2Δt},$ then its error is still 2nd order.

The combination of the 2nd order midpoint and Heun methods in the velocity Verlet method is again 2nd order, giving the same values as the above method. Its advantage is that it is a little more robust against accumulation of floating-point noise at small step sizes, the (relative) floating-point error term changing from $\sim\frac{\mu}{Δt^2}$ to $\sim\frac{\mu}{Δt}$, where $\mu$ is the machine constant representing the floating-point precision.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.