Numerical integration - verlet algorithm - accuracy

AI Thread Summary
The discussion focuses on the accuracy of different velocity estimators derived from the Verlet algorithm for a 1D harmonic oscillator. It highlights that the leapfrog velocity estimator is significantly less accurate than the other two estimators due to its calculation at different time instants, leading to a deviation in energy estimates of order h instead of h². The inconsistency in timing results in errors in both position and potential calculations, which compounds the inaccuracies. Despite using two positions calculated via the Verlet algorithm, the leapfrog method's timing discrepancy is the key factor in its reduced accuracy. The conversation seeks clarification on the reasoning behind this difference in performance.
QPingy
Messages
2
Reaction score
0
In my computational physics textbook, three different velocity estimators are derived for a problem with equation of motion: \ddot x = F(x) where the positions are found by using the Verlet algorithm:
x(t+h) = 2 x(t) - x(t-h) + h^2 F[x(t)]

The three velocity estimators are:
<br /> v(t) = \frac{x(t+h) - x(t-h)}{2h} + \mathcal{O}(h^2)
<br /> v_{improved}(t) = \frac{x(t+h) - x(t-h)}{2h} - \frac{h}{12}\left( F[x(t+h)] - F[x(t-h)] \right) + \mathcal{O}(h^3)<br />
<br /> v_{leapfrog}(t + h/2) = \frac{x(t+h) - x(t)}{h} + \mathcal{O}(h^2)<br />

I have no problems deriving these equations, so far everything is clear.
But, in the textbook they apply the methods for the 1D harmonic oscillator and they conclude:
The leap-frog energy estimator is an order of magnitude worse than the other two. This is not surprising since the fact that the velocity is not calculated at the same time instants as the position results in deviation of the energy from the continuum value of order h instead of h^2.

So, just because the time instants are different, the leapfrog's results are 1 orde worse than the other two? I can't find an explanation/reasoning for this...

Can someone help me?

Regards,
Jan
 
Physics news on Phys.org
QPingy said:
So, just because the time instants are different, the leapfrog's results are 1 orde worse than the other two?
Wrong time also means wrong position and therefore wrong potential. As the potential is monotonically increasing / decreasing for many steps at a time, you get a consistent direction of the error there.
 
Okay, but I still don't see why the leapfrog is one order worse than the first estimator. Both use 2 positions, which are calculated using the verlet algorithm. I understand what you're saying about the potential, but I don't get why this would result in such a difference between the 2 estimators...
 
Thread 'Gauss' law seems to imply instantaneous electric field propagation'
Imagine a charged sphere at the origin connected through an open switch to a vertical grounded wire. We wish to find an expression for the horizontal component of the electric field at a distance ##\mathbf{r}## from the sphere as it discharges. By using the Lorenz gauge condition: $$\nabla \cdot \mathbf{A} + \frac{1}{c^2}\frac{\partial \phi}{\partial t}=0\tag{1}$$ we find the following retarded solutions to the Maxwell equations If we assume that...
Dear all, in an encounter of an infamous claim by Gerlich and Tscheuschner that the Greenhouse effect is inconsistent with the 2nd law of thermodynamics I came to a simple thought experiment which I wanted to share with you to check my understanding and brush up my knowledge. The thought experiment I tried to calculate through is as follows. I have a sphere (1) with radius ##r##, acting like a black body at a temperature of exactly ##T_1 = 500 K##. With Stefan-Boltzmann you can calculate...
Thread 'A scenario of non-uniform circular motion'
(All the needed diagrams are posted below) My friend came up with the following scenario. Imagine a fixed point and a perfectly rigid rod of a certain length extending radially outwards from this fixed point(it is attached to the fixed point). To the free end of the fixed rod, an object is present and it is capable of changing it's speed(by thruster say or any convenient method. And ignore any resistance). It starts with a certain speed but say it's speed continuously increases as it goes...
Back
Top