Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Help With ODE for a New Sage User

var('a b n k t')
c = function('c',t)
de = diff(c,t) - a + (b*c)*((c**n)/((k**n)+(c**n))) == 0
des = desolve(de,[c,t],[0,0]);show(des)
f(a,b,n,k,t,c) = des
plot(f(.1,3,8,.5,t,.42),(t,0,25),figsize=(4,3))

I followed an example almost exactly for a different equation to help solve this ODE:

c'=a-(bc((c^n)/(k^n+c^n))) with initial condition C[0]=0

The error I get is:

ValueError: The name "c(t)" is not a valid Python identifier.