(c)

We can also use this command to use a specified computational procedure. Most of these that are numerical (there are plenty of "symbolic" methods as well) require you to tell Maple how large the change in the independent variable should be (" stepsize "). So far the only method we know is Euler's, known to Maple as the "forward" Euler method from its " classical " collection. The main thing to investigate here is how the accuracy of the solution (and the time of computation) is affected by the stepsize. Let's recall what we are working with.

>

DO NOT CHANGE ANYTHING IN THE FOLLOWING INPUT REGION - YOU HAVE BEEN WARNED !!!

> Euler := proc( MODEL, IC, DOMAIN, N )

> local a, b, dt, dy, f, i, tt, yy, LISTpts, vars;

> vars := (op(2,lhs(MODEL) ), op([1,0],lhs(MODEL) ) );

> f := unapply( rhs(MODEL), vars );

> a := op(1,rhs(DOMAIN)); b := op(2,rhs(DOMAIN));

> dt := (b-a)/N;

> tt := a;

> yy := rhs(IC);

> LISTpts := [ tt, yy ];

> for i from 1 to N do

> dy := evalf( f(tt,yy) ) * dt;

> yy := yy + dy;

> tt := tt + dt;

> LISTpts := LISTpts, [ tt, yy ];

> od; RETURN( [ LISTpts ] );

> end:

DO NOT CHANGE ANYTHING IN THE PRECEDING INPUT REGION - YOU HAVE BEEN WARNED !!!

>

The number of steps to be used in Euler's method is

> Nsteps := 5;

[Maple Math]

>

The points generated by Euler's method are

> ptsE := Euler( MODEL, IC, DOMAIN, Nsteps );

[Maple Math]

>

These data points can be plotted using the command

> plotE := plot( ptsE, color = GREEN, thickness = 2, title="#1 (c)" ):

> plotE;

>