Modeling differential equation

54 Views Asked by At

I am trying to model some differential equation which can explain buying some assets that can increase itself like a virus.

So, let's assume my money is y(t), and number of assets is n(t).

  • y(t) to a certain level c, it will increase the n(t) by +1
  • n(t) generate profit r %

so I can see something like

dy(t)/dt = y0+r*n(t)
dn(t)/dt= If(y(t)>=c,y(t)-20 & n+1,n)

However, I have no clue how I can model this discrete-continuous variable differential equation. Is there any way to model the system and get the solution?

1

There are 1 best solutions below

0
On BEST ANSWER

With the information you have given, one can make a set of recurrence relations as follows:

$$\begin{cases}y_{k+1} = y_{k}+r n_k -20 I(y_k\geq c) \\ n_{k+1} = n_k + I(y_k\geq c)\end{cases}$$

If you want to have a continuous evolution of the growth part, then you'll have to break up the equation as soon as y reaches $c$, you reset the system and put the initial condition $y=c-20$. You'll have something like

$$\frac{dy}{dt} = rn(t) \text{ with } y<c$$

and when

$$ y(t) \geq c \implies y(t+dt) = y(t)-20 \text{ and } n(t+dt) = n(t) + 1 \; .$$

Where by the use of $dt$ I mean to represent an infinitesimal time jump. But what you'll have is a continuous evolution of the equation up until $y$ reaches the limit $c$, at that point a reset in your initial conditions of the differential equation and you let the equation evolve continuously again. In other words, the result will be a stepwise continuous function. It will consist of straight rising segments from left to right, topped off at $c$, then falling back to $c-20$ and rising again. The speed at which the saw tooth will develop will increase, each successive saw tooth having a length of $20/rn$ time units.