Analysis of Verlet integration method

In summary, the global error for verlet integration is 2nd order, but it can be approximated by a 4th order approximation.
  • #1
woodssnoop
10
0
Hello:

I am trying to determine the global error for the verlet integration algorithm: [itex]r_{i+1}=2r_{i}-r_{i-1}+\ddot{r}_{i}h^{2}[/itex]
It is easy to show that this approximation is locally 4th order, by way of a Talyor expansion. I have look around extensively for a proof of the global error but have been unsuccessful in finding a reasonable derivation anywhere (the articles I have found seem to make too many unjustified assumption and/or glaze over the dropping of terms; similar to the wikipedia page on verlet integration). (1) Has anyone else ran across a good derivation of the verlet integrators global error? My attempts at finding the global error for this expression has proved to be quite difficult.

The numerical testing I have done has shown 2nd order global error, but I can't prove it. (2) I know I have to show that [itex]d_{k} \leq M n^2 [/itex] for all [itex]k \leq n[/itex], where M is some constant, but how can I show this for an arbitrary M? In real analysis, you show an equation like this is true by showing that for any [itex]\epsilon[/itex] you can find a [itex]n[/itex] such that the expression holds, but I can't seem to frame my problem in those terms. I have been trying several different approaches, and my latest attempt is below.



My first step was to set up a difference equation for [itex]r_{i}[/itex] and [itex]r(h*i)[/itex] where [itex]r(h*i)[/itex] is the exact solution and [itex]r_{i}[/itex] is the approximate solution. After subtracting the two expression I get the difference formula:
[itex]d_{i+1}=2d_{i}-d_{i-1}-h^{2}(\ddot{r}_{i}-\ddot{r}(h*i)) - O(h^{4})[/itex]

using the mean value theorem:
[itex]d_{i+1}=2d_{i}-d_{i-1}-h^{2}(\ddot{\xi}_{i}d_{i}) - O(h^{4})[/itex] for [itex]\xi\in[r_{i},r(h*i)][/itex]

[itex]\Leftrightarrow d_{i+1}-(2-h^{2}(\ddot{\xi}_{i}))d_{i}+d_{i-1}=-O(h^{4})[/itex]

[itex]r[/itex] is differentiable on the interval [itex][0,h*n][/itex]. Which implies [itex]\ddot{\xi}_{i}[/itex] has a maximum. Letting [itex]\epsilon=h^{2}\ddot{\xi}_{i}[/itex] gives:

[itex]d_{i+1}-(2-\epsilon)d_{i}+d_{i-1}=-O(h^{4})[/itex]

condensing further:

[itex]d_{i+1}-xd_{i}+d_{i-1}=-O(h^{4})[/itex] where [itex]x=2-\epsilon[/itex].

This expression can be written out in matrix form (shown below is just a 12X12 example) where A=
attachment.php?attachmentid=38723&stc=1&d=1315695090.png


Taking the inverse of A yields:
attachment.php?attachmentid=38724&stc=1&d=1315695090.jpg


The rows of A have a closed form solution:
[itex]a(i)=\frac{(x-\sqrt{x^{2}-4})^{i}-(x-\sqrt{x^{2}-4})^{i}}{2^{i}\sqrt{x^{2}-4}}[/itex]

[itex]\Rightarrow d_{n}=\sum_{i=1}^{n}a(i)[/itex]

This two can be expressed in a better way:
[itex]d_{n}=\frac{(\frac{x-\sqrt{x^{2}-4}}{2})^{n}(\sqrt{x^{2}-4}+x-2)+(\frac{x+\sqrt{x^{2}-4}}{2})^{n}(\sqrt{x^{2}-4}-x+2)-2\sqrt{x^{2}-4}}{x-2}[/itex]

I am trying to show that [itex] d(n) \leq M n^2 [/itex], but I have been having trouble show that this true.
 

Attachments

  • Matrix.png
    Matrix.png
    1.1 KB · Views: 619
  • inverse.jpg
    inverse.jpg
    14 KB · Views: 581
Physics news on Phys.org
  • #2
Personally I would use a different approach to investigating the global error.

The local error for a single step doesn't tell you much, because it assumes that all the "input" quantities are exact. But when you take the second step, that assumption is false.

The idea of a global error estimate only really makes sense given some restrictions on the function you are integrating. I've never used Verlet integration for "real work" but I bet it is possible to invent an ODE where the error is order (1), or it even goes unstable, for any constant size step. But of course if you wanted to integrate such an equation. you wouldn't use Verlet...

So, I would start by looking at the global behavior for a simple ODE, say x'' + x = 0.

Any exact solution is a linear combination of the two independent solutions [itex]x = e^{i t}[/itex] and [itex]x = e^{-i t}[/itex], where the linear combination depends on the boundary conditions. (It's easier to work with complex solutions, even if in "real life" you are only interested in real solutions)

To compare the exact solution with with the finite difference solution, write the FD equations in the form
[tex]\left[ \begin{matrix} x_{i+1} \cr x_i \end{matrix}\right] = \left[ A \right]
\left[\begin{matrix} x_i \cr x_{i-1} \cr \end{matrix}\right] [/tex]
where A is a 2x2 matrix.

[tex] A = \left[ \begin{matrix} 2-h^2 & -1 \cr 1 & 0 \end{matrix}\right] [/tex]

The first row of A represents the FD scheme for the test equation (using the fact that x'' = -x), the second row just says [itex]x_i = x_i[/itex].

Now, find the eigenvalues and vectors of A. They will represent two "basic solutions" of the FD scheme, which should be oscillating functions that tend to the solutions of the ODE in te limit as h goes to 0. The difference between the FD and ODE solutions will give you a measure of the global error.

Hope that helps.
 
Last edited:
  • #3
AlephZero said:
Personally I would use a different approach to investigating the global error.

The local error for a single step doesn't tell you much, because it assumes that all the "input" quantities are exact. But when you take the second step, that assumption is false.

The idea of a global error estimate only really makes sense given some restrictions on the function you are integrating. I've never used Verlet integration for "real work" but I bet it is possible to invent an ODE where the error is order (1), or it even goes unstable, for any constant size step. But of course if you wanted to integrate such an equation. you wouldn't use Verlet...

So, I would start by looking at the global behavior for a simple ODE, say x'' + x = 0.

Any exact solution is a linear combination of the two independent solutions [itex]x = e^{i t}[/itex] and [itex]x = e^{-i t}[/itex], where the linear combination depends on the boundary conditions. (It's easier to work with complex solutions, even if in "real life" you are only interested in real solutions)

To compare the exact solution with with the finite difference solution, write the FD equations in the form
[tex]\left[ \begin{matrix} x_{i+1} \cr x_i \end{matrix}\right] = \left[ A \right]
\left[\begin{matrix} x_i \cr x_{i-1} \cr \end{matrix}\right] [/tex]
where A is a 2x2 matrix.

[tex] A = \left[ \begin{matrix} 2-h^2 & -1 \cr 1 & 0 \end{matrix}\right] [/tex]

The first row of A represents the FD scheme for the test equation (using the fact that x'' = -x), the second row just says [itex]x_i = x_i[/itex].

Now, find the eigenvalues and vectors of A. They will represent two "basic solutions" of the FD scheme, which should be oscillating functions that tend to the solutions of the ODE in te limit as h goes to 0. The difference between the FD and ODE solutions will give you a measure of the global error.

Hope that helps.
My PI was able to find a reference for the 2nd order convergence, since the verlet algorithm can also be thought of as a version of the midpoint formula. The reference is from "An Introduction to Numerical Analysis, Second Edition" by Kendall E. Atkinson.

Thanks for your help.
 
  • #4
At first glance, I couldn't see the difference between the Verlet algorithm and what used to be called the Central Difference method - maybe that is now called the midpoint method?

But I don't know much about Verlet except what it says in Wikipedia, and I don't believe everything I read there!
 

What is the Verlet integration method?

The Verlet integration method is a numerical algorithm used to solve differential equations in physics and engineering. It is commonly used in molecular dynamics simulations to calculate the positions and velocities of particles over time.

How does the Verlet integration method work?

The Verlet integration method is based on the positions and velocities of particles at two consecutive time steps. It uses these values to estimate the position at the next time step, and then uses this estimate to calculate the velocity at the next time step. This process is repeated to simulate the motion of particles over time.

What are the advantages of using the Verlet integration method?

The Verlet integration method is known for its stability and accuracy, making it a popular choice for simulations in physics and engineering. It also conserves energy, which is an important factor in many physical systems.

What are the limitations of the Verlet integration method?

One limitation of the Verlet integration method is that it is a second-order method, meaning it has a truncation error of O(h^2). This means that for small time steps, the error in the calculated positions and velocities will be small. However, for larger time steps, the error can become significant.

Additionally, the Verlet integration method is not suitable for simulating systems with rapidly changing forces, as it assumes a constant force between time steps.

How does the Verlet integration method compare to other integration methods?

The Verlet integration method is often compared to other numerical integration methods, such as Euler's method and Runge-Kutta methods. Compared to Euler's method, the Verlet method is more accurate and conserves energy. However, it is less accurate than higher-order Runge-Kutta methods. The choice of integration method ultimately depends on the specific system being simulated and the desired level of accuracy.

Similar threads

Replies
1
Views
1K
Replies
5
Views
363
Replies
20
Views
2K
Replies
2
Views
263
  • Biology and Chemistry Homework Help
Replies
6
Views
2K
Replies
4
Views
319
  • Precalculus Mathematics Homework Help
Replies
14
Views
1K
Replies
6
Views
1K
Replies
2
Views
1K
Back
Top