Section 6.2
Maple Tool 2
This Maple file is designed to be used with Activity 3 in Section 6.2.
> | with(plots):with(DEtools): |
We begin by displaying the slope field for the differential equation
with the values of and given below.
> | K:=0.00009; M:=1000; |
> | Slope:=DEplot(diff(P(t),t)=K*P(t)*(M-P(t)),P(t), t=0..100,P=0..1200,stepsize=1, thickness=2, linecolor=black):%; |
Next we set up the Euler's Method approximation and plot this om the slope field. Enter your value of in this calculation. (Note that this is the same calculation as was used in Maple Tool 1 in this section.)
> | n:=40; Delta:=120/n; t:=k->k*Delta; P := proc(k) |
> | P(k) := P(k-1)+K*P(k-1)*(M-P(k-1))*Delta; |
> | end: |
> | P(0):=???; solution:=[seq([t(k),P(k)],k=0..n)]: Euler:=plot(solution, t=0..120, P=0..1000, style=point,symbol=circle, color=blue, thickness=2, xtickmarks=[20,40,60,80,100], ytickmarks=[200,400,600,800,1000]): |
> | display(Euler,Slope); |
> |