Velocity and acceleration algorithm

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 2K views
cupo
Messages
1
Reaction score
0

Homework Statement



Why are (2) and (4) equations more accurately than (1) and (3) ? Why is 7*dt in (4) equation ? What kind of equations are (2) and (4) ? What method they used to write (3) and (4) equations?

Homework Equations



Velocity:
(1) v = (x - x[i-1]) / (t - t[i-1])
(2) v = (x[i+1] - x[i-1]) / (2*dt)

Acceleration:
(3) a = (v - v[i-1]) / (t - t[i-1])
(4) a = (2*x[i+2] - x[i+1] - 2*x - x[i-1] + 2*x[i-2]) / (7*dt)

The Attempt at a Solution


Verlet algorithm
Finite difference
 
Physics news on Phys.org
The problem with (1) and (3) is that there's a time shift between the input positions and the computed velocities and accelerations. E.g (1) is really estimating the velocity at step i-0.5. (2) corrects that.
(4) achieves the same result, but I'm not sure why it's quite as it is. (Shouldn't it have dt2 at the end?) If you start with the 'smoothed' acceleration expression (2*ai+1+3*ai+2*ai-1)/7 and then substitute for those ai using the forms ai.Δt = vi+.5-vi-.5 and vi.Δt = xi+.5-xi-.5 you arrive at (4) (with dt2). But why start with (2*ai+1+3*ai+2*ai-1)/7 rather than e.g. (ai+1+2*ai+ai-1)/4 I don't know.