| Download
All published worksheets from http://sagenb.org
Project: sagenb.org published worksheets
Views: 168699Image: ubuntu2004
M,Fc,Fn,Vs_day,Vm,Vd,ks,K,Km,Kd,kin,kout,n=var('M Fc Fn Vs_day Vm Vd ks K Km Kd kin kout n') # M = function('M',t) # Fc = function('Fc',t) # Fn = function('Fn',t) Vs_day = 1.5 Vs_light = 2.0 Vm = 1.5 Vd = 1.0 ks = 0.5 K = 0.2 Km = 0.15 Kd = 0.15 kin = 0.02 kout = 0.1 n=4
f1 =Vs_day*(K^n/(K^n+Fn^n))-Vm*(M/(Km+M)) show(f1)
−M+0.1500000000000001.50000000000000M+Fn4+0.001600000000000000.00240000000000000
f2 = ks*M - Vd*(Fc/(Kd+Fc))-kin*Fc+kout*Fn show(f2)
−0.0200000000000000Fc+0.100000000000000Fn+0.500000000000000M−Fc+0.150000000000000Fc
f3 = kin*Fc - kout*Fn show(f3)
0.0200000000000000Fc−0.100000000000000Fn
from sage.calculus.desolvers import desolve_odeint
f = [f1,f2,f3] ci=[0.3,0.1,0.2] t=srange(0,100,0.2) v=[M,Fc,Fn] sol=desolve_odeint(f,ci,t,v)
p=line(sol) p.show()
show(f1)
−M(t)+0.1500000000000001.50000000000000M(t)+Fn(t)4+0.001600000000000000.00240000000000000−D[0](M)(t)=0
sol=desolve_odeint(f,ci,t,v,rtol=1e-3,atol=1e-4,h0=0.1,hmax=1,hmin=1e-4,mxstep=1000,mxords=17)
0.0200000000000000Fc(t)−0.100000000000000Fn(t)−D[0](Fn)(t)=0