Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

All published worksheets from http://sagenb.org

Views: 168699
Image: 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)
1.50000000000000MM+0.150000000000000+0.00240000000000000Fn4+0.00160000000000000\renewcommand{\Bold}[1]{\mathbf{#1}}-\frac{1.50000000000000 \, M}{M + 0.150000000000000} + \frac{0.00240000000000000}{\mbox{Fn}^{4} + 0.00160000000000000}
f2 = ks*M - Vd*(Fc/(Kd+Fc))-kin*Fc+kout*Fn show(f2)
0.0200000000000000Fc+0.100000000000000Fn+0.500000000000000MFcFc+0.150000000000000\renewcommand{\Bold}[1]{\mathbf{#1}}-0.0200000000000000 \, \mbox{Fc} + 0.100000000000000 \, \mbox{Fn} + 0.500000000000000 \, M - \frac{\mbox{Fc}}{\mbox{Fc} + 0.150000000000000}
f3 = kin*Fc - kout*Fn show(f3)
0.0200000000000000Fc0.100000000000000Fn\renewcommand{\Bold}[1]{\mathbf{#1}}0.0200000000000000 \, \mbox{Fc} - 0.100000000000000 \, \mbox{Fn}
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)
1.50000000000000M(t)M(t)+0.150000000000000+0.00240000000000000Fn(t)4+0.00160000000000000D[0](M)(t)=0\renewcommand{\Bold}[1]{\mathbf{#1}}-\frac{1.50000000000000 \, M\left(t\right)}{M\left(t\right) + 0.150000000000000} + \frac{0.00240000000000000}{{\rm Fn}\left(t\right)^{4} + 0.00160000000000000} - D[0]\left(M\right)\left(t\right) = 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\renewcommand{\Bold}[1]{\mathbf{#1}}0.0200000000000000 \, {\rm Fc}\left(t\right) - 0.100000000000000 \, {\rm Fn}\left(t\right) - D[0]\left({\rm Fn}\right)\left(t\right) = 0