I have some problems solving a system in mathematica.

dX/dt = p * ( (S * X) / (S + k) ) - alfa * X
dS/dt = alfa * ( S(i) - S) - (p / y)*((S * X) / (S + k) )

I have to write a linear aproximation for this system for S>>k ( S is much larger than k ) then to solve the aproximated system and use the solution for X and the data that I have in a table to obtain a numerical value for p. I have to plot the logarithm of X against the time, and estimate the slope.

How can I write a linear aproximation of a system in mathematica?

And then in my table I have several values for S, how can I retrive all values, then solve the equations for each value?

  • 2
    $\begingroup$ Looks like one of my favorite ecological models, growth of a consumer X on a resource S in a chemostat. If you assume S>>k, then you don't need the second equation and the functional response S/(S+k) is approximately 1. Then the equation for X'[t] simplifies to X'[t]==(p-alfa)*X[t], which is the (linear) model for exponential growth, with solution X[t]==X[0]*E^((p-alfa)*t. Taking logs, Log[X[t]]==Log[X[0]]+(p-alfa)*t. Find the slope by applying LinearModelFit to your data. $\endgroup$ – Chris K Jan 10 '18 at 21:18
  • $\begingroup$ DSolve should be useful; Series might come in handy, too; for solving you'll need Solve and for plotting, probably Plot $\endgroup$ – user42582 Jan 10 '18 at 21:35
  • $\begingroup$ What is S(i) meant to be? Mathematica interprets it as S*i, but that may not be what you want. $\endgroup$ – bbgodfrey Jan 10 '18 at 21:39
  • $\begingroup$ @ChrisK I forgot to say alfa=0 in my case. I did the computations in mathematica but it gives me an error at solving the system part eq1 = x'[t] == (p*s*x[t])/(s + k) - alfa*x[t] eq1Aprox = x'[t] == (p*s*x[t])/s - alfa*x[t] eq2 = s'[t] == alfa*(si - s[t]) - (p/y)*((s[t]*x)/(s[t] + k)) eq2Aprox = s'[t] == alfa*(si - s[t]) - (p/y)*((s[t]*x)/s[t]) alfa := 0 sol1 = DSolve[eq1Aprox, x[t], t] sol2 = DSolve[eq2Aprox, s[t], t] solSystem = DSolve[{eq1Aprox,eq2Aprox}, {x, s}, t] it says The function x has no arguments. $\endgroup$ – Darius Ionut Jan 10 '18 at 23:05
  • $\begingroup$ @ChrisK Here is a screenshot ibb.co/g0VOXR at what I did, and here is a screenshot to the problem ibb.co/de7WK6, I really apreciate your help $\endgroup$ – Darius Ionut Jan 10 '18 at 23:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.