What is the solution to this recursive equation?

163 Views Asked by At

Let's say I have a function $f(x)$ that is continuous and decreasing, where $x$ is always positive. We can take the function $f(x) = \frac{1}{x}\times 300$ as an example, but I am looking for a general solution to my problem. At each time step (time is not a variable of the function) I have a variable $V$ that increases as such :

$$\begin{array}{lcl}V_0&=& f(0)\\V_1&=&V_0 + f(V_0)\\V_2&=&V_1 + f(V1)\\&\vdots&\\V_n&=& V_{n-1}+ f(V_{n-1})\end{array}$$

How many time steps $n$, would I need so that $V_n \ge A$? Where $A$ can be any positive number. Is there a mathematical solution for this or do I need to use some sort of solver ? How would I do this if the function was continuous, but non derivable at all points ?

Another way to express this is by trying to get the minimum $n$ that solves :

$f(0) + f^{2}(0) + f^{3}(0) + ... + f^{n-2}(0) + f^{n-1}(0) \ge A$

P.S: I can relate it to a real world problem if it makes it easier...

1

There are 1 best solutions below

5
On BEST ANSWER

Your problem is centered on solving the difference equation $$ V_{n + 1} = V_n + f(V_n )\quad \Rightarrow \quad \Delta V_n = f(V_n ) $$

where the RHS is a function of the same $V_n$ and not of $n$ and is therefore not linear. For a general $f()$ there are not closed formulas to apply, nor a standardized algorithm.

Even the analogy with the ode $$ y'=f(y) $$ might asymptotically coincide or fail catastrofically.

In any case, for a given $f()$, you can easily graph the function and proceed like in the following graph which should be quite self explanatory.

dy=f(y)_1

That fully clarifies that you may end on a finite point or diverge to infinity, depending on the shape of $f$ , on the starting point, ...

--- in reply to your comment -----

What I am saying is that first of all you have better graph the function. This will help you to evaluate the situation. For instance for the function in the example you see that it has two zeros. If you start in between them, you will end in the 2nd zero, but iff:

  • the starting steps did not bring you already beyond that
  • in the last step, the derivative of $f$ there is negative and less than $1$ in absolute value, etc.

Having fixed that picture, then if $f()$ is "nice" enough , at least on a trait, you may approximate it and see what you can get