#13
The problem involves the following information
> MODEL := diff( y(t) , t ) = 2 - y(t) ; # define the differential equation model
> IC := y(0) = 1; # specify the initial condition
> DOMAIN:= t = 0 .. 4 ;
> ptsEa := Euler( MODEL, IC, DOMAIN, 4 ); # with N = 4, we have dt=1.0
> ptsEb := Euler( MODEL, IC, DOMAIN, 8 ); # with N = 8, we have dt=0.5
> ptsEc := Euler( MODEL, IC, DOMAIN, 16 ); # with N =16, we have dt=0.25
> plotE3 := plot( [ptsEa,ptsEb,ptsEc], color = [GREEN,CYAN,BLUE], thickness = 2 ):
> plotE3;
>
> VAR := { y(t) }; # specify the variables in the model
> RANGE := y = 0 .. 2 ; # specify a reasonable interval for the dependent variable
> plotSLOPE := DEplot( MODEL, VAR, DOMAIN, RANGE, [[0,1]], arrows = NONE, linecolor=RED ):
> display( [ plotSLOPE, plotE3 ] );
>