- #1
QPingy
- 2
- 0
In my computational physics textbook, three different velocity estimators are derived for a problem with equation of motion: [itex]\ddot x = F(x)[/itex] where the positions are found by using the Verlet algorithm:
[itex]x(t+h) = 2 x(t) - x(t-h) + h^2 F[x(t)][/itex]
The three velocity estimators are:
[itex]
v(t) = \frac{x(t+h) - x(t-h)}{2h} + \mathcal{O}(h^2)[/itex]
[itex]
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)
[/itex]
[itex]
v_{leapfrog}(t + h/2) = \frac{x(t+h) - x(t)}{h} + \mathcal{O}(h^2)
[/itex]
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
[itex]x(t+h) = 2 x(t) - x(t-h) + h^2 F[x(t)][/itex]
The three velocity estimators are:
[itex]
v(t) = \frac{x(t+h) - x(t-h)}{2h} + \mathcal{O}(h^2)[/itex]
[itex]
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)
[/itex]
[itex]
v_{leapfrog}(t + h/2) = \frac{x(t+h) - x(t)}{h} + \mathcal{O}(h^2)
[/itex]
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