0

I want to quickly calculate how many steps S there are between some min and max, where n=min to start with, given some particular non-linear formula, e.g. n'=n * 1.01, n'' = n' * 1.01 etc. until n exceeds max.

The simplest way to determine S is to do so iteratively, i.e. step from min till we exceed max and count the total steps whose resultant values fell within the range.

However, does a fast analytical solution exist for this? Perhaps not only for this simple formula, but for any non-linear series? Or must we iterate to find the solution?

Engineer
  • 119
  • 1
    This all depends on if you can form an equation for the general term (non-iterative form). In your example we can take $n_0=min, n_1 = min * q, n_2 = minq^2$ etc. and the general term is $n_k = minq^k$. Now you set $n_k>max$ and solve for $k$. Easy peasy. But for a different scheme this could be impossible. – Matti P. Oct 27 '23 at 12:43
  • I'm just toying with these. Set $n_0 = 0.3$ and iterate $n_{k+1} =\tan n_k$. When does $n$ exceed 10 ? Good luck to anyone solving this ... – Matti P. Oct 27 '23 at 12:52

0 Answers0