Recall that when iterating movement we have the following where vi
is the new velocity after the i
th iteration, a
is acceleration, f
is friction, and vinit
is the initial velocity:
v₁ = (vinit + a · dt) · f
v₂ = (v₁ + a · dt) · f
v₃ = (v₂ + a · dt) · f
Expanding, we get:
v₃ = (((vinit + a · dt) · f + a · dt) · f + a · dt) · f
= vinit · f³ + dt · a · (f³ + f² + f)
And in general, we can prove the general form:
vₙ = vinit · fⁿ + dt · a · ∑nk=1 fᵏ
Using the geometric series formula:
∑nk=1 fᵏ = (f(1 - fⁿ)) / (1 - f), for f ≠ 1
Thus,
vₙ = vinit · fⁿ + dt · a · (f(1 - fⁿ)) / (1 - f)
So after n
iterations, the velocity is given by the above. And when n → ∞
, assuming 0 ≤ f < 1
, then fⁿ → 0
, and we get the steady-state velocity:
limn→∞ vₙ = dt · a · f / (1 - f)
Here is a link to see this in action on desmos