Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Hi! "But I just cannot execute it" isn't very specific-- could you cut and paste the error message? Your code seems to work for me:

sage: k1,k2,ki,t=var('k1 k2 ki t') 
sage: E=function('E',t)
sage: ES=function('ES',t)
sage: S=function('S',t) 
sage: P=function('P',t)
sage: des=(diff(E,t)==-k1*ES+k2*ES+ki*ES,
....:      diff(ES,t)==k1*ES-ki*ES-k2*ES,
....:      diff(S,t)==-k1*ES+ki*ES, diff(P,t)==k2*ES)
sage: desolve_system(des, [E, ES, S, P], ivar=t, ics=[0,1,1,1,1])
[E(t) == -e^((k1 - k2 - ki)*t) + 2, ES(t) == e^((k1 - k2 - ki)*t), S(t) == -(k1 - ki)*e^((k1 - k2 - ki)*t)/(k1 - k2 - ki) + (2*k1 - k2 - 2*ki)/(k1 - k2 - ki), P(t) == k2*e^((k1 - k2 - ki)*t)/(k1 - k2 - ki) + (k1 - 2*k2 - ki)/(k1 - k2 - ki)]

although I did have to insert some commas which seemed missing from your des line. [Note that the above is a cut-and-paste from the console; you wouldn't actually enter "sage:" or "....:".]