# Thread Subject: Solving differential equations

 Subject: Solving differential equations From: Chris Sorrento Date: 11 Feb, 2012 22:10:10 Message: 1 of 3 I need to solve differential equations: 3 equations:           dX/dt = MX-kX           dS/dt = DS0 - (MX/Y)           dP/dt = AdX/dt + BX the 4th and 5th equations are           dM/dX = Mmax.S/kX+S           dM/dS = Mmax.S/kX+S So, the first 3 equations are with respect to time and the 4th and 5th equations are with respect to one of the 3 variables that are solved wrt time. If I were to solve only the first 3 equations, I know how to write the code and solve using ODE45. But how do I incorporate the 4th and 5th equations? All of these need to be solved simultaneously. Could you guide me to any help files?
 Subject: Solving differential equations From: Roger Stafford Date: 12 Feb, 2012 01:35:11 Message: 2 of 3 "Chris Sorrento" wrote in message ... > I need to solve differential equations: > 3 equations: > dX/dt = MX-kX > dS/dt = DS0 - (MX/Y) > dP/dt = AdX/dt + BX > the 4th and 5th equations are > dM/dX = Mmax.S/kX+S > dM/dS = Mmax.S/kX+S > So, the first 3 equations are with respect to time and the 4th and 5th equations are with respect to one of the 3 variables that are solved wrt time. If I were to solve only the first 3 equations, I know how to write the code and solve using ODE45. But how do I incorporate the 4th and 5th equations? All of these need to be solved simultaneously. Could you guide me to any help files? - - - - - - - - -   You have one too many differential equations! You can write the 4th and 5th equations as:  dM/dt = (Mmax.S/kX+S)*dX/dt = (Mmax.S/kX+S)*(MX-kX) =  dM/dt = (Mmax.S/kX+S)*dS/dt = (Mmax.S/kX+S)*(DS0-(MX/Y)) This requires a dependency between the quantities on the right hand side. If these variables do satisfy this equality, then you really only need four of the equations. If they don't, you have an impossible requirement. Roger Stafford
 Subject: Solving differential equations From: Chris Sorrento Date: 13 Feb, 2012 01:08:09 Message: 3 of 3 "Roger Stafford" wrote in message ... > "Chris Sorrento" wrote in message ... > > I need to solve differential equations: > > 3 equations: > > dX/dt = MX-kX > > dS/dt = DS0 - (MX/Y) > > dP/dt = AdX/dt + BX > > the 4th and 5th equations are > > dM/dX = Mmax.S/kX+S > > dM/dS = Mmax.S/kX+S > > So, the first 3 equations are with respect to time and the 4th and 5th equations are with respect to one of the 3 variables that are solved wrt time. If I were to solve only the first 3 equations, I know how to write the code and solve using ODE45. But how do I incorporate the 4th and 5th equations? All of these need to be solved simultaneously. Could you guide me to any help files? > - - - - - - - - - > You have one too many differential equations! You can write the 4th and 5th equations as: > > dM/dt = (Mmax.S/kX+S)*dX/dt = (Mmax.S/kX+S)*(MX-kX) = > dM/dt = (Mmax.S/kX+S)*dS/dt = (Mmax.S/kX+S)*(DS0-(MX/Y)) > > This requires a dependency between the quantities on the right hand side. If these variables do satisfy this equality, then you really only need four of the equations. If they don't, you have an impossible requirement. > > Roger Stafford Thank you Roger for your response. I spent some time on your suggestion. It works. I converted as follows: M(X, S) = (dM/dX * dX/dt) + (dM/dS * dS/dt) Thanks for pointing me in the right direction.

### Everyone's Tags:

Separated by commas
Ex.: root locus, bode

### What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.