Eliminating a summation

61 Views Asked by At

I need to approach the new position $(x_t,y_t)$ at moment $t$ of a moving object at $(x_0,y_0)$ given its horizontal velocity $vx_0$, its vertical velocity $vy_0$ and some constant resistance $r$ that is applied every $0.05s$. This is a model, in which the velocity is altered every $0.05s$ using $vx_t = vx_{t-0.05}\cdot r$ and similarly for $vy_t$.

I started by separating $x$ and $y$. Then I thought I could use a recursive formula to calculate $x_t$ based on $x_{t-0.05}$. That would be:

$$x_t = x_{t-0.05} + 0.05 \cdot vx_{t-0.05}$$

For efficiency of computation, I would like to rewrite this into a closed formula expression.

We can rewrite $vx_t=vx_{t-0.05}\cdot r$ into $vx_t=vx_0\cdot r^{t/0.05}=vx_0\cdot r^{20t}$ such that

$$x_t = x_{t-0.05} + 0.05 \cdot vx_0 \cdot r^{20t-1}$$ $$x_t = x_0 + \sum_{i=0,0.05,\dots}^{t-0.05} 0.05 \cdot vx_0 \cdot r^{20i},$$ $$x_t = x_0 + 0.05 \cdot vx_0 \cdot \sum_{i=0,0.05,\dots}^{t-0.05} r^{20i},$$ $$x_t = x_0 + 0.05 \cdot vx_0 \cdot \sum_{i=0}^{20t-1} r^i.$$

But how would I work away the summation there?

1

There are 1 best solutions below

0
On BEST ANSWER

What you have obtained is a "geometric sum", the sum of a finite geometric progression. When the ratio of successive terms of the progression is not $1$, then we have the formula

$$\sum_{i=0}^n a\cdot r^i = a\frac{1-r^{n+1}}{1-r}\tag{1}$$

for the sum, and when the ratio of successive terms is $1$, i.e. the progression is constant, the sum is of course the number of terms times the value of the term,

$$\sum_{i=0}^n a\cdot 1^i = (n+1)\cdot a.\tag{2}$$

The generalized formula on the wikipedia page can be seen as an instance of the formula $(1)$:

$$\sum_{k=a}^b r^k = \sum_{i=0}^{b-a} (r^a)\cdot r^i = r^a\frac{1-r^{b-a+1}}{1-r} = \frac{r^a-r^{b+1}}{1-r}.$$