Is there a formula to equally distribute increases over many steps exponentially?

85 Views Asked by At

As an example I have:

  1. a thing that has 350 steps
  2. on step 1 that thing has 800 of x
  3. on step 350 that thing has 400,000 of x
  4. the increase of x from step 1 to step 2 should be significantly less than the increase from step 349 to 350, but on some uniform level... that is the increase from 348 to 349 should be a little less than the increase from 349 to 350, but on a same or similar percent as the increase from step 1 to step 2.

Is there a formula I can plug in a step # to determine what the amount of x will be at say step 273, given my initial seeds of 800 and/or 400,000?

1

There are 1 best solutions below

4
On BEST ANSWER

Assuming that you want constant percent increases from $800$ to $400,000$ in which $349$ many percent increases occur -- $800,$ "another number", "yet another number", $\dots,$ $400,000$ (total of $350$ numbers/steps written; total of $349$ percentage increases from one number to the next number) -- then we want a geometric sequence of the form $a,$ $ar,\, ar^2, \,\ldots,\, ar^{349}$ where $a$ is the first term and $r$ is the common ratio (i.e. $r$ represents the numerical/fractional value of the "percent increase" from one number to the next number in the sequence).

You want $a = 800$ and $ar^{349} = 400,000.$ Thus, from these $2$ equations in $2$ unknowns, we want to solve for $r,$ after which it's simply a matter of multiplying any given term by $r$ to get the next term (= next step number).

One way to solve this system of $2$ equations in $2$ unknowns is to divide the equations, which will eliminate $a.$ See here, for example. Of course, extra care needs to be taken if any of the divisions are by quantities that could be zero (see the various discussions here and here), but in our case none of the quantities we are dividing by can equal zero. Note the analogy with the situation if, instead, the equations had been at one lower operational level -- $a = 800$ and $a + 349r = 400,000$ -- in which case we could subtract the equations to eliminate $a.$ FYI, another way of solving is by the substitution method: substitute $a=800$ into the equation $ar^{348} = 400,000.$ In your case, it's probably conceptually simpler to substitute, but usually in solving equations of this type (determining an exponential function passing through two given points) I think it's simpler to divide equations. Besides, doing it this way here might help in introducing you to a method for working with equations that you had not previously seen.

$$ \frac{ar^{349}}{a} \; = \; \frac{400,000}{800} $$ $$ r^{349} \; = \; 500 $$ $$ r = 1.01796638809566093937 \,\ldots $$

Therefore, the sequence you want is the following, where the values have been rounded to the nearest $0.001$:

$$ \begin{array}{c} a & ar & ar^2 & ar^3 & \ldots & ar^{347} & ar^{348} & ar^{349} \\ 800 & 814.371 & 829.004 & 843.899 & \ldots & 386005.164 & 392940.282 & 400000 \end{array} $$

Summarizing this as a formula using your "step number" variable, we have:

$$ \text{The value of} \; x \; \text{is} \;\; 800\cdot(1.017966388)^{\text{(step number)} - 1} $$

If you want a general formula for this type of situation, replace $350$ with $n$ (for "number of steps") and replace $800$ with $F$ (for "first number") and replace $400,000$ with $L$ (for "last number"), and then follow the same procedure above to find $r$ in terms of $n,\,F,\,L.$ Doing this gives the following:

$$ \frac{ar^{n-1}}{a} \; = \; \frac{L}{F} $$ $$ r^{n-1} \; = \; \frac{L}{F} $$ $$ r = \left(\frac{L}{F}\right)^{\frac{1}{n-1}} $$

$$ \text{The value of} \; x \; \text{is} \;\; F \cdot \left(\frac{L}{F}\right)^{\frac{\text{(step number)} - 1}{n-1}} $$