Professor of Stochastic Modelling | |
School of Mathematics & Statistics | |
Newcastle University |
with(DEtools); k_1:=1; k_2:=0.5; c:=1; f:=k_2*(c-P(t)) - 2*k_1*P(t)^2; ode:=diff(P(t),t)=f; ic:=P(0)=c; soln:=dsolve({ode,ic},P(t)); phi:=unapply(rhs(soln),t); psi:=(t)->evalf(Re(phi(t))); plot(psi(t),t=0..5);
Also note that adding type=numeric as an extra argument to dsolve will give a numeric solution rather than an analytic one, which is useful for intractable systems. Figure out how to use Maple to solve the corresponding bivariate system and check that the solution for [P] matches the one above. Once you know how to solve systems of equations, see how many of the examples we have looked at in the lectures are tractable.
darren.wilkinson@ncl.ac.uk | ||
http://www.staff.ncl.ac.uk/d.j.wilkinson/ |