Maple Tool1.mws

Maple Tool 1

This tool is designed for use with Activity 1 in Section 6.2.

Note that we use K  rather than k  for the proportionality constant. The lower case k  is used as a counting index here.

We define K  and M  below, but the initial value P(0)  is defined farther down the page.

>    with(plots):

>    K:=0.00009;
M:=1000;

>   

We assign n  and Delta  (in place of Delta*t ) and define the iteration procedure.

>    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:

Now we define the constant P(0) .

>    P(0):=10;                                                  

We carry out the iteration and assign the values to t  and P .

>    solution:=[seq([t(k),P(k)],k=0..n)]:

Now we plot the solution.

>    plot(solution, t=0..120, P=0..1000, style=line,symbol=circle, color=blue, thickness=2, xtickmarks=[20,40,60,80,100], ytickmarks=[200,400,600,800,1000]);

>