Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Is there a formula I can use as an approximation to the following equation for velocity of a projectile when $\sigma$ is very small?

$$\dot{x}[n] =v_0\prod_{i=0}^{n}(1-\sigma i)$$ $$\sigma\approx\frac{C_1}{1,000,000};C_1\in[0,100]$$

I am trying to compute the distance travelled (programmatically) when it is shot with initial velocity $v_0$.

The sum would be:

$$x[n]=\sum_{j=0}^{n}\dot{x}$$

or $$x[n]=v_0\sum_{j=0}^{n}\prod_{i=0}^{j}(1-\sigma i).$$

The solution for the sum according to a wolfram alpha computation is very complicated and computationally expensive. I derived this formula from the following function which updates the velocity every tick (10 milliseconds).

fire() {
   frictiontimer = 1000000;
}

// This is called every 10ms
update() {
   if (xspeed) {
      int workfriction = frictiontimer / 1000;
      xspeed = xspeed * workfriction / 1000;

      frictiontimer -= FRICTION_CONSTANT;
      if (frictiontimer < 0)
         frictiontimer = 0;
   }
}

Is there is a simplification I can use somewhere?

share|improve this question
    
Can you please use brackets like: $\prod (1 - \sigma i)$ –  Aryabhata Apr 12 '12 at 19:48
    
Added, sorry about that. –  cplusplus Apr 12 '12 at 19:51

1 Answer 1

up vote 3 down vote accepted

When $\sigma i$ is small, $1 - \sigma i \approx \exp(-\sigma i)$, so $$\prod_{i=0}^n (1 - \sigma i) \approx \exp \left( - \sum_{i=0}^n \sigma i \right) = \exp(- \sigma n (n+1)/2)$$

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.