I'm puzzled as to why you would discretize this equation. It seems that you're looking for an equation with fixed
a. You can just directly solve:
a=2*(D-V
0t)/t
2. That gets you to D after time t. It's a unique solution that exists for any t > 0.
If t is short, D/V
0 > t , so you have to speed up (
a > 0) to arrive at D on time. We're assuming fixed
a , so you keep speeding up and never return.
If t is long, we need
a < 0. When you reach D at time t, your velocity is
V
F = V
0+
at = 2D/t-V
0.
For D/V
0 < t < 2D/V
0 , that gives V
F > 0 when you reach D at time t. But with
a < 0, after you go past D you turn back and recross it from the other side. For t > 2D/V
0, we get V
F < 0. That means that at the time we solved for, we're crossing D going backwards. It's got to be the second time we cross D.
So there are three ranges:
t < D/V
0 , accelerate, cross D once.
D/V
0 < t < 2D/V
0, decelerate, cross D again backwards after t.
t > 2D/V
0, decelerate, cross D once before t, then going backwards at t.
There are some special crossovers:
t = D/V
0 ,
a=0, simple.
t = 2D/V
0 just reach D with V
F = 0, turn back without crossing.
Mike W.
(published on 05/24/2011)