The problem is that the solution that desolve returns:

> sage: myode = tau*diff(p,t) == p*(1-p/k)
> sage: sol(t) = desolve(de=myode, ivar=t, dvar=p)
>
> sage returns:
>  -tau*log(-k + p(t)) + tau*log(p(t)) == c + t

isn't in an easy enough form for plot to display.  You're setting
sol(t) not to an expression but to an equation, and a non-trivial one.
 (You might be able to make implicit_plot work with some tweaking but
I'm lazy. :^)

We can fix that, though.  Try something like

----

tau = var('tau') # proportionality constant
k = var('k') # max population size
t = var('t') # independent variable
p = function('p', t) # dependent variable

myode = tau*diff(p,t) == p*(1-p/k)
sol = desolve(de=myode, ivar=t, dvar=p)
sol = sol.simplify_full() # simplify_log would suffice
sol_p(t) = solve(sol,p,solution_dict=True)[0][p] # make a function
from the solution
plot(sol_p.subs(tau=20, k=10, c=1), 0, 100)

----


Doug

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to