Message Boards Message Boards

Solve system of differential equations numerically?

Posted 3 years ago

Hello all,

I am currently trying to numerically analyze the system of differential equations below. I am struggling to solve g'(t), as it involves the partial differential equation w'(g(t)). My goal is to generate a simple plot that shows how the system changes over time. Attached is my code. Any suggestions would be greatly appreciated!

h'(t) = y(t)*(1-h(t))*g(t) - a*h(t)

y'(t) = y(t)*b*(1-c)*w(h(t)) - y(t)*d*(x(t)+y(t)),        where w(h(t)) = h(t) - (1 - h(t))*g(t)

g'(t) = V*w'(g(t))

Alex

Attachments:
POSTED BY: Alex L
3 Replies

Substituting for w[h[t]] is straightforward, but it is not clear to me how the solver will be able to numerically compute w'[g[t]].

POSTED BY: Daniel Lichtblau

Let's start with $$ W(g(t)) = g^2(t).$$ Differentiate both side of the above equation using the chain rule on the left-hand side: $$ g'(t) W'(g(t)) = 2 g'(t) g(t).$$ If we assume that the derive of $g$ does not vanish, the last equation implies that $W'(g(t)) = 2g(t)$. Now the last equation in your system becomes $$g'(t) = 2Vg(t).$$ By separating the variables, the last equation yields $$ g(t) = Ae^{2Vt},$$ where $A$ is an arbitrary constant.

POSTED BY: Ta'a Nwa Dombou

It seems that your system has not enough equations:

 w[h_[t]] := h[t] - (1 - h[t])*g[t]


dgl = {
  h'[t] == y[t]*(1 - h[t])*g[t] - a*h[t],
  y'[t] == y[t]*b*(1 - c)*w[h[t]] - y[t]*d*(x[t] + y[t]),
  g'[t] == V*D[w[g[t]], t]}

NDSolve[dgl /. {a -> .1, b -> .6, c -> .03, d -> .7, V -> 2.3},
 {x, y, g, h},
 {t, 0, 5}]

You need another one for x. So with some (arbitrary, you should give them according to your problem) modifications the system runs and you get an answer

dgl = {
  h'[t] == y[t]*(1 - h[t])*g[t] - a*h[t],
  y'[t] == y[t]*b*(1 - c)*w[h[t]] - y[t]*d*(x[t] + y[t]),
  g'[t] == V*D[w[g[t]], t],
  x'[t] == g[t],
  x[0] == 0,
  y[0] == 0,
  g[0] == 0,
  h[0] == 0
  }

NDSolve[dgl /. {a -> .1, b -> .6, c -> .03, d -> .7, V -> 2.3},
 {x, y, g, h},
 {t, 0, 5}]
POSTED BY: Hans Dolhaine
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract