2

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...

J.Doe
  • 23
  • For some basic information about writing mathematics at this site see, e.g., here, here, here and here. – Another User Aug 28 '22 at 12:30
  • I am totally a non-expert but it seems likely that the behaviour of $V_n$ will end up being "similar" (in some asymptotic sense) to the behaviour of the solution $g(x)$ of the differential equation $\frac{dg}{dx}=f(x)$ i.e. $g(x)=f(0)+\int_0^x f(t)dt$. –  Aug 29 '22 at 08:34
  • @StinkingBishop I made an edit to the question as I realised it can be expressed differently – J.Doe Aug 29 '22 at 12:41
  • The $C/x$ example is not hard, but possibly there's not much useful to be said about the general case. Possibly the suggestion of @StinkingBishop could be formalized to give a way of bounding or approximating the answer, but it won't give an exact answer. – aschepler Aug 29 '22 at 12:52
  • It's a non linear relation (for most $f$) so usually you can't solve it anatically. Also choose $f=0$ the null function and you can see that it will never exceed $A$. – Lelouch Aug 29 '22 at 16:46
  • It's much cleaner to define your $f$ as $x + \frac{300}{x}$, then the iterates are just $f(Vi)$. – Brady Gilg Aug 29 '22 at 16:52

1 Answers1

2

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

G Cab
  • 35,272
  • 1
    So what you are saying is that there is no way to solve this other than graphically or by literally writing the function down and incrementing at each step to check if I am over A... – J.Doe Aug 29 '22 at 15:30
  • added explanation of what I mean to say – G Cab Aug 29 '22 at 15:47
  • concerning the $f(x)=300/x$ of your example, have a look at this related post concerning $f(x)=1/x$ to exemplify the difficulty concerned – G Cab Aug 29 '22 at 16:29
  • this would mean that I can only find an asymptotical if I know my exact function, correct ? – J.Doe Sep 07 '22 at 08:51
  • You need to know exactly the function as well as the starting point $V_0$. Consider the example I drew: suppose that around the zero on the right (near $x=8$) the derivative be comprised in $(-1,0)$, then if you start in that area you will end on the zero, but possibly not if you start out of that – G Cab Sep 07 '22 at 16:39